Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov committed Dec 30, 2023
1 parent bd6e59e commit 4f9a24a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/ActiveRecordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use Yiisoft\ActiveRecord\Tests\Support\Assert;
use Yiisoft\Db\Exception\Exception;
use Yiisoft\Db\Exception\InvalidArgumentException;
use Yiisoft\Db\Exception\InvalidCallException;
use Yiisoft\Db\Exception\InvalidConfigException;
use Yiisoft\Db\Exception\UnknownPropertyException;
use Yiisoft\Db\Query\Query;
Expand Down Expand Up @@ -597,8 +598,8 @@ public function testAttributeAccess(): void
$this->assertTrue($customer->canGetProperty('orderItems'));
$this->assertFalse($customer->canSetProperty('orderItems'));

$this->expectException(UnknownPropertyException::class);
$this->expectExceptionMessage('Setting unknown property: ' . Customer::class . '::orderItems');
$this->expectException(InvalidCallException::class);
$this->expectExceptionMessage('Setting read-only property: ' . Customer::class . '::orderItems');
$customer->orderItems = [new Item($this->db)];

/** related attribute $customer->orderItems didn't change cause it's read-only */
Expand Down

0 comments on commit 4f9a24a

Please sign in to comment.