/** * @param string $name * @param array $attributes * @param bool $directed * @param bool $strict * * @return $this */ public function create($name, array $attributes = [], $directed = true, $strict = true) { $this->graph = $this->createPhpDocumentorGraph(); $this->graph->setName($name); $type = $this->getType($directed); $this->graph->setType($type); $this->graph->setStrict($strict); $this->addAttributesTo($attributes, $this->graph); return $this; }
/** * @covers phpDocumentor\GraphViz\Graph::getName */ public function testGetName() { $this->assertSame($this->fixture->getName(), 'G', 'Expecting the name to match the initial state'); $this->fixture->setName('otherName'); $this->assertSame($this->fixture->getName(), 'otherName', 'Expecting the name to contain the new value'); }