|
@@ -13,7 +13,6 @@ class OtPageRepositoryTest extends UnitTestCase
|
|
|
protected $pageService;
|
|
protected $pageService;
|
|
|
protected $pageRepository;
|
|
protected $pageRepository;
|
|
|
protected $connectionPool;
|
|
protected $connectionPool;
|
|
|
- protected $siteFinder;
|
|
|
|
|
protected $pageFixtures;
|
|
protected $pageFixtures;
|
|
|
protected $otPageRepository;
|
|
protected $otPageRepository;
|
|
|
|
|
|
|
@@ -22,7 +21,6 @@ class OtPageRepositoryTest extends UnitTestCase
|
|
|
$this->pageService = $this->prophesize(\FluidTYPO3\Vhs\Service\PageService::class);
|
|
$this->pageService = $this->prophesize(\FluidTYPO3\Vhs\Service\PageService::class);
|
|
|
$this->pageRepository = $this->prophesize(\TYPO3\CMS\Frontend\Page\PageRepository::class);
|
|
$this->pageRepository = $this->prophesize(\TYPO3\CMS\Frontend\Page\PageRepository::class);
|
|
|
$this->connectionPool = $this->prophesize(\TYPO3\CMS\Core\Database\ConnectionPool::class);
|
|
$this->connectionPool = $this->prophesize(\TYPO3\CMS\Core\Database\ConnectionPool::class);
|
|
|
- $this->siteFinder = $this->prophesize(\TYPO3\CMS\Core\Site\SiteFinder::class);
|
|
|
|
|
|
|
|
|
|
// Fixtures
|
|
// Fixtures
|
|
|
$this->pageFixtures = new PageFixtures();
|
|
$this->pageFixtures = new PageFixtures();
|
|
@@ -38,7 +36,6 @@ class OtPageRepositoryTest extends UnitTestCase
|
|
|
$this->otPageRepository->injectPageService($this->pageService->reveal());
|
|
$this->otPageRepository->injectPageService($this->pageService->reveal());
|
|
|
$this->otPageRepository->injectPageRepository($this->pageRepository->reveal());
|
|
$this->otPageRepository->injectPageRepository($this->pageRepository->reveal());
|
|
|
$this->otPageRepository->injectConnectionPool($this->connectionPool->reveal());
|
|
$this->otPageRepository->injectConnectionPool($this->connectionPool->reveal());
|
|
|
- $this->otPageRepository->injectSiteFinder($this->siteFinder->reveal());
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -80,7 +77,7 @@ class OtPageRepositoryTest extends UnitTestCase
|
|
|
$root_line = $this->pageFixtures->getRootlineFor($page_uid);
|
|
$root_line = $this->pageFixtures->getRootlineFor($page_uid);
|
|
|
|
|
|
|
|
$this->pageService->getRootLine($page_uid)->shouldBeCalled()->willReturn($root_line);
|
|
$this->pageService->getRootLine($page_uid)->shouldBeCalled()->willReturn($root_line);
|
|
|
- $this->pageRepository->getPage($root_uid)->shouldBeCalled()->willReturn($root_page);
|
|
|
|
|
|
|
+ $this->pageRepository->getPage($root_uid, true)->shouldBeCalled()->willReturn($root_page);
|
|
|
$this->injectProphecies();
|
|
$this->injectProphecies();
|
|
|
|
|
|
|
|
// Test
|
|
// Test
|
|
@@ -104,7 +101,7 @@ class OtPageRepositoryTest extends UnitTestCase
|
|
|
$root_line = $this->pageFixtures->getRootlineFor($root_uid);
|
|
$root_line = $this->pageFixtures->getRootlineFor($root_uid);
|
|
|
|
|
|
|
|
$this->pageService->getRootLine($root_uid)->shouldBeCalled()->willReturn($root_line);
|
|
$this->pageService->getRootLine($root_uid)->shouldBeCalled()->willReturn($root_line);
|
|
|
- $this->pageRepository->getPage($root_uid)->shouldBeCalled()->willReturn($root_page);
|
|
|
|
|
|
|
+ $this->pageRepository->getPage($root_uid, true)->shouldBeCalled()->willReturn($root_page);
|
|
|
$this->injectProphecies();
|
|
$this->injectProphecies();
|
|
|
|
|
|
|
|
// Test
|
|
// Test
|
|
@@ -279,7 +276,7 @@ class OtPageRepositoryTest extends UnitTestCase
|
|
|
$root_line = $this->pageFixtures->getRootlineFor($page_uid);
|
|
$root_line = $this->pageFixtures->getRootlineFor($page_uid);
|
|
|
|
|
|
|
|
$this->pageService->getRootLine($page_uid)->shouldBeCalled()->willReturn($root_line);
|
|
$this->pageService->getRootLine($page_uid)->shouldBeCalled()->willReturn($root_line);
|
|
|
- $this->pageRepository->getPage($root_uid)->shouldBeCalled()->willReturn($root_page);
|
|
|
|
|
|
|
+ $this->pageRepository->getPage($root_uid, true)->shouldBeCalled()->willReturn($root_page);
|
|
|
$this->injectProphecies();
|
|
$this->injectProphecies();
|
|
|
|
|
|
|
|
$GLOBALS['_POST'] = ['id' => $page_uid];
|
|
$GLOBALS['_POST'] = ['id' => $page_uid];
|