You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnexpect($value->timestamp)->toBe($expected->timestamp, sprintf('Failed to assert that date [%s] is equal to [%s]', $value->toString(), $expected->toString()));
thrownewExpectationFailedException(sprintf('Failed to assert that [%s] has relationship [%s]', $this->model::class, $triedNames)); //@phpstan-ignore-line
93
+
thrownewExpectationFailedException(sprintf('Failed to assert that [%s] has relationship [%s]', $this->model::class, $triedNames)); //@phpstan-ignore-line
94
94
}
95
95
96
96
return$this->foundRelationshipName;
97
97
}
98
98
99
99
privatefunctiontry(string$relationshipName): void
100
100
{
101
-
if (empty($relationshipName)) {
101
+
if ($relationshipName === '' || $relationshipName === '0') {
102
102
return;
103
103
}
104
104
105
-
if (! empty($this->foundRelationshipName)) {
105
+
if ($this->foundRelationshipName !== '' && $this->foundRelationshipName !== '0') {
106
106
return;
107
107
}
108
108
@@ -118,7 +118,7 @@ private function try(string $relationshipName): void
if (! $this->model->{$relationshipName}() instanceof$this->relationshipClass) {
121
-
thrownewExpectationFailedException(sprintf('Failed to assert that [%s] has relationship [%s] of type [%s]', $this->model::class, $relationshipName, $this->relationshipClass)); //@phpstan-ignore-line
121
+
thrownewExpectationFailedException(sprintf('Failed to assert that [%s] has relationship [%s] of type [%s]', $this->model::class, $relationshipName, $this->relationshipClass)); //@phpstan-ignore-line
})->throws(ExpectationFailedException::class, 'Failed to assert that date [Fri Jan 01 2021 00:00:00 GMT+0000] is equal to [Sat Jan 02 2021 00:00:00 GMT+0000]');
0 commit comments