for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace IBM\Watson\Common\Message;
use IBM\Watson\Tests\TestCase;
use Mockery as m;
class AbstractResponseTest extends TestCase
{
private $response;
public function setUp()
$this->response = m::mock('\IBM\Watson\Common\Message\AbstractResponse')->makePartial();
}
public function testConstruct()
$data = ['foo' => 'bar'];
$request = $this->getMockRequest();
$this->response = m::mock('\IBM\Watson\Common\Message\AbstractResponse', [$request, $data])->makePartial();
$this->assertSame($request, $this->response->getRequest());
$this->assertSame($data, $this->response->getData());
public function testDefaultMethods()
$this->assertNull($this->response->getMessage());
$this->assertNull($this->response->getData());
$this->assertNull($this->response->getCode());