Repository: appwrite/appwrite
File: tests/e2e/Services/Sites/SitesCustomServerTest.php (PHP)

Code before:
            'buildRuntime' => 'node-22',
            'outputDirectory' => './',
        ]);
        $this->assertNotEmpty($siteId);

        $site = $this->getSite($siteId);
        $this->assertEquals('200', $site['headers']['status-code']);
        $this->assertArrayHasKey('adapter', $site['body']);
        $this->assertEmpty($site['body']['adapter']);

        $domain = $this->setupSiteDomain($siteId);
        $this->assertNotEmpty($domain);

        $deployment = $this->createDeployment($siteId, [
            'code' => $this->packageSite('empty'),
            'activate' => true
        ]);
        $this->assertEquals(202, $deployment['headers']['status-code']);

        $deploymentId = $deployment['body']['$id'];
        $this->assertNotEmpty($deploymentId);

        $this->assertEventually(function () use ($siteId, $deploymentId) {
            $deployment = $this->getDeployment($siteId, $deploymentId);
            $this->assertEquals('failed', $deployment['body']['status'], 'Deployment status is failed, deployment: ' . json_encode($deployment['body'], JSON_PRETTY_PRINT));
            $this->assertStringContainsString("ERROR: No source code found. Please ensure your source directory exists and isn't empty.", $deployment['body']['buildLogs']);
        }, 100000, 500);

        $this->cleanupSite($siteId);
    }
}


Review comment (bug):
```suggestion
```

We can avoid assertion for copy, checking it fails is good enough

Code after:

        $user = $this->client->call(Client::METHOD_PATCH, '/account/status', array_merge([
            'origin' => 'http://localhost',
            'content-type' => 'application/json',
            'cookie' => $cookie,
            'x-appwrite-project' => 'console',
        ]), []);
        $this->assertEquals(200, $user['headers']['status-code']);
        $this->assertFalse($user['body']['status']);

        $response = $proxyClient->call(Client::METHOD_GET, '/contact', headers: [
            'cookie' => 'a_jwt_console=' . $jwt['body']['jwt']
        ], followRedirects: false);
        $this->assertEquals(301, $response['headers']['status-code']);
        $this->assertStringContainsString('/console/auth/preview', $response['headers']['location']);

        // Failure: Membership missing
        $email = \uniqid() . 'newuser@appwrite.io';
        $user = $this->client->call(Client::METHOD_POST, '/account', [
            'origin' => 'http://localhost',
            'content-type' => 'application/json',
            'x-appwrite-project' => 'console',
        ], [
            'userId' => ID::unique(),
            'email' => $email,
            'password' => 'password'
        ]);
        $this->assertEquals(201, $user['headers']['status-code']);

        $session = $this->client->call(Client::METHOD_POST, '/account/sessions/email', [
            'origin' => 'http://localhost',
            'content-type' => 'application/json',
            'x-appwrite-project' => 'console',
        ], [
            'email' => $email,
            'password' => 'password',
        ]);
        $this->assertEquals(201, $session['headers']['status-code']);
        $this->assertNotEmpty($session['cookies']['a_session_console']);
        $cookie = 'a_session_console=' . $session['cookies']['a_session_console'];

        $jwt = $this->client->call(Client::METHOD_POST, '/account/jwts', array_merge([
            'origin' => 'http://localhost',
            'content-type' => 'application/json',
            'cookie' => $cookie,
            'x-appwrite-project' => 'console',
        ]), []);
        $this->assertEquals(201, $jwt['headers']['status-code']);
        $this->assertNotEmpty($jwt['body']['jwt']);

        $response = $proxyClient->call(Client::METHOD_GET, '/contact', headers: [