Skip to content

Instantly share code, notes, and snippets.

@devmsh
Created December 18, 2018 12:46
Show Gist options
  • Select an option

  • Save devmsh/f789a15c43d81fdad3828b585afc29d4 to your computer and use it in GitHub Desktop.

Select an option

Save devmsh/f789a15c43d81fdad3828b585afc29d4 to your computer and use it in GitHub Desktop.
MultipleMobileTest.php
<?php
class MultipleMobileTest extends TestCase
{
public function test_user_can_add_new_mobile()
{
$unverifiedUser = $this->newUnverifiedUser([
'mobile' => '970567940999'
]);
$user = $this->newVerifiedUser();
$response = $this->postJson('api/user/mobiles', [
'mobile' => '970567940999',
]);
$response->assertSuccessful();
$this->assertCount(2, $user->mobiles);
$this->assertNull($unverifiedUser->fresh());
Notification::assertSentTo($user, CheckInvitationsNotification::class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment