@@ 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 |
@@ 996-1010 (lines=15) @@ | ||
993 | /** |
|
994 | * Test update embedded status |
|
995 | */ |
|
996 | public function testUpdateEmbeddedStatus() |
|
997 | { |
|
998 | $statusRepository = static::$kernel->getContainer()->get('open_orchestra_model.repository.status'); |
|
999 | $status = $statusRepository->findOneByName('published'); |
|
1000 | $fakeColor = 'fakeColor'; |
|
1001 | $saveColor = $status->getDisplayColor(); |
|
1002 | $status->setDisplayColor($fakeColor); |
|
1003 | $this->repository->updateEmbeddedStatus($status); |
|
1004 | ||
1005 | $node = $this->repository->findOnePublished('root', 'fr', '2'); |
|
1006 | $this->assertEquals($fakeColor, $node->getStatus()->getDisplayColor()); |
|
1007 | ||
1008 | $status->setDisplayColor($saveColor); |
|
1009 | $this->repository->updateEmbeddedStatus($status); |
|
1010 | } |
|
1011 | ||
1012 | /** |
|
1013 | * Test findLastVersionByLanguage |