protected function ClassLoaderTest::assertLoadClass in X Autoload 7.4
Same name and namespace in other branches
- 7.5 tests/src/ClassLoaderTest.php \Drupal\xautoload\Tests\ClassLoaderTest::assertLoadClass()
- 7.3 tests/Drupal/xautoload/Tests/ClassLoaderTest.php \Drupal\xautoload\Tests\ClassLoaderTest::assertLoadClass()
Parameters
\Drupal\xautoload\ClassLoader\ClassLoaderInterface $loader:
string $class:
string $file:
File
- tests/
lib/ ClassLoaderTest.php, line 109
Class
Namespace
Drupal\xautoload\TestsCode
protected function assertLoadClass($loader, $class, $file) {
// Register the class file in the virtual filesystem.
$this->filesystem
->addClass($file, $class);
// Check that the class is not already defined.
$this
->assertFalse(class_exists($class, FALSE));
// Trigger the class loader.
$loader
->loadClass($class);
// Check that the class is defined after the class loader has done its job.
$this
->assertTrue(class_exists($class, FALSE));
}