Guest User

Untitled

a guest
Mar 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Tests\Unit;
  4.  
  5. use Tests\TestCase;
  6.  
  7. class ArticleApiUnitTest extends TestCase
  8. {
  9. public function it_can_create_an_article()
  10. {
  11. $data = [
  12. 'title' => $this->faker->sentence,
  13. 'content' => $this->faker->paragraph
  14. ];
  15.  
  16. $this->post(route('articles.store'), $data)
  17. ->dump()
  18. ->assertStatus(201)
  19. ->assertJson($data);
  20. }
  21. }
Add Comment
Please, Sign In to add comment