public function testGetBoardInfo() { $response = $this->createApiResponse(['data' => 'info']); $this->mock->expects($this->at(0))->method('exec')->willReturn($response); $this->assertEquals('info', $this->provider->info('username', 'board')); $this->assertFalse($this->provider->info('username', 'board')); }
/** @test */ public function getBoardInfo() { $response = $this->createApiResponse(['data' => 'info']); $this->mock->shouldReceive('exec')->once()->andReturn($response); $this->mock->shouldReceive('exec')->once()->andReturnNull(); $this->assertEquals('info', $this->provider->info('username', 'board')); $this->assertFalse($this->provider->info('username', 'board')); }
/** @test */ public function it_should_return_board_info() { $boardInfo = 'info'; $this->apiShouldReturnData($boardInfo)->assertEquals($boardInfo, $this->provider->info('username', 'board')); $this->apiShouldReturnEmpty()->assertFalse($this->provider->info('username', 'board')); }