Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
orklah committed Dec 14, 2021
1 parent 0c1564f commit bb687ae
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/AssertAnnotationTest.php
Expand Up @@ -1657,6 +1657,33 @@ function c(\Aclass $item): bool {
echo strlen($a->b->c);
}',
],
'assertOnKeyedArrayWithClassStringOffset' => [
'<?php
class A
{
function test(): void
{
$a = [stdClass::class => ""];
/** @var array<class-string, mixed> $b */
$b = [];
$this->assertSame($a, $b);
}
/**
* @template T
* @param T $expected
* @param mixed $actual
* @psalm-assert =T $actual
*/
public function assertSame($expected, $actual): void
{
return;
}
}',
],
];
}

Expand Down

0 comments on commit bb687ae

Please sign in to comment.