/** * @depends testConstructor * * @param CreateMerchantAliasResult $merchantAliasResult */ public function testGettersSetters(CreateMerchantAliasResult $merchantAliasResult) { $stubAlias = $this->getMockBuilder('prbdias\\mbway\\Alias')->getMock(); $datetime = date_create("2014-03-15"); $merchantAliasResult->setAlias($stubAlias)->setOperationId('operationid')->setStatusCode('statuscode')->setTimestamp($datetime)->setToken('token'); $this->assertSame($stubAlias, $merchantAliasResult->getAlias()); $this->assertSame('operationid', $merchantAliasResult->getOperationId()); $this->assertSame('statuscode', $merchantAliasResult->getStatusCode()); $this->assertEquals($datetime, $merchantAliasResult->getTimestamp()); $this->assertSame('token', $merchantAliasResult->getToken()); }
public function merchantAliasResult($arg0) { $result = new CreateMerchantAliasResult(); $result->setStatusCode($arg0->statusCode)->setTimestamp(new \DateTime($arg0->timestamp))->setToken($arg0->token); call_user_func($this->callback, $result); }