getMockBuilder($class) ->disableOriginalConstructor() ->getMock(); } public function setUp() { $this->mock = $this->getStub('GuzzleHttp\Message\Request'); $this->adapter = new RequestAdapter($this->mock); } public function testGetMethod() { $this->mock->expects($this->once())->method('getMethod'); $this->adapter->setMessage($this->mock); $this->adapter->getMethod(); } public function testSetMethod() { $this->mock->expects($this->once())->method('setMethod')->with('foo'); $this->adapter->setMessage($this->mock); $this->adapter->setMethod('foo'); } public function testGetUrl() { $this->mock->expects($this->once())->method('getUrl'); $this->adapter->setMessage($this->mock); $this->adapter->getUrl(); } public function testSetUrl() { $this->mock->expects($this->once())->method('setUrl')->with('foo'); $this->adapter->setMessage($this->mock); $this->adapter->setUrl('foo'); } }