コード例 #1
0
ファイル: http.php プロジェクト: andrewolobo/mpTracker
 public function testWriteAsynchronousReport()
 {
     $this->if($adapter = new atoum\test\adapter())->and($adapter->file_get_contents = '')->and($report = new \mock\mageekguy\atoum\reports\asynchronous())->and($writer = new \mock\mageekguy\atoum\writers\http($adapter))->and($writer->setUrl(uniqid()))->then->object($writer->writeAsynchronousReport($report))->isIdenticalTo($writer)->mock($writer)->call('write')->withArguments($report->__toString())->once();
 }
コード例 #2
0
ファイル: http.php プロジェクト: xihewang/atoum
 public function testWriteAsynchronousReport()
 {
     $this->if($adapter = new atoum\test\adapter())->and($adapter->file_get_contents = '')->and($report = new \mock\mageekguy\atoum\reports\asynchronous())->and($writer = new \mock\mageekguy\atoum\writers\http($adapter))->and($writer->setUrl($url = uniqid()))->then->object($writer->writeAsynchronousReport($report))->isIdenticalTo($writer)->mock($writer)->call('write')->withArguments($report->__toString())->once()->if($adapter->file_get_contents = false)->then->exception(function () use($writer, $report) {
         $writer->writeAsynchronousReport($report);
     })->isInstanceOf('mageekguy\\atoum\\writers\\http\\exception')->hasMessage('Unable to write coverage report to ' . $url);
 }