You are here

class UrlGeneratorTest 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

Hierarchy

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\Tests
View 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

Namesort descending Modifiers Type Description Overrides
ServiceContainerIntegrationTestBase::$container protected property The dependency injection container usable in the test.
ServiceContainerIntegrationTestBase::$profile protected property The profile to install as a basis for testing. 1
ServiceContainerIntegrationTestBase::setUp protected function 5
UrlGeneratorTest::getInfo public static function
UrlGeneratorTest::testUrl public function Adds some really basic integration test.