0
votes

I use Laravel 5.8 and phphunit version 7.5. When I run PHPUnit with error, show me error but when not has error show me only this line

PHPUnit 7.5.0 by Sebastian Bergmann and contributors. My test class:

use Tests\TestCase;

class leadTest extends TestCase
{
    public $Array= ['lead_name' => 'Jon','lead_family'=>'Doe'];
    public function test_store()
    {
        $this->withoutExceptionHandling();
        $this->post('leads', $this->Array());
        $this->assertDatabaseHas('leads', $this->Array);
    }
}
1
you have a syntax error, you should fix itlagbox
You missed a bracket $this->post('leads', $this->Array();devfaysal
I edit my post. My problem is not it. Dose not show me success alert.(green alert)paranoid
you are now calling a method that doesn't existlagbox
how are you running phpunit and where does this class exist?lagbox

1 Answers

1
votes

That is the reason of your error:

$this->withoutExceptionHandling();

Try without it.

Look also at class name it should be: LeadTest, and the file should be named LeadTest.php