You are here

public function LinkGeneratorTest::testL in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/service_container/Tests/LinkGeneratorTest.php \Drupal\service_container\Tests\LinkGeneratorTest::testL()

Adds some really basic integration test.

File

lib/Drupal/service_container/Tests/LinkGeneratorTest.php, line 26
Contains \Drupal\service_container\Tests\LinkGeneratorTest.

Class

LinkGeneratorTest

Namespace

Drupal\service_container\Tests

Code

public function testL() {
  $result = \Drupal::service('link_generator')
    ->l('Title', 'test-path');
  $url = url('test-path');
  $this
    ->assertEqual("<a href=\"{$url}\">Title</a>", $result);
}