You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
618 B
32 lines
618 B
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Illuminate\Foundation\Testing\WithFaker;
|
|
use Tests\TestCase;
|
|
|
|
use App\Models\Company;
|
|
|
|
class CompanyTest extends TestCase
|
|
{
|
|
public function testIsExistForExistingCompany()
|
|
{
|
|
$name = 'testCompany';
|
|
$id = Company::where('name', $name)->first()->id;
|
|
|
|
$isExist = Company::isExist($id);
|
|
|
|
$this->assertTrue($isExist);
|
|
}
|
|
|
|
public function testIsExistForNonExistingCompany()
|
|
{
|
|
$id = 1234;
|
|
|
|
$isExist = Company::isExist($id);
|
|
|
|
$this->assertFalse($isExist);
|
|
}
|
|
}
|