PHPUNIT testing failing

Posted 4 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.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.