@@ -122,7 +122,7 @@ public function testImportFunderByIDAndPercent() {
122
122
// create contact
123
123
$ contactParams = ['first_name ' =>'walter ' , 'last_name ' =>'white ' ];
124
124
$ contactID = $ this ->createContact ($ contactParams );
125
- $ funderId = $ this ->createFunder ('Test Funder ' );
125
+ $ funderOptionValue = $ this ->createFunder ('Test Funder ' );
126
126
127
127
// create contract
128
128
$ contract = $ this ->createJobContract ($ contactID , date ('Y-m-d ' , strtotime ('-14 days ' )));
@@ -135,7 +135,7 @@ public function testImportFunderByIDAndPercent() {
135
135
'hrjc_region ' => 'south amman ' ,
136
136
'hrjc_role_department ' => 'amman devs ' ,
137
137
'hrjc_level_type ' => 'guru ' ,
138
- 'funder ' => $ funderId ,
138
+ 'funder ' => $ funderOptionValue [ ' name ' ] ,
139
139
'hrjc_funder_val_type ' => '% ' ,
140
140
'hrjc_role_percent_pay_funder ' => '30 '
141
141
];
@@ -144,7 +144,7 @@ public function testImportFunderByIDAndPercent() {
144
144
145
145
$ roleEntity = $ this ->findRole (['title ' => $ importParams ['title ' ]]);
146
146
$ this ->assertEquals ($ importParams ['title ' ], $ roleEntity ->title );
147
- $ this ->assertEquals ($ importParams [ ' funder ' ], $ roleEntity ->funder );
147
+ $ this ->assertEquals ($ funderOptionValue [ ' value ' ], $ roleEntity ->funder );
148
148
$ this ->assertEquals (1 , $ roleEntity ->funder_val_type );
149
149
$ this ->assertEquals ($ importParams ['hrjc_role_percent_pay_funder ' ], $ roleEntity ->percent_pay_funder );
150
150
}
@@ -153,7 +153,7 @@ public function testImportFunderByIDAndAmount() {
153
153
// create contact
154
154
$ contactParams = ['first_name ' =>'walter ' , 'last_name ' =>'white ' ];
155
155
$ contactID = $ this ->createContact ($ contactParams );
156
- $ funderId = $ this ->createFunder ('Test Funder ' );
156
+ $ funderOptionValue = $ this ->createFunder ('Test Funder ' );
157
157
158
158
// create contract
159
159
$ contract = $ this ->createJobContract ($ contactID , date ('Y-m-d ' , strtotime ('-14 days ' )));
@@ -166,7 +166,7 @@ public function testImportFunderByIDAndAmount() {
166
166
'hrjc_region ' => 'south amman ' ,
167
167
'hrjc_role_department ' => 'amman devs ' ,
168
168
'hrjc_level_type ' => 'guru ' ,
169
- 'funder ' => $ funderId ,
169
+ 'funder ' => $ funderOptionValue [ ' name ' ] ,
170
170
'hrjc_funder_val_type ' => 'fixed ' ,
171
171
'hrjc_role_amount_pay_funder ' => '30 '
172
172
];
@@ -175,7 +175,7 @@ public function testImportFunderByIDAndAmount() {
175
175
176
176
$ roleEntity = $ this ->findRole (['title ' => $ importParams ['title ' ]]);
177
177
$ this ->assertEquals ($ importParams ['title ' ], $ roleEntity ->title );
178
- $ this ->assertEquals ($ importParams [ ' funder ' ], $ roleEntity ->funder );
178
+ $ this ->assertEquals ($ funderOptionValue [ ' value ' ], $ roleEntity ->funder );
179
179
$ this ->assertEquals (0 , $ roleEntity ->funder_val_type );
180
180
$ this ->assertEquals ($ importParams ['hrjc_role_amount_pay_funder ' ], $ roleEntity ->amount_pay_funder );
181
181
}
@@ -188,6 +188,7 @@ public function testImportFunderByDisplayNameAndAmount() {
188
188
'display_name ' => 'walter white '
189
189
];
190
190
$ contactID = $ this ->createContact ($ contactParams );
191
+ $ funderOptionValue = $ this ->createFunder ('Test Funder ' );
191
192
192
193
// create contract
193
194
$ contract = $ this ->createJobContract ($ contactID , date ('Y-m-d ' , strtotime ('-14 days ' )));
@@ -200,7 +201,7 @@ public function testImportFunderByDisplayNameAndAmount() {
200
201
'hrjc_region ' => 'south amman ' ,
201
202
'hrjc_role_department ' => 'amman devs ' ,
202
203
'hrjc_level_type ' => 'guru ' ,
203
- 'funder ' => $ contactParams [ ' display_name ' ],
204
+ 'funder ' => $ funderOptionValue [ ' name ' ],
204
205
'hrjc_funder_val_type ' => 'fixed ' ,
205
206
'hrjc_role_amount_pay_funder ' => '30 '
206
207
];
@@ -209,7 +210,7 @@ public function testImportFunderByDisplayNameAndAmount() {
209
210
210
211
$ roleEntity = $ this ->findRole (['title ' => $ importParams ['title ' ]]);
211
212
$ this ->assertEquals ($ importParams ['title ' ], $ roleEntity ->title );
212
- $ this ->assertEquals ($ contactID , $ roleEntity ->funder );
213
+ $ this ->assertEquals ($ funderOptionValue [ ' value ' ] , $ roleEntity ->funder );
213
214
$ this ->assertEquals (0 , $ roleEntity ->funder_val_type );
214
215
$ this ->assertEquals ($ importParams ['hrjc_role_amount_pay_funder ' ], $ roleEntity ->amount_pay_funder );
215
216
}
0 commit comments