Skip to content

Commit

Permalink
Change $customer->name = 'Harry'; to `$customer->setAttribute('name…
Browse files Browse the repository at this point in the history
…', 'Harry');`
  • Loading branch information
Tigrov committed Dec 16, 2023
1 parent 4db8f9b commit 8bd3e6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/ActiveQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2248,7 +2248,7 @@ public function testOldAttributeAfterInsertAndUpdate(): void
$this->assertTrue($customer->save());
$this->assertSame('Jack', $customer->getOldAttribute('name'));

$customer->name = 'Harry';
$customer->setAttribute('name', 'Harry');

$this->assertTrue($customer->save());
$this->assertSame('Harry', $customer->getOldAttribute('name'));
Expand Down

0 comments on commit 8bd3e6f

Please sign in to comment.