/** * @covers \lapistano\wsunit\Http\HttpClient::getResponseObject */ public function testGetResponseObjectFromCache() { $pb = new ProxyBuilder('\\lapistano\\wsunit\\Http\\HttpClient'); $client = $pb->setProperties(array('response'))->getProxy(); $client->response = new \stdClass(); $this->assertInternalType('object', $client->getResponseObject()); }
public function testExposeInheritedMember() { $proxy = new ProxyBuilder('\\ExtendsDummy'); $actual = $proxy->setProperties(array('mascotts'))->getProxy(); $this->assertEquals(array('Tux', 'Beastie', 'Gnu'), $actual->mascotts); }
public function testProxyMemberOfClassWithNoHiddenMethod() { $proxy = new ProxyBuilder('DummyNoProtectedMethods'); $proxyDummyNS = $proxy->setProperties(array('mascotts'))->getProxy(); $this->assertInternalType('array', $proxyDummyNS->mascotts); }