public function ThemeRegistryLoaderTest::testLoaderReturnsFalseForExistsOnNonexistent in Drupal 8
Same name and namespace in other branches
- 9 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 17
Class
- ThemeRegistryLoaderTest
- @coversDefaultClass \Drupal\Core\Template\Loader\ThemeRegistryLoader @group Template
Namespace
Drupal\Tests\Core\Template\LoaderCode
public function testLoaderReturnsFalseForExistsOnNonexistent() {
$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'));
}