Skip to content

Commit

Permalink
add users api
Browse files Browse the repository at this point in the history
  • Loading branch information
Seretos committed Oct 17, 2018
1 parent 6500be8 commit ffccb8a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ public static function create(string $url, string $user, string $password){
return new self($connector);
}

/**
* @return string
*/
public function getUser(){
return $this->connector->get_user();
}

public function projects(){
return new Projects($this->connector);
}
Expand Down
9 changes: 9 additions & 0 deletions tests/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ protected function setUp()
$this->client = new Client($this->mockConnector);
}

/**
* @test
*/
public function getUser(){
$this->mockConnector->expects($this->once())->method('get_user')->will($this->returnValue('testUser'));

$this->assertSame('testUser',$this->client->getUser());
}

/**
* @test
*/
Expand Down

0 comments on commit ffccb8a

Please sign in to comment.