Guest User

Untitled

a guest
Feb 15th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. namespace TestsBrowser;
  2.  
  3. use AppModelsArticle;
  4. use IlluminateFoundationTestingDatabaseMigrations;
  5. use LaravelDuskBrowser;
  6. use TestsDuskTestCase;
  7.  
  8. class ShowArticleTest extends DuskTestCase
  9. {
  10. use DatabaseMigrations;
  11.  
  12. /** @test */
  13. public function it_shows_all_articles()
  14. {
  15. // Create an article
  16. Article::create([
  17. 'title' => 'My First Article',
  18. 'body' => 'Some body text.'
  19. ]);
  20.  
  21. // Check if the article shows up
  22. $this->browse(function (Browser $browser) {
  23. $browser->visit('/articles')
  24. ->assertSee('My First Article');
  25. });
  26. }
  27. }
  28.  
  29. public function my()
  30. {
  31. Device::all();
  32. }
  33.  
  34. DB_CONNECTION=sqlite
  35. DB_HOST=127.0.0.1
  36. DB_PORT=3306
  37. DB_DATABASE=homestead
  38. DB_USERNAME=homestead
  39. DB_PASSWORD=secret
  40.  
  41. Route::get('articles', 'ArticlesController@all');
Add Comment
Please, Sign In to add comment