Exemplo n.º 1
0
 public function testEachCell()
 {
     $columnBag = with(new \mechanicious\Columnizer\Columnizer($this->mockData))->columnizeRowArray();
     $tableman = new \mechanicious\Tableman\Tableman($columnBag);
     $tableman->eachCell(function (&$ref, &$cell, &$row, $rowIndex) {
         if ($cell === $row['age']) {
             return $cell = 100;
         }
         $cell = 1;
     });
     $this->assertTrue($tableman->get('age')->first() === 100);
     $this->assertTrue($tableman->get('name')->first() === 1);
 }