Skip to content

Commit a14f2f9

Browse files
committed
Fix emulator tests
1 parent c6e6ce2 commit a14f2f9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@
122122
"Composer\\Config::disableProcessTimeout",
123123
"XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html=.build/coverage"
124124
],
125+
"test-emulator": [
126+
"FIREBASE_AUTH_EMULATOR_HOST=localhost:9099 FIREBASE_DATABASE_EMULATOR_HOST=localhost:9100 firebase emulators:exec --only auth,database --project beste-firebase 'XDEBUG_MODE=coverage vendor/bin/phpunit --group=emulator'"
127+
],
125128
"test-units": [
126129
"vendor/bin/phpunit --testsuite=unit"
127130
],

tests/Integration/AuthTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function getEmailVerificationLink(): void
107107

108108
try {
109109
$link = $this->auth->getEmailVerificationLink($user->email);
110-
$this->assertMatchesRegularExpression('~^https://.+/.+auth/action\?mode=verifyEmail&oobCode=.+&lang=.+~', $link);
110+
$this->assertMatchesRegularExpression('~^https?://.+/action\?mode=verifyemail~i', $link);
111111
} finally {
112112
$this->auth->deleteUser($user->uid);
113113
}
@@ -158,7 +158,7 @@ public function getPasswordResetLink(): void
158158

159159
try {
160160
$link = $this->auth->getPasswordResetLink($user->email);
161-
$this->assertMatchesRegularExpression('~^https://.+/.+auth/action\?mode=resetPassword&oobCode=.+&lang=.+~', $link);
161+
$this->assertMatchesRegularExpression('~^https?://.+/action\?mode=resetpassword~i', $link);
162162
} finally {
163163
$this->auth->deleteUser($user->uid);
164164
}
@@ -187,7 +187,7 @@ public function getSignInWithEmailLink(): void
187187

188188
try {
189189
$link = $this->auth->getSignInWithEmailLink($user->email);
190-
$this->assertMatchesRegularExpression('~^https://.+/.+auth/action\?mode=signIn&oobCode=.+&lang=.+~', $link);
190+
$this->assertMatchesRegularExpression('~^https?://.+/action\?mode=signin~i', $link);
191191
} finally {
192192
$this->auth->deleteUser($user->uid);
193193
}

0 commit comments

Comments
 (0)