Skip to content

Commit

Permalink
Unit test to check if a car's make is either ford, honda or toyota
Browse files Browse the repository at this point in the history
  • Loading branch information
sj564 committed Mar 29, 2018
1 parent 58e5c20 commit 4af27e1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/Unit/CarMakeTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace Tests\Unit;

use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
use App\Car;

class CarMakeTest extends TestCase
{

public function testCarMake()
{
$car = Car::find(10);
$car_make=$car->Make;
$this->assertContains($car_make, ['ford', 'honda', 'toyota']);
}

}

0 comments on commit 4af27e1

Please sign in to comment.