PHPUNIT testing failing

Posted 7 months ago by nhayder

phpUnit testing

    /** @test */
    public function a_user_can_browse_single_thread()
        $thread = factory('App\Thread')->create();

    $response = $this->get('/threads/', $thread->id);



MacBook-$ ./vendor/phpunit/phpunit/phpunit
PHPUnit 7.1.5 by Sebastian Bergmann and contributors.

.E                                                                  2 / 2 (100%)

Time: 190 ms, Memory: 18.00MB

There was 1 error:

1) Tests\Feature\ThreadsTest::a_user_can_browse_single_thread
TypeError: Argument 2 passed to Illuminate\Foundation\Testing\TestCase::get() must be of the type array, integer given, called in /Applications/MAMP/htdocs/tests/Feature/ThreadsTest.php on line 37


Tests: 2, Assertions: 2, Errors: 1.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.