コード例 #1
0
 /** @test */
 public function it_queries_pending_stories_by_default_when_not_in_strict_mode()
 {
     Post::$strictModeration = false;
     $posts = $this->createPost([$this->status_column => Status::PENDING], 5);
     $postsIds = $posts->pluck('id')->all();
     $postsReturned = Post::whereIn('id', $postsIds)->get();
     $this->assertCount(5, $postsReturned);
     foreach ($posts as $post) {
         $this->assertTrue($post->{$this->status_column} == Status::PENDING);
     }
 }