1
0
Fork 0
mirror of synced 2024-10-03 19:53:33 +13:00
This commit is contained in:
Damodar Lohani 2023-04-18 07:13:52 +00:00
parent 4719970c93
commit 862312239b

View file

@ -498,7 +498,7 @@ class ProjectsConsoleClientTest extends Scope
$id = $data['projectId'];
/** Get Default Email Template */
$response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/templates/email/verification/en_us', array_merge([
$response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/templates/email/verification/en-us', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()));
@ -508,11 +508,11 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals('Appwrite', $response['body']['senderName']);
$this->assertEquals('team@appwrite.io', $response['body']['senderEmail']);
$this->assertEquals('verification', $response['body']['type']);
$this->assertEquals('en_us', $response['body']['locale']);
$this->assertEquals('en-us', $response['body']['locale']);
$this->assertMatchesRegularExpression('/<!doctype html>/', $response['body']['message']);
/** Update Email template */
$response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/templates/email/verification/en_us', array_merge([
$response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/templates/email/verification/en-us', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
@ -527,11 +527,11 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals('Appwrite Custom', $response['body']['senderName']);
$this->assertEquals('custom@appwrite.io', $response['body']['senderEmail']);
$this->assertEquals('verification', $response['body']['type']);
$this->assertEquals('en_us', $response['body']['locale']);
$this->assertEquals('en-us', $response['body']['locale']);
$this->assertEquals('Please verify your email {{url}}', $response['body']['message']);
/** Get Updated Email Template */
$response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/templates/email/verification/en_us', array_merge([
$response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/templates/email/verification/en-us', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()));
@ -541,22 +541,22 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals('Appwrite Custom', $response['body']['senderName']);
$this->assertEquals('custom@appwrite.io', $response['body']['senderEmail']);
$this->assertEquals('verification', $response['body']['type']);
$this->assertEquals('en_us', $response['body']['locale']);
$this->assertEquals('en-us', $response['body']['locale']);
$this->assertEquals('Please verify your email {{url}}', $response['body']['message']);
/** Get Default SMS Template */
$response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/templates/sms/verification/en_us', array_merge([
$response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/templates/sms/verification/en-us', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()));
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertEquals('verification', $response['body']['type']);
$this->assertEquals('en_us', $response['body']['locale']);
$this->assertEquals('en-us', $response['body']['locale']);
$this->assertEquals('{{token}}', $response['body']['message']);
/** Update SMS template */
$response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/templates/sms/verification/en_us', array_merge([
$response = $this->client->call(Client::METHOD_PATCH, '/projects/' . $id . '/templates/sms/verification/en-us', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
@ -565,18 +565,18 @@ class ProjectsConsoleClientTest extends Scope
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertEquals('verification', $response['body']['type']);
$this->assertEquals('en_us', $response['body']['locale']);
$this->assertEquals('en-us', $response['body']['locale']);
$this->assertEquals('Please verify your email {{token}}', $response['body']['message']);
/** Get Updated SMS Template */
$response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/templates/sms/verification/en_us', array_merge([
$response = $this->client->call(Client::METHOD_GET, '/projects/' . $id . '/templates/sms/verification/en-us', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()));
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertEquals('verification', $response['body']['type']);
$this->assertEquals('en_us', $response['body']['locale']);
$this->assertEquals('en-us', $response['body']['locale']);
$this->assertEquals('Please verify your email {{token}}', $response['body']['message']);
return $data;