Inheritance: extends Provider
Esempio n. 1
0
 /** @test */
 public function getLatest()
 {
     $news = ['data' => 'news'];
     $response = $this->createApiResponse($news);
     $error = $this->createErrorApiResponse();
     $this->mock->shouldReceive('exec')->once()->andReturn($response);
     $this->mock->shouldReceive('exec')->once()->andReturn($error);
     $this->assertEquals('news', $this->provider->latest());
     $this->assertFalse($this->provider->latest());
 }
Esempio n. 2
0
 /** @test */
 public function it_returns_all_news()
 {
     $this->apiShouldReturnPagination()->apiShouldReturnEmpty();
     $news = $this->provider->all();
     $this->assertIsPaginatedResponse($news);
 }