forUser() public method

Get boards for user by username.
public forUser ( string $username ) : array | boolean
$username string
return array | boolean
 /** @test */
 public function it_should_return_boards_for_specific_user()
 {
     $boards = 'boards';
     $userName = '******';
     $this->apiShouldReturnData($boards)->assertEquals($boards, $this->provider->forUser($userName));
     $this->apiShouldReturnEmpty()->assertFalse($this->provider->forUser($userName));
 }
Example #2
0
 public function testGetBoardForUser()
 {
     $boards = ['data' => 'boards'];
     $response = $this->createApiResponse($boards);
     $this->mock->expects($this->at(0))->method('exec')->willReturn($response);
     $this->assertEquals($boards['data'], $this->provider->forUser(1));
     $this->assertFalse($this->provider->forUser(1));
 }
Example #3
0
 /** @test */
 public function getBoardsForSpecifiedUser()
 {
     $boards = ['data' => 'boards'];
     $response = $this->createApiResponse($boards);
     $this->mock->shouldReceive('exec')->once()->andReturn($response);
     $this->mock->shouldReceive('exec')->once()->andReturnNull();
     $this->assertEquals($boards['data'], $this->provider->forUser(1));
     $this->assertFalse($this->provider->forUser(1));
 }