public function testNestedConvertToModelCreatesCybersourceSOAPModel() { $obj = new \stdClass(); $obj->requestID = '12345'; $obj->decision = 'REJECT'; $newObj = new \stdClass(); $newObj->testReason = 101; $obj->reasonCode = $newObj; $testModel = new CybersourceSOAPModel(); $model = $this->soapRequester->convertToModel($testModel, $obj); $this->assertEquals('12345', $model->requestID); $this->assertInstanceOf('Credibility\\LaravelCybersource\\models\\CybersourceSOAPModel', $model->reasonCode); }