function ThemeRegistryLoaderTest::testLoaderReturnsFalseForExistsOnNonexistent
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Template/Loader/ThemeRegistryLoaderTest.php \Drupal\Tests\Core\Template\Loader\ThemeRegistryLoaderTest::testLoaderReturnsFalseForExistsOnNonexistent()
- 8.9.x core/tests/Drupal/Tests/Core/Template/Loader/ThemeRegistryLoaderTest.php \Drupal\Tests\Core\Template\Loader\ThemeRegistryLoaderTest::testLoaderReturnsFalseForExistsOnNonexistent()
- 10 core/tests/Drupal/Tests/Core/Template/Loader/ThemeRegistryLoaderTest.php \Drupal\Tests\Core\Template\Loader\ThemeRegistryLoaderTest::testLoaderReturnsFalseForExistsOnNonexistent()
@covers ::findTemplate
File
-
core/
tests/ Drupal/ Tests/ Core/ Template/ Loader/ ThemeRegistryLoaderTest.php, line 19
Class
- ThemeRegistryLoaderTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Template%21Loader%21ThemeRegistryLoader.php/class/ThemeRegistryLoader/11.x" title="Loads templates based on information from the Drupal theme registry." class="local">\Drupal\Core\Template\Loader\ThemeRegistryLoader</a> @group Template
Namespace
Drupal\Tests\Core\Template\LoaderCode
public function testLoaderReturnsFalseForExistsOnNonexistent() : void {
$registry = $this->prophesize('Drupal\\Core\\Theme\\Registry');
$runtime = $this->prophesize('Drupal\\Core\\Utility\\ThemeRegistry');
$runtime->has('foo')
->shouldBeCalled()
->willReturn(FALSE);
$registry->getRuntime()
->willReturn($runtime);
$loader = new ThemeRegistryLoader($registry->reveal());
$this->assertFalse($loader->exists('foo'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.