public function setFont($font = null) { if (null !== $font && !array_key_exists($font, $this->fonts)) { throw new Exception('That font is not available.'); } $this->font = $font; return $this; }
public function testAddAndSetFont2() { $this->setExpectedException('Pop\\Graph\\Exception'); $g = new Graph($this->pdfOptions); $g->addFont(__DIR__ . '/../tmp/times.ttf'); $g->setFont('bogus'); }