LinkGeneratorTest.php in Service Container 7.2        
                          
                  
                        
  
  
  
File
  lib/Drupal/service_container/Tests/LinkGeneratorTest.php
  
    View source  
  <?php
namespace Drupal\service_container\Tests;
class LinkGeneratorTest extends ServiceContainerIntegrationTestBase {
  
  public static function getInfo() {
    return array(
      'name' => 'LinkGenerator',
      'description' => '',
      'group' => 'service_container',
    );
  }
  
  public function testL() {
    $result = \Drupal::service('link_generator')
      ->l('Title', 'test-path');
    $url = url('test-path');
    $this
      ->assertEqual("<a href=\"{$url}\">Title</a>", $result);
  }
}