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
// PHPUnit 10 compatible way to test trigger_error().
23
30
set_error_handler(
24
-
function ($errno, $errstr): bool {
25
-
$this->assertStringEndsWith(
26
-
'::has(): Providing Argument #1 ($key) as object is deprecated since 1.2.0, please provide as int|string|Art4\JsonApiClient\Helper\AccessKey instead.',
31
+
function ($errno, $errstr)use ($key): bool {
32
+
$this->assertSame(
33
+
'Art4\JsonApiClient\Tests\Fixtures\AccessableTraitMock::has(): Providing Argument #1 ($key) as '.gettype($key).' is deprecated since 1.2.0, please provide as int|string|Art4\JsonApiClient\Helper\AccessKey instead.',
27
34
$errstr
28
35
);
29
36
@@ -33,19 +40,23 @@ function ($errno, $errstr): bool {
// PHPUnit 10 compatible way to test trigger_error().
45
56
set_error_handler(
46
-
function ($errno, $errstr): bool {
47
-
$this->assertStringEndsWith(
48
-
'::has(): Providing Argument #1 ($key) as array is deprecated since 1.2.0, please provide as int|string|Art4\JsonApiClient\Helper\AccessKey instead.',
57
+
function ($errno, $errstr)use ($key): bool {
58
+
$this->assertSame(
59
+
'Art4\JsonApiClient\Tests\Fixtures\AccessableTraitMock::get(): Providing Argument #1 ($key) as '.gettype($key).' is deprecated since 1.2.0, please provide as int|string|Art4\JsonApiClient\Helper\AccessKey instead.',
49
60
$errstr
50
61
);
51
62
@@ -55,6 +66,10 @@ function ($errno, $errstr): bool {
0 commit comments