fix: make testCreatePhoneVerification self-contained

Remove @depends annotation and set up phone number within the test
to ensure it works with PHPUnit 12 and paratest parallel execution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jake Barnby
2026-02-05 01:33:01 +13:00
parent 6f6ea94a19
commit 2e061e2f2b
+15 -1
View File
@@ -116,7 +116,6 @@ class AccountTest extends Scope
}
/**
* @depends testUpdateAccountPhone
* @return array
* @throws \Exception
*/
@@ -124,6 +123,21 @@ class AccountTest extends Scope
{
$projectId = $this->getProject()['$id'];
// Ensure phone is set up for this test to be self-contained
$phoneQuery = $this->getQuery(self::UPDATE_ACCOUNT_PHONE);
$phonePayload = [
'query' => $phoneQuery,
'variables' => [
'phone' => '+123456789',
'password' => 'password',
]
];
$this->client->call(Client::METHOD_POST, '/graphql', \array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $projectId,
], $this->getHeaders()), $phonePayload);
$query = $this->getQuery(self::CREATE_PHONE_VERIFICATION);
$graphQLPayload = [
'query' => $query,