Skip to content

Commit 05ceae4

Browse files
committed
test: fix Creation of dynamic property error
ErrorException: Creation of dynamic property class@anonymous::$id is deprecated
1 parent a88ceea commit 05ceae4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/system/Database/Live/GetTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,15 @@ public function testGetRowWithReturnType()
229229

230230
public function testGetRowWithCustomReturnType()
231231
{
232-
$testClass = new class () {};
232+
$testClass = new class () {
233+
public $id;
234+
public $name;
235+
public $email;
236+
public $country;
237+
public $created_at;
238+
public $updated_at;
239+
public $deleted_at;
240+
};
233241

234242
$user = $this->db->table('user')->get()->getRow(0, get_class($testClass));
235243

0 commit comments

Comments
 (0)