Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. APP_ENV=local
  2. APP_KEY=base64:K8otIkxJk0rFsZYSEq1hwBuaxQX3QI3Bb7ZmemJRIWg=
  3. APP_DEBUG=true
  4. APP_LOG_LEVEL=debug
  5. APP_URL=http://localhost:8000
  6.  
  7. DB_CONNECTION=mysql
  8. DB_HOST=127.0.0.1
  9. DB_PORT=3306
  10. DB_DATABASE=laravel_dusk
  11. DB_USERNAME=root
  12. DB_PASSWORD=123456
  13.  
  14. APP_ENV=local
  15. APP_KEY=base64:K8otIkxJk0rFsZYSEq1hwBuaxQX3QI3Bb7ZmemJRIWg=
  16. APP_DEBUG=true
  17. APP_LOG_LEVEL=debug
  18. APP_URL=http://localhost:8000
  19.  
  20. DB_CONNECTION=mysql
  21. DB_HOST=127.0.0.1
  22. DB_PORT=3306
  23. DB_DATABASE=laravel_dusk_test
  24. DB_USERNAME=root
  25. DB_PASSWORD=123456
  26.  
  27. namespace TestsBrowser;
  28.  
  29. use IlluminateFoundationTestingDatabaseMigrations;
  30. use IlluminateSupportFacadesApp;
  31. use TestsDuskTestCase;
  32.  
  33. class LoginTest extends DuskTestCase
  34. {
  35.  
  36.  
  37. use DatabaseMigrations;
  38. /**
  39. * A Dusk test example.
  40. *
  41. * @return void
  42. */
  43. public function testLogin()
  44. {
  45. $user = factory(AppUser::class)->create(['email' => 'lucas@example.com']);
  46.  
  47. $this->browse(function ($browser) use ($user) {
  48. $browser->visit('/login')
  49. ->type('email', $user->email)
  50. ->type('password', 'secret')
  51. ->press('Login')
  52. ->assertPathIs('/home');
  53. });
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement