22
22
use CustomD \LaravelExperian \ExperianModels \Application ;
23
23
use CustomD \LaravelExperian \ExperianModels \Residencies ;
24
24
use CustomD \LaravelExperian \ExperianModels \LocationItem ;
25
+ use CustomD \LaravelExperian \ExperianModels \ApplicantData ;
25
26
use CustomD \LaravelExperian \ExperianModels \ResidencyItem ;
27
+ use CustomD \LaravelExperian \ExperianModels \AffordabilityIQ ;
26
28
27
29
class LaravelExperianTest extends TestCase
28
30
{
@@ -38,10 +40,6 @@ protected function getPackageAliases($app)
38
40
];
39
41
}
40
42
41
- public function testExample ()
42
- {
43
- $ this ->assertEquals (1 , 1 );
44
- }
45
43
46
44
protected function buildSubmission ()
47
45
{
@@ -54,6 +52,11 @@ protected function buildSubmission()
54
52
'Surname ' => 'Mayer ' ,
55
53
'DateOfBirth ' => '1981-06-19 '
56
54
]);
55
+
56
+ $ applicant ->ApplicantData = new ApplicantData ([
57
+ 'AffordabilityIQ ' => new AffordabilityIQ (),
58
+ ]);
59
+
57
60
$ submission ->Applicants = new Applicants ([$ applicant ]);
58
61
59
62
$ uklocation = new UKLocation ([
@@ -100,6 +103,13 @@ public function testBuildsASubmissionBasic()
100
103
101
104
$ this ->assertEquals ('{
102
105
"Submission": {
106
+ "Options": {
107
+ "ProductCode": "DelphiSelect",
108
+ "FullFBLRequired": true,
109
+ "AuthenticatePlusRequired": true,
110
+ "DetectRequired": true,
111
+ "TestDatabase": "A"
112
+ },
103
113
"Applicants": [
104
114
{
105
115
"ApplicantIdentifier": 1,
@@ -108,6 +118,12 @@ public function testBuildsASubmissionBasic()
108
118
"Forename": "Alexander",
109
119
"Surname": "Mayer",
110
120
"DateOfBirth": "1981-06-19"
121
+ },
122
+ "ApplicantData": {
123
+ "AffordabilityIQ": {
124
+ "JointApplicantNMI": 0,
125
+ "MainApplicantNMI": 0
126
+ }
111
127
}
112
128
}
113
129
],
@@ -138,27 +154,15 @@ public function testBuildsASubmissionBasic()
138
154
"ManualAuthenticationRequired": false,
139
155
"SearchConsent": true
140
156
},
141
- "Options": {
142
- "ProductCode": "DelphiSelect",
143
- "FullFBLRequired": true,
144
- "AuthenticatePlusRequired": true,
145
- "DetectRequired": true,
146
- "TestDatabase": "A"
147
- },
148
157
"ClientData": {
149
158
"ClientAccountNumber": "A1234"
150
159
}
151
160
}
152
161
} ' , json_encode ($ this ->buildSubmission (), JSON_PRETTY_PRINT ));
153
162
}
154
163
155
- public function DisabledtestCall ()
156
164
{
157
165
Config::set ('experian.credentials ' , [
158
- 'client_id ' => "xxx " ,
159
- 'client_secret ' => "xxx " ,
160
- 'username ' => "xxx " ,
161
- 'password ' => "xxx " ,
162
166
]);
163
167
164
168
Response::macro ('getScore ' , function () {
0 commit comments