class ThemeRegistryLoaderTest in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Template/Loader/ThemeRegistryLoaderTest.php \Drupal\Tests\Core\Template\Loader\ThemeRegistryLoaderTest
- 9 core/tests/Drupal/Tests/Core/Template/Loader/ThemeRegistryLoaderTest.php \Drupal\Tests\Core\Template\Loader\ThemeRegistryLoaderTest
@coversDefaultClass \Drupal\Core\Template\Loader\ThemeRegistryLoader @group Template
Hierarchy
- class \Drupal\Tests\Core\Template\Loader\ThemeRegistryLoaderTest extends \Drupal\Tests\UnitTestCase
Expanded class hierarchy of ThemeRegistryLoaderTest
File
- core/
tests/ Drupal/ Tests/ Core/ Template/ Loader/ ThemeRegistryLoaderTest.php, line 12
Namespace
Drupal\Tests\Core\Template\LoaderView source
class ThemeRegistryLoaderTest extends UnitTestCase {
/**
* @covers ::findTemplate
*/
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'));
}
}