class PhpUnitAutoloaderTest

Test PHPUnit autoloader works correctly.

Hierarchy

Expanded class hierarchy of PhpUnitAutoloaderTest

File

drupal/core/modules/simpletest/tests/Drupal/simpletest/Tests/PhpUnitAutoloaderTest.php, line 15
Contains \Drupal\simpletest\Tests\PhpUnitAutoloaderTest.

Namespace

Drupal\simpletest\Tests
View source
class PhpUnitAutoloaderTest extends UnitTestCase {
  public static function getInfo() {
    return array(
      'name' => 'PHPUnit autoloader',
      'description' => 'Test that classes are correctly loaded during PHPUnit initialization.',
      'group' => 'Simpletest',
    );
  }

  /**
   * Test loading of classes provided by test sub modules.
   */
  public function testPhpUnitTestClassesLoading() {
    $this
      ->assertTrue(class_exists('\\Drupal\\phpunit_test\\PhpUnitTestDummyClass'), 'Class provided by test module was not autoloaded.');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PhpUnitAutoloaderTest::getInfo public static function This method exists to support the simpletest UI runner. Overrides UnitTestCase::getInfo
PhpUnitAutoloaderTest::testPhpUnitTestClassesLoading public function Test loading of classes provided by test sub modules.
UnitTestCase::getConfigFactoryStub public function Returns a stub config factory that behaves according to the passed in array.
UnitTestCase::getConfigStorageStub public function Returns a stub config storage that returns the supplied configuration.
UnitTestCase::randomName public static function Generates a random string containing letters and numbers.