PHPUnit|Laravel phpunit running only the first test of class test

Viewed 736

Currently, I am trying to run some simple unit tests with phpunit on a laravel project with the command line phpunit tests/Unit/ExampleTest. But it is only running the first method. Anyone has a solution ? Thank you !

namespace Tests\Unit;

use PHPUnit\Framework\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;

class ExampleTest extends TestCase
{
    /**
     * A basic test example.
     *
     * @return void
     */
    public function testBasicTest()
    {
        $this->assertTrue(true);
    }

    /**
     * An other basic test
     *
     * @return void
     */
    public function secondTestBasicTest()
    {
        $this->assertTrue(true);
    }

    public function basicTest(){
        $response = $this->action('GET', 'DepartementsController@display', ['id' => 1]);
        $view = $response->original;
        $this->assertEquals(1, $view['$dpt->iddepartement']);
    }
}
1 Answers
Related