public function testZalandoPHPRequestPerfomOperation() { $conf = new GenericConfiguration(); $operation = new Articles(); $request = $this->getMock('\\ZalandoPHP\\Request\\Rest\\Request', array('perform')); $request->expects($this->once())->method('perform')->with($this->equalTo($operation)); $conf->setRequest($request); $zalando = new ZalandoPHP($conf); $zalando->runOperation($operation); }
/** * @expectedException LogicException */ public function testInvalidRequestObjectFromObject() { $conf = new GenericConfiguration(); $conf->setRequest(new \Exception()); $request = RequestFactory::createRequest($conf); }