public function ClassLoaderTest::testSupportsTraitAutoloading in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest.php \Doctrine\Tests\Common\ClassLoaderTest::testSupportsTraitAutoloading()
File
- vendor/doctrine/ common/ tests/ Doctrine/ Tests/ Common/ ClassLoaderTest.php, line 108 
Class
Namespace
Doctrine\Tests\CommonCode
public function testSupportsTraitAutoloading() {
  if (!function_exists('trait_exists')) {
    $this
      ->markTestSkipped('You need a PHP version that supports traits in order to run this test');
  }
  $classLoader = new ClassLoader();
  $classLoader
    ->setIncludePath(__DIR__);
  $classLoader
    ->setFileExtension('.class.php');
  $classLoader
    ->setNamespaceSeparator('_');
  $this
    ->assertTrue($classLoader
    ->loadClass('ClassLoaderTest_TraitA'));
  $this
    ->assertTrue(trait_exists('ClassLoaderTest_TraitA', false));
}