/** * Tests the getters and setters of the model * @test */ public function setGetTest() { $id = "This a weird test"; $this->_model = new Request\Client(); $this->_model->setId($id); $this->_model->setFilter(array('count' => 1)); $this->assertEquals($this->_model->getId(), $id); $this->assertEquals($this->_model->getServiceResource(), "clients/"); $this->assertEquals($this->_model->getFilter(), array('count' => 1)); return $this->_model; }
/** * Tests the exception trigger in the getOne request method * @test * @expectedException \Paymill\Services\PaymillException * @expectedExceptionMessage Undefined Error. This should not happen! */ public function getOneExceptionTest() { $outputArray = array(); $outputArray['header']['status'] = 500; $this->_getCurlMock($this->_client->getServiceResource() . $this->_client->getId(), $this->_client->parameterize("getOne"), "GET", $outputArray); $this->_client = $this->_request->getOne($this->_client); }