protected function EntityUrlTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php \Drupal\Tests\Core\Entity\EntityUrlTest::setUp()
Overrides UnitTestCase::setUp
File
- core/tests/ Drupal/ Tests/ Core/ Entity/ EntityUrlTest.php, line 40 
- Contains \Drupal\Tests\Core\Entity\EntityUrlTest.
Class
- EntityUrlTest
- @coversDefaultClass \Drupal\Core\Entity\Entity @group Entity
Namespace
Drupal\Tests\Core\EntityCode
protected function setUp() {
  parent::setUp();
  $this->entityManager = $this
    ->getMock('Drupal\\Core\\Entity\\EntityManagerInterface');
  $this->urlGenerator = $this
    ->getMock('Drupal\\Core\\Routing\\UrlGeneratorInterface');
  $container = new ContainerBuilder();
  $container
    ->set('entity.manager', $this->entityManager);
  $container
    ->set('url_generator', $this->urlGenerator);
  \Drupal::setContainer($container);
}