/** * @covers phpDocumentor\Descriptor\Tag\VersionDescriptor::setVersion * @covers phpDocumentor\Descriptor\Tag\VersionDescriptor::getVersion */ public function testSetAndGetVersion() { $this->assertEmpty($this->fixture->getVersion()); $this->fixture->setVersion(self::EXAMPLE_VERSION); $result = $this->fixture->getVersion(); $this->assertEquals(self::EXAMPLE_VERSION, $result); }
// TODO create a link to access the old websites (clone in temp if not yet there) $desc = new VersionDescriptor($version, $output); $versions[] = $desc; } } /***********************\ DISPLAY \***********************/ $page = PageContent::getInstance(); $page->addComponent(new Title("À propos...", 1)); $page->addComponent(new Title("Historique des versions", 2)); $table = new Table(); $page->addComponent($table); $row = new TableRow(); $head = new TableHeader("Version"); $head->setClass("version"); $row->addComponent($head); $head = new TableHeader("Déscription"); $head->setClass("description"); $row->addComponent($head); $head = new TableHeader("Aperçu"); $head->setClass("preview"); $row->addComponent($head); $table->addComponent($row); foreach ($versions as $desc) { $row = new TableRow(); $row->addComponent(preg_match('#^[0-9]+(\\.0+)*$#', $desc->getVersion()) ? '<b>' . $desc->getVersion() . '</b>' : $desc->getVersion()); $row->addComponent(Format::convertTextToHtml($desc->getComment())); $row->addComponent(WEBSITE_VERSION == $desc->getVersion() ? 'Version actuelle !' : $desc->getUrl() == null ? 'Non dispo' : Link::newWindowLink($desc->getUrl(), "Utiliser cette version")); $table->addComponent($row); }