Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. namespace TestsFeatureAuth;
  5.  
  6. use IlluminateFoundationTestingRefreshDatabase;
  7. use LaravelPassportClient;
  8. use TestsTestCase;
  9. use AppDirectory;
  10. use AppEvent;
  11.  
  12. class AuthTest extends TestCase
  13. {
  14. use RefreshDatabase;
  15. /**
  16. * @test
  17. */
  18. public function can_authenticate()
  19. {
  20. $response = $this->json('POST', '/auth/token', [
  21. 'email' => $this->create('User', [], false)->email,
  22. 'password' => 'secret'
  23. ]);
  24. $response->assertStatus(200)
  25. ->assertJsonStructure(['token']);
  26. }
  27. }
  28.  
  29. Error : Call to undefined method TestsFeatureAuthAuthTest::create()
  30. /home/amine/Apps/PassportV2/tests/Feature/Auth/AuthTest.php:28
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement