Skip to content

Commit

Permalink
add functional test update embedded status
Browse files Browse the repository at this point in the history
  • Loading branch information
alavieille committed Mar 27, 2017
1 parent de23f25 commit f890d1a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -743,4 +743,24 @@ protected function replaceKeywordLabelById($condition)

return $condition;
}


/**
* Test update embedded status
*/
public function testUpdateEmbeddedStatus()
{
$statusRepository = static::$kernel->getContainer()->get('open_orchestra_model.repository.status');
$status = $statusRepository->findOneByName('published');
$fakeColor = 'fakeColor';
$saveColor = $status->getDisplayColor();
$status->setDisplayColor($fakeColor);
$this->repository->updateEmbeddedStatus($status);

$node = $this->repository->findOnePublished('root', 'fr', '2');
$this->assertEquals($fakeColor, $node->getStatus()->getDisplayColor());

$status->setDisplayColor($saveColor);
$this->repository->updateEmbeddedStatus($status);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -952,4 +952,23 @@ public function provideCountByParentId()
array('root', '2', 14)
);
}

/**
* Test update embedded status
*/
public function testUpdateEmbeddedStatus()
{
$statusRepository = static::$kernel->getContainer()->get('open_orchestra_model.repository.status');
$status = $statusRepository->findOneByName('published');
$fakeColor = 'fakeColor';
$saveColor = $status->getDisplayColor();
$status->setDisplayColor($fakeColor);
$this->repository->updateEmbeddedStatus($status);

$node = $this->repository->findOnePublished('bien_vivre_en_france', 'fr', '2');
$this->assertEquals($fakeColor, $node->getStatus()->getDisplayColor());

$status->setDisplayColor($saveColor);
$this->repository->updateEmbeddedStatus($status);
}
}

0 comments on commit f890d1a

Please sign in to comment.