public function testPublishVersion()
{
$time = time();
list($draftContent, $contentType) = $this->createTestContent();
/* BEGIN: Use Case */
$contentService = $this->repository->getContentService();
$versionInfo = $contentService->loadVersionInfoById($draftContent->id, $draftContent->getVersionInfo()->versionNo);
$publishedContent = $contentService->publishVersion($versionInfo);
/* END: Use Case */
$this->assertInstanceOf('eZ\\Publish\\API\\Repository\\Values\\Content\\Content', $publishedContent);
$this->assertTrue($publishedContent->contentInfo->published);
$this->assertEquals(VersionInfo::STATUS_PUBLISHED, $publishedContent->versionInfo->status);
$this->assertGreaterThanOrEqual($time, $publishedContent->contentInfo->publishedDate->getTimestamp());
$this->assertGreaterThanOrEqual($time, $publishedContent->contentInfo->modificationDate->getTimestamp());
}