function PhpStorageFactoryTest::testGetNoSettings

Same name and namespace in other branches
  1. 8.9.x core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php \Drupal\Tests\system\Kernel\PhpStorage\PhpStorageFactoryTest::testGetNoSettings()
  2. 10 core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php \Drupal\Tests\system\Kernel\PhpStorage\PhpStorageFactoryTest::testGetNoSettings()
  3. 11.x core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php \Drupal\Tests\system\Kernel\PhpStorage\PhpStorageFactoryTest::testGetNoSettings()

Tests the get() method with no settings.

File

core/modules/system/tests/src/Kernel/PhpStorage/PhpStorageFactoryTest.php, line 35

Class

PhpStorageFactoryTest
Tests the PHP storage factory.

Namespace

Drupal\Tests\system\Kernel\PhpStorage

Code

public function testGetNoSettings() {
    $php = PhpStorageFactory::get('test');
    // This should be the default class used.
    $this->assertInstanceOf(MTimeProtectedFileStorage::class, $php);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.