nickywan123
1 week ago
123
8
Laravel

this test did not perform any assertions

Posted 1 week ago by nickywan123

I created this test case:

   /**
     *  @test
     * */
    public function unauthenticated_users_may_not_add_reply(){
        //$this->expectException('Illuminate\Auth\AuthenticationException');
        $thread = factory('App\Thread')->create();
        $reply = factory('App\Reply')->create();

        $this->post($thread->path().'/replies', $reply->toArray());
       
    }

Running php artisan test gives me a warning/error saying this test did not perform any assertions. I would assume it failed the test case, how do I make the test case pass without using assertion where it is not needed?

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