@@ 748-762 (lines=15) @@ | ||
745 | /** |
|
746 | * Test update embedded status |
|
747 | */ |
|
748 | public function testUpdateEmbeddedStatus() |
|
749 | { |
|
750 | $statusRepository = static::$kernel->getContainer()->get('open_orchestra_model.repository.status'); |
|
751 | $status = $statusRepository->findOneByName('published'); |
|
752 | $fakeColor = 'fakeColor'; |
|
753 | $saveColor = $status->getDisplayColor(); |
|
754 | $status->setDisplayColor($fakeColor); |
|
755 | $this->repository->updateEmbeddedStatus($status); |
|
756 | ||
757 | $content = $this->repository->findOnePublished('bien_vivre_en_france', 'fr', '2'); |
|
758 | $this->assertEquals($fakeColor, $content->getStatus()->getDisplayColor()); |
|
759 | ||
760 | $status->setDisplayColor($saveColor); |
|
761 | $this->repository->updateEmbeddedStatus($status); |
|
762 | } |
|
763 | } |
|
764 |
@@ 982-996 (lines=15) @@ | ||
979 | /** |
|
980 | * Test update embedded status |
|
981 | */ |
|
982 | public function testUpdateEmbeddedStatus() |
|
983 | { |
|
984 | $statusRepository = static::$kernel->getContainer()->get('open_orchestra_model.repository.status'); |
|
985 | $status = $statusRepository->findOneByName('published'); |
|
986 | $fakeColor = 'fakeColor'; |
|
987 | $saveColor = $status->getDisplayColor(); |
|
988 | $status->setDisplayColor($fakeColor); |
|
989 | $this->repository->updateEmbeddedStatus($status); |
|
990 | ||
991 | $node = $this->repository->findOnePublished('root', 'fr', '2'); |
|
992 | $this->assertEquals($fakeColor, $node->getStatus()->getDisplayColor()); |
|
993 | ||
994 | $status->setDisplayColor($saveColor); |
|
995 | $this->repository->updateEmbeddedStatus($status); |
|
996 | } |
|
997 | ||
998 | /** |
|
999 | * Test findLastVersionByLanguage |