From 13ba3b300f6e28c0d9343ed91d1d63b078f50f7f Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 7 Sep 2026 11:56:14 +0530 Subject: [PATCH] test(functions): satisfy Rector on activate rules test --- .../Modules/Functions/Workers/ActivateRulesTest.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/unit/Platform/Modules/Functions/Workers/ActivateRulesTest.php b/tests/unit/Platform/Modules/Functions/Workers/ActivateRulesTest.php index ca7ced84b2..518c3ebdf3 100644 --- a/tests/unit/Platform/Modules/Functions/Workers/ActivateRulesTest.php +++ b/tests/unit/Platform/Modules/Functions/Workers/ActivateRulesTest.php @@ -21,11 +21,11 @@ final class ActivateRulesTest extends TestCase $this->activate($dbForPlatform, deploymentBranch: 'main'); $branchQuery = $this->queryFor($captured, 'deploymentVcsProviderBranch'); - $this->assertNotNull($branchQuery); + $this->assertInstanceOf(\Utopia\Database\Query::class, $branchQuery); $this->assertSame(['', 'main'], $branchQuery->getValues()); $resourceType = $this->queryFor($captured, 'deploymentResourceType'); - $this->assertNotNull($resourceType); + $this->assertInstanceOf(\Utopia\Database\Query::class, $resourceType); $this->assertSame(['function'], $resourceType->getValues()); } @@ -37,7 +37,7 @@ final class ActivateRulesTest extends TestCase $this->activate($dbForPlatform, deploymentBranch: ''); $branchQuery = $this->queryFor($captured, 'deploymentVcsProviderBranch'); - $this->assertNotNull($branchQuery); + $this->assertInstanceOf(\Utopia\Database\Query::class, $branchQuery); $this->assertSame([''], $branchQuery->getValues()); } @@ -61,10 +61,8 @@ final class ActivateRulesTest extends TestCase ); $bus = $this->createStub(Bus::class); - $bus->method('dispatch')->willReturnCallback(function () use (&$dispatched) { + $bus->method('dispatch')->willReturnCallback(function () use (&$dispatched): void { $dispatched++; - - return; }); $this->activate($dbForPlatform, deploymentBranch: 'main', bus: $bus);