@@ 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 |
@@ 1019-1033 (lines=15) @@ | ||
1016 | /** |
|
1017 | * Test update embedded status |
|
1018 | */ |
|
1019 | public function testUpdateEmbeddedStatus() |
|
1020 | { |
|
1021 | $statusRepository = static::$kernel->getContainer()->get('open_orchestra_model.repository.status'); |
|
1022 | $status = $statusRepository->findOneByName('published'); |
|
1023 | $fakeColor = 'fakeColor'; |
|
1024 | $saveColor = $status->getDisplayColor(); |
|
1025 | $status->setDisplayColor($fakeColor); |
|
1026 | $this->repository->updateEmbeddedStatus($status); |
|
1027 | ||
1028 | $node = $this->repository->findOnePublished('root', 'fr', '2'); |
|
1029 | $this->assertEquals($fakeColor, $node->getStatus()->getDisplayColor()); |
|
1030 | ||
1031 | $status->setDisplayColor($saveColor); |
|
1032 | $this->repository->updateEmbeddedStatus($status); |
|
1033 | } |
|
1034 | ||
1035 | /** |
|
1036 | * Test findLastVersionByLanguage |