Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Laravel Integration Testing

Laravel Integration Testing

Slides of Laravel Integration Testing talk at Laravel Chennai Meetup #3

Fareez Ahamed

January 31, 2016
Tweet

More Decks by Fareez Ahamed

Other Decks in Programming

Transcript

  1. class ExampleTest extends TestCase { /** * A basic functional

    test example. * @return void */ public function testBasicExample() { $this->visit('/') ->see('Laravel 5') ->dontSee('Rails'); } }
  2. Not a complete test framework Doesn’t run a headless browser

    Doesn’t test on real browser Doesn’t test Javascript
  3. public function test_create_quotation_with_new_btn() { $id = '897564'; $this->post('/api/v1/quotation',['id' => $id])

    ->seeJson([ "message" => 'Successfully Created' ]) ->seeInDatabase('quotations',['id' => $id]); }