tests/Feature/Admin/ManagePostsControllerTest.php
/**
     * Test that new blog posts can be stored.
     */
Test that new blog posts can be stored.
Test that new blog posts can be stored .
public function testStore(): void
    {
        $this->beAdminUser();
        $params = [
            'posted_at' => null,
            'title' => $this->faker->sentence,
            'subtitle' => null,
            'post_body' => $this->faker->paragraph,
            'meta_desc' => $this->faker->paragraph,
            'short_description' => $this->faker->paragraph,
        ];
        $response = $this->post(route('blogetc.admin.store_post'), $params);
        $response->assertRedirect()->assertSessionDoesntHaveErrors();
        $this->assertDatabaseHas('blog_etc_posts', $params);
    }
public function testStore ( ) : void { $ this -> beAdminUser ( ) ; $ params = [ 'posted_at' => null , 'title' => $ this -> faker -> sentence , 'subtitle' => null , 'post_body' => $ this -> faker -> paragraph , 'meta_desc' => $ this -> faker -> paragraph , 'short_description' => $ this -> faker -> paragraph , ] ; $ response = $ this -> post ( route ( 'blogetc.admin.store_post' ) , $ params ) ; $ response -> assertRedirect ( ) -> assertSessionDoesntHaveErrors ( ) ; $ this -> assertDatabaseHas ( 'blog_etc_posts' , $ params ) ; }
Test that new blog posts can be stored.
Test that new blog posts can be stored .