Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace TestsBrowser;
- use AppModelsArticle;
- use IlluminateFoundationTestingDatabaseMigrations;
- use LaravelDuskBrowser;
- use TestsDuskTestCase;
- class ShowArticleTest extends DuskTestCase
- {
- use DatabaseMigrations;
- /** @test */
- public function it_shows_all_articles()
- {
- // Create an article
- Article::create([
- 'title' => 'My First Article',
- 'body' => 'Some body text.'
- ]);
- // Check if the article shows up
- $this->browse(function (Browser $browser) {
- $browser->visit('/articles')
- ->assertSee('My First Article');
- });
- }
- }
- public function my()
- {
- Device::all();
- }
- DB_CONNECTION=sqlite
- DB_HOST=127.0.0.1
- DB_PORT=3306
- DB_DATABASE=homestead
- DB_USERNAME=homestead
- DB_PASSWORD=secret
- Route::get('articles', 'ArticlesController@all');
Add Comment
Please, Sign In to add comment