1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

qa: extend inherited assertion test

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This commit is contained in:
Maximilian Bösing 2023-09-10 15:21:14 +02:00
parent ea1664f30b
commit f6f7c20f36
No known key found for this signature in database
GPG Key ID: 9A8988C93CEC81A3

View File

@ -2942,7 +2942,8 @@ class AssertAnnotationTest extends TestCase
}
namespace Namespace2 {
use Namespace1\AbstractSingleInstancePluginManager;
use InvalidArgumentException;use Namespace1\AbstractSingleInstancePluginManager;
use Namespace1\AbstractPluginManager;
use stdClass;
/** @template-extends AbstractSingleInstancePluginManager<stdClass> */
@ -2951,6 +2952,14 @@ class AssertAnnotationTest extends TestCase
/** @var class-string<stdClass> */
protected string $instanceOf = stdClass::class;
}
/** @template-extends AbstractPluginManager<callable> */
final class Ooq extends AbstractPluginManager
{
public function validate(mixed $value): void
{
}
}
}
namespace {
@ -2959,10 +2968,16 @@ class AssertAnnotationTest extends TestCase
/** @var mixed $object */
$object = null;
$baz->validate($object);
$ooq = new \Namespace2\Ooq(function (): void {});
/** @var mixed $callable */
$callable = null;
$ooq->validate($callable);
}
',
'assertions' => [
'$object===' => 'stdClass',
'$callable===' => 'callable',
],
'ignored_issues' => [],
'php_version' => '8.1',