protected function ClassLoaderTest::assertLoadClass in X Autoload 7.3
Same name and namespace in other branches
- 7.5 tests/src/ClassLoaderTest.php \Drupal\xautoload\Tests\ClassLoaderTest::assertLoadClass()
- 7.4 tests/lib/ClassLoaderTest.php \Drupal\xautoload\Tests\ClassLoaderTest::assertLoadClass()
Parameters
\xautoload_ClassLoader_Interface $loader:
string $class:
string $file:
2 calls to ClassLoaderTest::assertLoadClass()
- ClassLoaderTest::testNamespaces in tests/
Drupal/ xautoload/ Tests/ ClassLoaderTest.php - Test PSR-0-like namespaces.
- ClassLoaderTest::testPsr4 in tests/
Drupal/ xautoload/ Tests/ ClassLoaderTest.php - Test PSR-4-like namespaces.
File
- tests/
Drupal/ xautoload/ Tests/ ClassLoaderTest.php, line 79
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));
}