public function testItConnectsWithANntpServer() { $response = $this->getMock('Rvdv\\Nntp\\Response\\ResponseInterface'); $connection = $this->getMock('Rvdv\\Nntp\\Connection\\ConnectionInterface', ['connect', 'disconnect', 'sendCommand', 'sendArticle']); $connection->expects($this->once())->method('connect')->will($this->returnValue($response)); $client = new Client($connection); $this->assertSame($client->connect(), $response); }