We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c167bf9 commit 5bdd21bCopy full SHA for 5bdd21b
1 file changed
tests/Commands/User/CheckUserEmailExistTest.php
@@ -0,0 +1,25 @@
1
+<?php
2
+
3
+namespace Tests\Commands;
4
5
+use App\User;
6
+use Tests\TestCase;
7
8
+class CheckUserEmailExistTest extends TestCase {
9
+ public function testItFindsEmailInApidbUsersTable() {
10
+ User::factory()->create([
11
+ 'email' => 'user@example.com',
12
+ ]);
13
14
+ // Act & Assert
15
+ $this->artisan('wbs-user:check-email', ['emails' => ['user@example.com']])
16
+ ->expectsOutput('FOUND: user@example.com in apidb.users')
17
+ ->assertExitCode(0);
18
+ }
19
20
+ public function testItReturnsNotFoundIfEmailDoesNotExist() {
21
+ $this->artisan('wbs-user:check-email', ['emails' => ['nonexistent@example.com']])
22
+ ->expectsOutput('NOT FOUND: nonexistent@example.com')
23
24
25
+}
0 commit comments