Ejemplo n.º 1
0
 /**
  * @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;
 }
Ejemplo n.º 2
0
 /**
  * @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);
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 /**
  * @param string $body
  * @return PHPFIT_Parse
  */
 public function td($body)
 {
     return PHPFIT_Parse::createSimple("td", $this->infoInColor($body), null, null);
 }
Ejemplo n.º 5
0
 /**
  * @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;
 }