/** * @param string $name * @param bool $currentlyPublished * * @dataProvider provideStatusName */ public function testChangeContentStatus($name, $currentlyPublished) { $this->markTestSkipped('To reactivate when API roles will be implemented'); $content = $this->contentRepository->findOneByLanguageAndVersion('206_3_portes', 'fr', 2); $newStatus = $this->statusRepository->findOneByName($name); $newStatusId = $newStatus->getId(); $this->client->request('POST', '/api/content/' . $content->getId() . '/update', array(), array(), array(), json_encode(array('status_id' => $newStatusId))); $this->assertSame(200, $this->client->getResponse()->getStatusCode()); $newcontent = $this->contentRepository->findOneByLanguageAndVersion('206_3_portes', 'fr', 2); $this->assertEquals($currentlyPublished, $newcontent->isCurrentlyPublished()); }
/** * @param string $contentId * @param string $language * @param int $version * * @dataProvider provideFindOneByContentIdAndLanguageAndVersion */ public function testFindOneByLanguageAndVersion($contentId, $language, $version) { $content = $this->repository->findOneByLanguageAndVersion($contentId, $language, $version); $this->assertSameContent($language, $version, null, $contentId, $content); }