/**
  * Check if the application can create a client and persist the data in database.
  *
  * @test
  */
 public function test_create_and_persist_client()
 {
     $client = Client::create(['name' => 'Client Test', 'email' => '*****@*****.**', 'active' => true]);
     $this->assertEquals('Client Test', $client->name);
     $client = Client::all()->first();
     $this->assertEquals('Client Test', $client->name);
 }
 public function test_down()
 {
     $this->setExpectedException('PDOException');
     $this->migrate();
     $client = Client::create(['name' => 'Client Test', 'email' => '*****@*****.**', 'active' => true]);
     $this->migrateRollback();
     $this->dontSeeInDatabase('gtw_clients', ['email' => '*****@*****.**']);
 }
 public function test_index()
 {
     $client = Client::create(['name' => 'Client Test', 'email' => '*****@*****.**', 'active' => true]);
     $this->visit('/clients')->see('*****@*****.**');
 }
 public function index()
 {
     $clients = Client::all();
     return view('gtwclient::index', compact('clients'));
 }