From f3648dbccdde57c6ce799210b3417d4b153e5e82 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Fri, 12 Jan 2024 16:03:18 +0700 Subject: [PATCH] Change primary key before test `getOldPrimaryKey()` --- tests/ActiveRecordTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ActiveRecordTest.php b/tests/ActiveRecordTest.php index 9258b4939..9ec06c79c 100644 --- a/tests/ActiveRecordTest.php +++ b/tests/ActiveRecordTest.php @@ -867,6 +867,7 @@ public function testGetOldPrimaryKey(): void $customerQuery = new ActiveQuery(Customer::class, $this->db); $customer = $customerQuery->findOne(1); + $customer->id = 2; $this->assertSame(1, $customer->getOldPrimaryKey()); $this->assertSame(['id' => 1], $customer->getOldPrimaryKey(true));