class ServiceContainerSymfonyTest in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Drupal/service_container_symfony/Tests/ServiceContainerSymfonyTest.php \Drupal\service_container_symfony\Tests\ServiceContainerSymfonyTest
Hierarchy
- class \Drupal\service_container\Tests\ServiceContainerIntegrationTestBase extends \Drupal\service_container\Tests\DrupalWebTestCase
- class \Drupal\service_container_symfony\Tests\ServiceContainerSymfonyTest
Expanded class hierarchy of ServiceContainerSymfonyTest
1 string reference to 'ServiceContainerSymfonyTest'
- ServiceContainerSymfonyTest::getInfo in modules/
providers/ service_container_symfony/ lib/ Drupal/ service_container_symfony/ Tests/ ServiceContainerSymfonyTest.php
File
- modules/
providers/ service_container_symfony/ lib/ Drupal/ service_container_symfony/ Tests/ ServiceContainerSymfonyTest.php, line 12 - Contains \Drupal\service_container_symfony\Tests\ServiceContainerSymfonyTest.
Namespace
Drupal\service_container_symfony\TestsView source
class ServiceContainerSymfonyTest extends ServiceContainerIntegrationTestBase {
/**
* {@inheritdoc}
*/
public static function getInfo() {
return array(
'name' => 'ServiceContainerSymfonyTest',
'description' => 'Tests the \\ServiceContainerSymfony class',
'group' => 'service_container',
);
}
/**
* {@inheritdoc}
*/
protected function setUp() {
$modules[] = 'service_container_symfony_test';
$modules[] = 'service_container_symfony_subtest';
parent::setUp($modules);
}
/**
* Tests some basic
*/
public function testInit() {
$this
->assertTrue(\Drupal::hasService('service_container_symfony_test_yolo'));
$this
->assertFalse(\Drupal::hasService('service_container_symfony_test_yolo1'));
}
/**
* Tests with multiple modules enabled.
*/
public function testMultiple() {
$this
->assertTrue(\Drupal::hasService('service_container_symfony_test_yolo'));
$this
->assertFalse(\Drupal::hasService('service_container_symfony_test_yolo1'));
$this
->assertTrue(\Drupal::hasService('service_container_symfony_subtest_yolo'));
$this
->assertFalse(\Drupal::hasService('service_container_symfony_subtest_yolo1'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ServiceContainerIntegrationTestBase:: |
protected | property | The dependency injection container usable in the test. | |
ServiceContainerIntegrationTestBase:: |
protected | property | The profile to install as a basis for testing. | 1 |
ServiceContainerSymfonyTest:: |
public static | function | ||
ServiceContainerSymfonyTest:: |
protected | function |
Overrides ServiceContainerIntegrationTestBase:: |
|
ServiceContainerSymfonyTest:: |
public | function | Tests some basic | |
ServiceContainerSymfonyTest:: |
public | function | Tests with multiple modules enabled. |