class UrlGeneratorTest in Service Container 7.2
Same name and namespace in other branches
- 7 lib/Drupal/service_container/Tests/UrlGeneratorTest.php \Drupal\service_container\Tests\UrlGeneratorTest
Hierarchy
- class \Drupal\service_container\Tests\ServiceContainerIntegrationTestBase extends \Drupal\service_container\Tests\DrupalWebTestCase
- class \Drupal\service_container\Tests\UrlGeneratorTest
Expanded class hierarchy of UrlGeneratorTest
File
- lib/
Drupal/ service_container/ Tests/ UrlGeneratorTest.php, line 10 - Contains \Drupal\service_container\Tests\UrlGeneratorTest.
Namespace
Drupal\service_container\TestsView source
class UrlGeneratorTest extends ServiceContainerIntegrationTestBase {
/**
* {@inheritdoc}
*/
public static function getInfo() {
return array(
'name' => 'UrlGenerator',
'description' => '',
'group' => 'service_container',
);
}
/**
* Adds some really basic integration test.
*/
public function testUrl() {
$result = \Drupal::service('url_generator')
->url('test-path');
$this
->assertEqual(base_path() . 'test-path', $result);
}
}
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 |
ServiceContainerIntegrationTestBase:: |
protected | function | 5 | |
UrlGeneratorTest:: |
public static | function | ||
UrlGeneratorTest:: |
public | function | Adds some really basic integration test. |