You are here

class ExtraTest in Plug 7

Hierarchy

  • class \Drupal\plug_example\Tests\BaseTest extends \Drupal\plug_example\Tests\DrupalWebTestCase

Expanded class hierarchy of ExtraTest

File

modules/plug_example/lib/Drupal/plug_example/Tests/ExtraTest.php, line 10
Basic tests cases for plug_example module.

Namespace

Drupal\plug_example\Tests
View source
class ExtraTest extends BaseTest {

  /**
   * Expected output for extra name plugins.
   *
   * @var array
   */
  protected $extraNamePlugins = array(
    'Company name: New Acme Inc.',
  );

  /**
   * Expected output for extra fruit plugins.
   *
   * @var array
   */
  protected $extraFruitPlugins = array(
    'Fruit name: Pear',
  );

  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Plug Example extra tests',
      'description' => 'Plug example extra tests',
      'group' => 'Plug',
    );
  }

  /**
   * {@inheritdoc}
   */
  public function setUp() {
    parent::setUp('registry_autoload', 'plug_example', 'plug_test');
  }

  /**
   * Tests the annotated plugin discovery in multiple modules.
   */
  public function testAnnotatedDiscovery() {
    $this
      ->assertTestModulePlugins($this->namePlugins, $this->extraNamePlugins, $this->annotatedTestPath, $this->nameCache);
  }

  /**
   * Tests the YAML plugin discovery in multiple modules.
   */
  public function testYamlDiscovery() {
    $this
      ->assertTestModulePlugins($this->fruitPlugins, $this->extraFruitPlugins, $this->yamlTestPath, $this->fruitCache);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BaseTest::$annotatedTestPath protected property Annotated plugins test page path. 1
BaseTest::$fruitCache protected property Cache id defined for name plugins. 1
BaseTest::$fruitPlugins protected property Expected output for default fruit plugins. 1
BaseTest::$manager protected property The plugin manager. 1
BaseTest::$nameCache protected property Cache id defined for name plugins. 1
BaseTest::$namePlugins protected property Expected output for default name plugins. 1
BaseTest::$yamlTestPath protected property YAML plugins test page path. 1
BaseTest::assertCountXpathItems protected function Asserts the number of items in a XPath selector.
BaseTest::assertExamplePageResults protected function Checks the example page content.
BaseTest::assertTestModulePlugins protected function Checks the behavior when enabling/disabling plug_test module.
ExtraTest::$extraFruitPlugins protected property Expected output for extra fruit plugins.
ExtraTest::$extraNamePlugins protected property Expected output for extra name plugins.
ExtraTest::getInfo public static function
ExtraTest::setUp public function
ExtraTest::testAnnotatedDiscovery public function Tests the annotated plugin discovery in multiple modules.
ExtraTest::testYamlDiscovery public function Tests the YAML plugin discovery in multiple modules.