public function testGetAndSetConnection() { $connection = new Mock('tcp', 'localhost', '11232'); $client = new Client(); $this->assertTrue($client->setConnection($connection) instanceof Client); $try = $client->getConnection(); $this->assertEquals($connection, $try); }