From 05ceae4ea1708fef243d5104dd04e52116bd383a Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 26 Oct 2022 09:03:51 +0900 Subject: [PATCH] test: fix Creation of dynamic property error ErrorException: Creation of dynamic property class@anonymous::$id is deprecated --- tests/system/Database/Live/GetTest.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/system/Database/Live/GetTest.php b/tests/system/Database/Live/GetTest.php index 59381e07a6c2..29dbdad10c0d 100644 --- a/tests/system/Database/Live/GetTest.php +++ b/tests/system/Database/Live/GetTest.php @@ -229,7 +229,15 @@ public function testGetRowWithReturnType() public function testGetRowWithCustomReturnType() { - $testClass = new class () {}; + $testClass = new class () { + public $id; + public $name; + public $email; + public $country; + public $created_at; + public $updated_at; + public $deleted_at; + }; $user = $this->db->table('user')->get()->getRow(0, get_class($testClass));