Anons79 Mini Shell

Directory : /home/aplikasiposinfo/public_html/demo-catatan-keuangan.aplikasipos.info/tests/Feature/
Upload File :
Current File : /home/aplikasiposinfo/public_html/demo-catatan-keuangan.aplikasipos.info/tests/Feature/ApiTest.php

<?php

namespace Tests\Feature;

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

class ApiTest extends TestCase
{
    /**
     * A basic test example.
     *
     * @return void
     */
    public function testLogin()
    {
        $response = $this->post('/login', [
            'email' => '[email protected]',
            'password' => 'password',
        ]);

        $response->assertStatus(200);

        $token = $response->json('token');

        $this->assertNotEmpty($token);

        return $token;
    }

    /**
     * @depends testLogin
     */
    public function testMustProccess($token)
    {
        $response = $this->withHeaders([
            'Authorization' => 'Bearer ' . $token,
        ])->get('/must-proccess');

        $response->assertStatus(200);
    }

    /**
     * @depends testLogin
     */
    public function testFinishProccess($token)
    {
        $response = $this->withHeaders([
            'Authorization' => 'Bearer ' . $token,
        ])->get('/finish-proccess');

        $response->assertStatus(200);
    }

    /**
     * @depends testLogin
     */
    public function testShowMustProccess($token)
    {
        $response = $this->withHeaders([
            'Authorization' => 'Bearer ' . $token,
        ])->get('/must-proccess/1');

        $response->assertStatus(200);
    }

    /**
     * @depends testLogin
     */
    public function testDispotition($token)
    {
        $response = $this->withHeaders([
            'Authorization' => 'Bearer ' . $token,
        ])->post('/dispotition');

        $response->assertStatus(200);
    }

    /**
     * @depends testLogin
     */
    public function testDownloadDoc($token)
    {
        $response = $this->withHeaders([
            'Authorization' => 'Bearer ' . $token,
        ])->get('/download-doc/1');

        $response->assertStatus(200);
    }

    /**
     * @depends testLogin
     */
    public function testCreate($token)
    {
        $response = $this->withHeaders([
            'Authorization' => 'Bearer ' . $token,
        ])->get('/create');

        $response->assertStatus(200);
    }

    /**
     * @depends testLogin
     */
    public function testGetDanaByDevisi($token)
    {
        $response = $this->withHeaders([
            'Authorization' => 'Bearer ' . $token,
        ])->get('/getDanaByDevisi');

        $response->assertStatus(200);
    }

    /**
     * @depends testLogin
     */
    public function testStore($token)
    {
        $response = $this->withHeaders([
            'Authorization' => 'Bearer ' . $token,
        ])->post('/store');

        $response->assertStatus(200);
    }
}

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]