tests/Feature/Admin/ManagePostsControllerTest.php
/**
     * Test 404 response when deleting invalid post ID.
     */
Test 404 response when deleting invalid post ID.
Test 404 response when deleting invalid post ID .
public function testDestroyInvalidPostID(): void
    {
        $this->beAdminUser();
        $invalidPostID = 999;
        $response = $this->delete(route('blogetc.admin.destroy_post', $invalidPostID));
        $response->assertNotFound();
    }
public function testDestroyInvalidPostID ( ) : void { $ this -> beAdminUser ( ) ; $ invalidPostID = 999 ; $ response = $ this -> delete ( route ( 'blogetc.admin.destroy_post' , $ invalidPostID ) ) ; $ response -> assertNotFound ( ) ; }
Test 404 response when deleting invalid post ID.
Test 404 response when deleting invalid post ID .