/**
  * @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);
 }
Beispiel #2
0
        exec("git tag -v {$tag}", $output);
        array_shift($output);
        // remove hash
        array_shift($output);
        // remove type
        array_shift($output);
        // remove tag name
        array_shift($output);
        // remove tagger
        array_shift($output);
        // remove empty line
        $output = array_reduce($output, function ($result, $item) {
            return $result == null ? $item : "{$result}\n{$item}";
        });
        // 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);