fix assertion order

This commit is contained in:
shimon
2025-10-20 18:38:14 +03:00
parent 9be7f4d72c
commit 5f3316ff18
10 changed files with 13 additions and 13 deletions
@@ -248,7 +248,7 @@ class AccountCustomClientTest extends Scope
'includeTotal' => false
]);
$this->assertEquals($sessionsWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $sessionsWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($sessionsWithIncludeTotalFalse['body']);
$this->assertIsArray($sessionsWithIncludeTotalFalse['body']['sessions']);
$this->assertIsInt($sessionsWithIncludeTotalFalse['body']['total']);
@@ -972,7 +972,7 @@ trait DatabasesBase
'includeTotal' => false
]);
$this->assertEquals($attributesWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $attributesWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($attributesWithIncludeTotalFalse['body']);
$this->assertIsArray($attributesWithIncludeTotalFalse['body']['attributes']);
$this->assertIsInt($attributesWithIncludeTotalFalse['body']['total']);
@@ -65,7 +65,7 @@ class DatabasesCustomServerTest extends Scope
'includeTotal' => false
]);
$this->assertEquals($databasesWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $databasesWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($databasesWithIncludeTotalFalse['body']);
$this->assertIsArray($databasesWithIncludeTotalFalse['body']['databases']);
$this->assertIsInt($databasesWithIncludeTotalFalse['body']['total']);
@@ -422,7 +422,7 @@ class DatabasesCustomServerTest extends Scope
'includeTotal' => false
]);
$this->assertEquals($collectionsWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $collectionsWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($collectionsWithIncludeTotalFalse['body']);
$this->assertIsArray($collectionsWithIncludeTotalFalse['body']['collections']);
$this->assertIsInt($collectionsWithIncludeTotalFalse['body']['total']);
@@ -4592,7 +4592,7 @@ class DatabasesCustomServerTest extends Scope
'includeTotal' => false
]);
$this->assertEquals($documentsWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $documentsWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($documentsWithIncludeTotalFalse['body']);
$this->assertIsArray($documentsWithIncludeTotalFalse['body']['documents']);
$this->assertIsInt($documentsWithIncludeTotalFalse['body']['total']);
@@ -65,7 +65,7 @@ class DatabasesCustomServerTest extends Scope
'includeTotal' => false
]);
$this->assertEquals($databasesWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $databasesWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($databasesWithIncludeTotalFalse['body']);
$this->assertIsArray($databasesWithIncludeTotalFalse['body']['databases']);
$this->assertIsInt($databasesWithIncludeTotalFalse['body']['total']);
@@ -386,7 +386,7 @@ class FunctionsCustomClientTest extends Scope
'includeTotal' => false
]);
$this->assertEquals($templatesWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $templatesWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($templatesWithIncludeTotalFalse['body']);
$this->assertIsArray($templatesWithIncludeTotalFalse['body']['templates']);
$this->assertIsInt($templatesWithIncludeTotalFalse['body']['total']);
@@ -423,7 +423,7 @@ class FunctionsCustomServerTest extends Scope
*/
$deploymentsWithIncludeTotalFalse = $this->listDeployments($functionId, ['includeTotal' => false]);
$this->assertEquals($deploymentsWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $deploymentsWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($deploymentsWithIncludeTotalFalse['body']);
$this->assertIsArray($deploymentsWithIncludeTotalFalse['body']['deployments']);
$this->assertIsInt($deploymentsWithIncludeTotalFalse['body']['total']);
@@ -1021,7 +1021,7 @@ class FunctionsCustomServerTest extends Scope
*/
$executionsWithIncludeTotalFalse = $this->listExecutions($data['functionId'], ['includeTotal' => false]);
$this->assertEquals($executionsWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $executionsWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($executionsWithIncludeTotalFalse['body']);
$this->assertIsArray($executionsWithIncludeTotalFalse['body']['executions']);
$this->assertIsInt($executionsWithIncludeTotalFalse['body']['total']);
@@ -644,7 +644,7 @@ trait MessagingBase
'includeTotal' => false
]);
$this->assertEquals($subscribersWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $subscribersWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($subscribersWithIncludeTotalFalse['body']);
$this->assertIsArray($subscribersWithIncludeTotalFalse['body']['subscribers']);
$this->assertIsInt($subscribersWithIncludeTotalFalse['body']['total']);
+1 -1
View File
@@ -389,7 +389,7 @@ trait StorageBase
'includeTotal' => false
]);
$this->assertEquals($filesWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $filesWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($filesWithIncludeTotalFalse['body']);
$this->assertIsArray($filesWithIncludeTotalFalse['body']['files']);
$this->assertIsInt($filesWithIncludeTotalFalse['body']['total']);
+1 -1
View File
@@ -332,7 +332,7 @@ trait TeamsBase
'includeTotal' => false
]);
$this->assertEquals($teamsWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $teamsWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($teamsWithIncludeTotalFalse['body']);
$this->assertIsArray($teamsWithIncludeTotalFalse['body']['teams']);
$this->assertIsInt($teamsWithIncludeTotalFalse['body']['total']);
+1 -1
View File
@@ -808,7 +808,7 @@ trait UsersBase
'includeTotal' => false
]);
$this->assertEquals($usersWithIncludeTotalFalse['headers']['status-code'], 200);
$this->assertEquals(200, $usersWithIncludeTotalFalse['headers']['status-code']);
$this->assertIsArray($usersWithIncludeTotalFalse['body']);
$this->assertIsArray($usersWithIncludeTotalFalse['body']['users']);
$this->assertIsInt($usersWithIncludeTotalFalse['body']['total']);