You are here

protected function LinkManagerTest::setUp in JSON:API 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/LinkManager/LinkManagerTest.php, line 36

Class

LinkManagerTest
@coversDefaultClass \Drupal\jsonapi\LinkManager\LinkManager @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit\LinkManager

Code

protected function setUp() {
  parent::setUp();
  $router = $this
    ->prophesize(ChainRouterInterface::class);
  $url_generator = $this
    ->prophesize(UrlGeneratorInterface::class);
  $url_generator
    ->generateFromRoute(Argument::cetera())
    ->willReturnArgument(2);
  $this->linkManager = new LinkManager($router
    ->reveal(), $url_generator
    ->reveal());
}