Make sure you're telling PHPUnit about the test. Either with a doc block or prefixing the function with test_
Doc Block:
/* @test */
I added a new test to one of my test files, and all the other tests run fine as does running all tests but when I run just the specific test via vendor/bin/phpunit --filter only_the_validated_fields_are_set_when_creating_a_thread the test doesnt run and I jsut get a No tests executed! message.
function only_the_validated_fields_are_set_when_creating_a_thread()
{
$this->withExceptionHandling()->signIn();
$thread = make('App\Thread', ['title' => 'Test Title']);
$thread['slug'] = 'Mass Assigned';
$thread['id'] = 999;
$response = $this->post(route('threads'), $thread->toArray());
$this->get($response->headers->get('Location'))
->assertSee('Test Title');
$thread = \App\Thread::first();
$this->assertEquals($thread->title, 'Test Title');
$this->assertEquals($thread->slug, 'test-title');
$this->assertEquals($thread->id, 1);
}
Make sure you're telling PHPUnit about the test. Either with a doc block or prefixing the function with test_
Doc Block:
/* @test */
Please or to participate in this conversation.