/** * @param Exception $e */ protected function exception(Exception $e, $fixture) { $message = "Exception occurred!"; $tables = PHPFIT_Parse::createSimple("span", $message, null, null); $fixture->exception($tables, $e); $fixture->listener->tableFinished($tables); $fixture->listener->tablesFinished($fixture->counts); return $tables; }
/** * @param string $body * @param PHPFIT_Parse $more * @return PHPFIT_Parse */ protected function td($body, $more) { return PHPFIT_Parse::createSimple("td", $this->infoInColor($body), null, $more); }
function doShow($cells) { try { $doCells = $this->doRestOfCells($cells->more, false); } catch (\Exception $e) { $this->exception($cells->more, $e); return; } $adapter = $doCells->getAdapter(); $newCell = \PHPFIT_Parse::createSimple('td', $adapter->valueToString($doCells->getResult())); $doCells->getLastCell()->more = $newCell; }
/** * @param string $body * @return PHPFIT_Parse */ public function td($body) { return PHPFIT_Parse::createSimple("td", $this->infoInColor($body), null, null); }
/** * @param array $row * @return PHPFIT_Parse */ protected function buildCells($row) { $root = PHPFIT_Parse::createSimple(null, null, null, null); $next = $root; foreach ($this->columnBindings as $adapter) { $next = $next->more = PHPFIT_Parse::createSimple('td', '', null, null); if (!$adapter) { $this->ignore($next); } else { try { $adapter->target = $row; $next->body = self::gray(self::escape($adapter->toString($adapter->get()))); } catch (Exception $e) { $this->exception($next, $e); } } } return $root->more; }