appwrite/tests/e2e/Scopes/SideClient.php
Damodar Lohani 6f3c60d462 fix tests
2024-12-15 10:25:22 +00:00

27 lines
588 B
PHP

<?php
namespace Tests\E2E\Scopes;
trait SideClient
{
public function getHeaders(bool $devKey = true): array
{
$headers = [
'origin' => 'http://localhost',
'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $this->getUser()['session'],
];
if ($devKey && isset($this->getProject()['devKey'])) {
$headers['x-appwrite-dev-key'] = $this->getProject()['devKey'];
}
return $headers;
}
/**
* @return string
*/
public function getSide()
{
return 'client';
}
}