Author: Petr Bugyík
Exemple #1
0
 function testExport()
 {
     Helper::$presenter->forceAjaxMode = FALSE;
     $params = $this->params + array('do' => 'grid-export-export');
     ob_start();
     Helper::request($params)->send(mock('\\Nette\\Http\\IRequest'), new \Nette\Http\Response());
     $output = ob_get_clean();
     Assert::same(file_get_contents(__DIR__ . "/files/export.expect"), $output);
 }
Exemple #2
0
 function testExport()
 {
     Helper::$presenter->forceAjaxMode = FALSE;
     $params = $this->params + array('do' => 'grid-export-export');
     ob_start();
     Helper::request($params)->send(mock('\\Nette\\Http\\IRequest'), new \Nette\Http\Response());
     $output = ob_get_clean();
     //@todo - resolve this wtf? different sorting (dibi, nette db, doctrine) vs (array source)
     $type = in_array(get_called_class(), array('Grido\\Tests\\ArraySourceTest')) ? '.array' : '';
     Assert::same(file_get_contents(__DIR__ . "/files/export{$type}.expect"), $output);
 }