From b737ff1bcaaf0aa2d9e63cdd73614753289c6209 Mon Sep 17 00:00:00 2001 From: Tigrov Date: Sun, 23 Jun 2024 17:21:50 +0700 Subject: [PATCH] Improve test --- tests/ActiveQueryTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ActiveQueryTest.php b/tests/ActiveQueryTest.php index 8be1f17df..84174f5f4 100644 --- a/tests/ActiveQueryTest.php +++ b/tests/ActiveQueryTest.php @@ -23,6 +23,7 @@ use Yiisoft\ActiveRecord\Tests\Support\Assert; use Yiisoft\ActiveRecord\Tests\Support\DbHelper; use Yiisoft\Db\Command\AbstractCommand; +use Yiisoft\Db\Connection\ConnectionInterface; use Yiisoft\Db\Exception\Exception; use Yiisoft\Db\Exception\InvalidArgumentException; use Yiisoft\Db\Exception\InvalidCallException; @@ -2686,7 +2687,7 @@ public function testARClassAsInstance(): void public function testARClassAsClosure(): void { - $closure = fn () => new Customer($this->db); + $closure = fn (ConnectionInterface $db): Customer => new Customer($db); $query = new ActiveQuery($closure, $this->db); $this->assertSame($query->getARClass(), $closure);