Example #1
0
 /**
  * @covers Devtools\Response::fail()
  * @expectedException \Exception
  **/
 public function testFail()
 {
     $validResponse = json_encode(array('status' => '', 'request' => array(), 'message' => 'Error.' . "\n"));
     $response = new \Devtools\Response();
     $response->fail("Error.");
     $this->assertEquals($validResponse, $response->json());
 }
Example #2
0
<?php

$resp = new \Devtools\Response();
$resp->data($_REQUEST);
$resp->message('This is a successful json call with which to test.');
echo $resp->json();
Example #3
0
<?php

require_once 'autoloader.php';
$resp = new \Devtools\Response();
$resp->data($_REQUEST);
$resp->message('This is a failed json call for testing.');
echo $resp->json();