You are here

class DrupalTest in Autoload 7

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

Class DrupalTest.

Hierarchy

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

Expanded class hierarchy of DrupalTest

File

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

Namespace

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

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

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

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

    // If something will not work we'll get fatal error :)
    new \Drupal\autoload_test_drupal\PSR0();
    new \Drupal\autoload_test_drupal\PSR4();
  }

}

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
DrupalTest::$modules protected static property Modules which should enabled for testing. Overrides AuxiliaryTest::$modules
DrupalTest::getInfo public static function Overrides AuxiliaryTest::getInfo
DrupalTest::test public function Unit tests for auxiliary functions. Overrides AuxiliaryTest::test