Пример #1
0
 public function testItReturnsMessageAndStatusCodeFromInjectedResponse()
 {
     $response = $this->getMock('Rvdv\\Nntp\\Response\\ResponseInterface');
     $response->expects($this->once())->method('getMessage')->will($this->returnValue('server ready - posting allowed'));
     $response->expects($this->once())->method('getStatusCode')->will($this->returnValue(200));
     $multiLineResponse = new MultiLineResponse($response, new \SplFixedArray());
     $this->assertEquals('server ready - posting allowed', $multiLineResponse->getMessage());
     $this->assertEquals(200, $multiLineResponse->getStatusCode());
 }