request() public static method

public static request ( array $params = [], string $method = Nette\Http\Request::GET ) : Nette\Application\IResponse
$params array
$method string
return Nette\Application\IResponse
示例#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);
 }
示例#2
0
文件: TestCase.php 项目: svobodni/web
 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);
 }