mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-19 12:34:06 +00:00
70 lines
1.9 KiB
PHP
70 lines
1.9 KiB
PHP
<?php
|
|
|
|
namespace Tests\Unit;
|
|
|
|
use Tests\TestCase;
|
|
use Illuminate\Foundation\Testing\WithFaker;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Illuminate\Http\UploadedFile;
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
class CompanyTest extends TestCase
|
|
{
|
|
/**
|
|
* A basic test example.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function testExample()
|
|
{
|
|
$this->assertTrue(true);
|
|
}
|
|
|
|
// public function testPOST()
|
|
// {
|
|
// $response = $this->json('POST', '/api/company', [
|
|
// 'company_name'=>'testing',
|
|
// 'registration_no'=>'testing',
|
|
// 'tax_no'=>'testing',
|
|
// 'tel_no'=>'12345',
|
|
// 'fax'=>'12345',
|
|
// 'address'=>'testing',
|
|
// 'city'=>'testing',
|
|
// 'postcode'=>'testing',
|
|
// 'state'=>'testing',
|
|
// 'country'=>'testing',
|
|
// 'contact_person'=>'testing',
|
|
// ]);
|
|
// var_dump($response);
|
|
// $response->assertStatus(302);
|
|
// }
|
|
|
|
// public function testPUT()
|
|
// {
|
|
// $response = $this->json('PUT', '/api/company/4', [
|
|
// 'company_name'=>'changed testing',
|
|
// 'registration_no'=>'testing',
|
|
// 'tax_no'=>'testing',
|
|
// 'tel_no'=>'12345',
|
|
// 'fax'=>'12345',
|
|
// 'address'=>'testing',
|
|
// 'city'=>'testing',
|
|
// 'postcode'=>'testing',
|
|
// 'state'=>'testing',
|
|
// 'country'=>'testing',
|
|
// 'contact_person'=>'testing',
|
|
// ]);
|
|
// $response->assertStatus(200);
|
|
// }
|
|
public function testcompanyProfile()
|
|
{
|
|
Storage::fake('company_profile');
|
|
|
|
$response = $this->json('POST', '/company/company_profile/4', [
|
|
'company_profile' => UploadedFile::fake()->image('comp.jpg')
|
|
]);
|
|
var_dump($response);
|
|
$response->assertStatus(200);
|
|
}
|
|
}
|