2016-03-25 01:18:05 -07:00
|
|
|
<?php
|
|
|
|
use App\Models\Manufacturer;
|
|
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
|
|
|
|
|
|
class ManufacturerTest extends \Codeception\TestCase\Test
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var \UnitTester
|
|
|
|
*/
|
|
|
|
protected $tester;
|
|
|
|
use DatabaseMigrations;
|
|
|
|
|
2017-06-12 17:39:03 -07:00
|
|
|
protected function _before()
|
|
|
|
{
|
|
|
|
Artisan::call('migrate');
|
|
|
|
}
|
|
|
|
|
2016-03-25 01:18:05 -07:00
|
|
|
public function testManufacturerAdd()
|
|
|
|
{
|
2017-06-12 17:39:03 -07:00
|
|
|
$manufacturers = factory(Manufacturer::class)->make();
|
2016-03-25 01:18:05 -07:00
|
|
|
$values = [
|
|
|
|
'name' => $manufacturers->name,
|
|
|
|
];
|
|
|
|
|
|
|
|
Manufacturer::create($values);
|
|
|
|
$this->tester->seeRecord('manufacturers', $values);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|