You are here

class CustomTest in Autoload 7

Same name and namespace in other branches
  1. 7.2 src/Tests/Unit/CustomTest.php \Drupal\autoload\Tests\Unit\CustomTest

Class CustomTest.

Hierarchy

  • class \Drupal\autoload\Tests\Unit\AuxiliaryTest extends \Drupal\autoload\Tests\Unit\DrupalWebTestCase

Expanded class hierarchy of CustomTest

File

src/Tests/Unit/CustomTest.php, line 8

Namespace

Drupal\autoload\Tests\Unit
View source
class CustomTest extends AuxiliaryTest {

  /**
   * {@inheritdoc}
   */
  protected static $modules = array(
    'autoload_test_custom',
  );

  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    $info = parent::getInfo();
    $info['name'] = 'Custom';
    $info['description'] = t('Testing functionality of autoload custom namespaces.');
    return $info;
  }

  /**
   * {@inheritdoc}
   */
  public function test() {

    // If something will not work we'll get fatal error :)
    new \Autoload\Tests\PSR0();
    new \Autoload\Tests\PSR4();
    new \AutoloadTests\PSR4();
    new \Autoload\Tests\Example\Test();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AuxiliaryTest::assertClasses protected function Assert sought classes.
AuxiliaryTest::assertExtensions protected function Assert registered extensions for autoloading.
AuxiliaryTest::setUp protected function
CustomTest::$modules protected static property Modules which should enabled for testing. Overrides AuxiliaryTest::$modules
CustomTest::getInfo public static function Overrides AuxiliaryTest::getInfo
CustomTest::test public function Unit tests for auxiliary functions. Overrides AuxiliaryTest::test