File tree 2 files changed +7
-3
lines changed
tests/Engine/Unit/Environments
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,17 @@ protected function setValues($values)
25
25
{
26
26
foreach ($ values as $ key => $ value ) {
27
27
if (isset ($ this ->keys [$ key ])) {
28
+ if (null === $ value ) {
29
+ continue ;
30
+ }
28
31
$ className = $ this ->keys [$ key ];
29
32
if (method_exists ($ className , 'build ' )) {
30
- $ this ->{ $ key } = $ className ::build ($ value );
33
+ $ this ->{$ key } = $ className ::build ($ value );
31
34
} else {
32
- $ this ->{ $ key } = new $ className ($ value );
35
+ $ this ->{$ key } = new $ className ($ value );
33
36
}
34
37
} else {
35
- $ this ->{ $ key } = $ value ;
38
+ $ this ->{$ key } = $ value ;
36
39
}
37
40
}
38
41
}
Original file line number Diff line number Diff line change @@ -165,5 +165,6 @@ public function testBuildEnvironmentApiKeyModel()
165
165
166
166
$ environment = EnvironmentAPIKeyModel::build ($ environmentDict );
167
167
$ this ->assertEquals ($ environment ->getKey (), $ environmentDict ->key );
168
+ $ this ->assertNull ($ environment ->expires_at );
168
169
}
169
170
}
You can’t perform that action at this time.
0 commit comments