From 19b1683801db64b384143feb19b6f26a8fdcb4b2 Mon Sep 17 00:00:00 2001 From: Jonathan Vollebregt Date: Thu, 18 Jul 2024 11:33:44 +0200 Subject: [PATCH] ParserTest: Explicitly check for undefined nullable properties --- tests/Fixtures/Php74TestClass.php | 3 +++ tests/Parser/ParserTest.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/Fixtures/Php74TestClass.php b/tests/Fixtures/Php74TestClass.php index 8679b88d4..6ef22290d 100644 --- a/tests/Fixtures/Php74TestClass.php +++ b/tests/Fixtures/Php74TestClass.php @@ -10,16 +10,19 @@ class Php74TestClass public $d; public ?string $e = null; public $f = null; + public ?string $g; protected $prot_a = 1; protected string $prot_b = '2'; protected string $prot_c; protected $prot_d; protected ?string $prot_e = null; protected $prot_f = null; + protected ?string $prot_g; private $priv_a = 1; private string $priv_b = '2'; private string $priv_c; private $priv_d; private ?string $priv_e = null; private $priv_f = null; + private ?string $priv_g; } diff --git a/tests/Parser/ParserTest.php b/tests/Parser/ParserTest.php index f145e7628..d596451ff 100644 --- a/tests/Parser/ParserTest.php +++ b/tests/Parser/ParserTest.php @@ -427,8 +427,11 @@ function (&$var, &$o) use (&$pluginCount) { $expected = [ ['c', 'undefined', '$v->c'], + ['g', 'undefined', '$v->g'], ['prot_c', 'undefined', false], + ['prot_g', 'undefined', false], ['priv_c', 'undefined', false], + ['priv_g', 'undefined', false], ['a', 'integer', '$v->a'], ['b', 'string', '$v->b'], ['d', 'null', '$v->d'],