From 32cc7b4f9056f1df44b57f41b0ddae903d52d348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A1=8C=E9=A3=8E?= Date: Mon, 11 Dec 2023 11:48:04 +0800 Subject: [PATCH] Update tests/Driver/Oracle/ActiveRecordTest.php Co-authored-by: Sergei Tigrov --- tests/Driver/Oracle/ActiveRecordTest.php | 54 ------------------------ 1 file changed, 54 deletions(-) diff --git a/tests/Driver/Oracle/ActiveRecordTest.php b/tests/Driver/Oracle/ActiveRecordTest.php index d91b25b02..ac4c9f407 100644 --- a/tests/Driver/Oracle/ActiveRecordTest.php +++ b/tests/Driver/Oracle/ActiveRecordTest.php @@ -167,58 +167,4 @@ public function testToArrayWithClosure(): void $customer->toArray(), ); } - - public function testToArrayForArrayable(): void - { - $this->checkFixture($this->db, 'customer', true); - - $customerQuery = new ActiveQuery(CustomerForArrayable::class, $this->db); - - /** @var CustomerForArrayable $customer */ - $customer = $customerQuery->findOne(1); - /** @var CustomerForArrayable $customer2 */ - $customer2 = $customerQuery->findOne(2); - /** @var CustomerForArrayable $customer3 */ - $customer3 = $customerQuery->findOne(3); - - $customer->setItem($customer2); - $customer->setItems($customer3); - - $this->assertSame( - [ - 'id' => 1, - 'email' => 'user1@example.com', - 'name' => 'user1', - 'address' => 'address1', - 'status' => 'active', - 'item' => [ - 'id' => 2, - 'email' => 'user2@example.com', - 'name' => 'user2', - 'status' => 'active', - ], - 'items' => [ - [ - 'id' => 3, - 'email' => 'user3@example.com', - 'name' => 'user3', - 'status' => 'inactive', - ], - ], - ], - $customer->toArray([ - 'id', - 'name', - 'email', - 'address', - 'status', - 'item.id', - 'item.name', - 'item.email', - 'items.0.id', - 'items.0.name', - 'items.0.email', - ]), - ); - } }