class LegacyDrupal7Test in Service Container 7.2
Same name in this branch
- 7.2 tests/src/Legacy/LegacyDrupal7Test.php \Drupal\Tests\service_container\Legacy\LegacyDrupal7Test
- 7.2 lib/Drupal/service_container/Tests/LegacyDrupal7Test.php \Drupal\service_container\Tests\LegacyDrupal7Test
Same name and namespace in other branches
- 8 tests/src/Legacy/LegacyDrupal7Test.php \Drupal\Tests\service_container\Legacy\LegacyDrupal7Test
- 7 tests/src/Legacy/LegacyDrupal7Test.php \Drupal\Tests\service_container\Legacy\LegacyDrupal7Test
@coversDefaultClass \Drupal\service_container\Legacy\Drupal7
Hierarchy
- class \Drupal\Tests\service_container\Legacy\LegacyDrupal7Test extends \Drupal\Tests\service_container\Legacy\PHPUnit_Framework_TestCase
Expanded class hierarchy of LegacyDrupal7Test
1 string reference to 'LegacyDrupal7Test'
- LegacyDrupal7Test::getInfo in lib/
Drupal/ service_container/ Tests/ LegacyDrupal7Test.php
File
- tests/
src/ Legacy/ LegacyDrupal7Test.php, line 14 - Contains \Drupal\Tests\service_container\Legacy\LegacyDrupal7Test.
Namespace
Drupal\Tests\service_container\LegacyView source
class LegacyDrupal7Test extends \PHPUnit_Framework_TestCase {
/**
* The tested Drupal7 service.
*
* @var \Drupal\service_container\Legacy\Drupal7
*/
protected $drupal7_service;
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->drupal7_service = new Drupal7();
}
/**
* @covers ::__call()
*/
public function test_call() {
$random_string = 'is_a_lovely_cat!';
$this
->assertEquals('izumi_is_a_lovely_cat!', $this->drupal7_service
->drupal7_legacy_test_function($random_string), 'Calling function via legacy service works.');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LegacyDrupal7Test:: |
protected | property | The tested Drupal7 service. | |
LegacyDrupal7Test:: |
protected | function | ||
LegacyDrupal7Test:: |
public | function | @covers ::__call() |