diff --git a/tests/Eccube/Tests/Web/TopControllerTest.php b/tests/Eccube/Tests/Web/TopControllerTest.php index f0c4b2b2459..84aa235a315 100644 --- a/tests/Eccube/Tests/Web/TopControllerTest.php +++ b/tests/Eccube/Tests/Web/TopControllerTest.php @@ -13,9 +13,10 @@ namespace Eccube\Tests\Web; +use Eccube\Entity\BaseInfo; +use Eccube\Entity\Page; use Eccube\Repository\BaseInfoRepository; use Eccube\Repository\PageRepository; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; class TopControllerTest extends AbstractWebTestCase { @@ -39,11 +40,15 @@ public function testMetaTags() { // description を設定 $description = 'あのイーハトーヴォのすきとおった風、夏でも底に冷たさをもつ青いそら、うつくしい森で飾られたモリーオ市、郊外のぎらぎらひかる草の波。'; - $page = $this->container->get(PageRepository::class)->getByUrl('homepage'); + /** @var PageRepository $pageRepository */ + $pageRepository = $this->entityManager->getRepository(Page::class); + $page = $pageRepository->getByUrl('homepage'); $page->setDescription($description); $this->entityManager->flush(); - $shopName = $this->container->get(BaseInfoRepository::class)->get()->getShopName(); + /** @var BaseInfoRepository $baseInfoRepository */ + $baseInfoRepository = $this->entityManager->getRepository(BaseInfo::class); + $shopName = $baseInfoRepository->get()->getShopName(); $expected_desc = mb_substr($description, 0, 120, 'utf-8'); $crawler = $this->client->request('GET', $this->generateUrl('homepage'));