You are here

public function UrlGeneratorTest::testUrl in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/service_container/Tests/UrlGeneratorTest.php \Drupal\service_container\Tests\UrlGeneratorTest::testUrl()

Adds some really basic integration test.

File

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

Class

UrlGeneratorTest

Namespace

Drupal\service_container\Tests

Code

public function testUrl() {
  $result = \Drupal::service('url_generator')
    ->url('test-path');
  $this
    ->assertEqual(base_path() . 'test-path', $result);
}