class LinkGeneratorTest in Service Container 7
Same name and namespace in other branches
- 7.2 lib/Drupal/service_container/Tests/LinkGeneratorTest.php \Drupal\service_container\Tests\LinkGeneratorTest
Hierarchy
- class \Drupal\service_container\Tests\ServiceContainerIntegrationTestBase extends \Drupal\service_container\Tests\DrupalWebTestCase
- class \Drupal\service_container\Tests\LinkGeneratorTest
Expanded class hierarchy of LinkGeneratorTest
File
- lib/
Drupal/ service_container/ Tests/ LinkGeneratorTest.php, line 10 - Contains \Drupal\service_container\Tests\LinkGeneratorTest.
Namespace
Drupal\service_container\TestsView source
class LinkGeneratorTest extends ServiceContainerIntegrationTestBase {
/**
* {@inheritdoc}
*/
public static function getInfo() {
return array(
'name' => 'LinkGenerator',
'description' => '',
'group' => 'service_container',
);
}
/**
* Adds some really basic integration test.
*/
public function testL() {
$result = \Drupal::service('link_generator')
->l('Title', 'test-path');
$url = url('test-path');
$this
->assertEqual("<a href=\"{$url}\">Title</a>", $result);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LinkGeneratorTest:: |
public static | function | ||
LinkGeneratorTest:: |
public | function | Adds some really basic integration test. | |
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 |