Skip to content

Commit de4eeb4

Browse files
author
guillermo-fisher
committed
Added a convenience method to the Enterprise class.
1 parent 6bed128 commit de4eeb4

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

lib/Github/Api/Enterprise.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Github\Api;
44

5+
use Github\Api\Enterprise\ManagementConsole;
56
use Github\Api\Enterprise\Stats;
67
use Github\Api\Enterprise\License;
78

@@ -29,4 +30,12 @@ public function license()
2930
{
3031
return new License($this->client);
3132
}
33+
34+
/**
35+
* @return ManagementConsole
36+
*/
37+
public function console()
38+
{
39+
return new ManagementConsole($this->client);
40+
}
3241
}

test/Github/Tests/Api/EnterpriseTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,18 @@ public function shouldGetEnterpriseLicenseApiObject()
3030
$this->assertInstanceOf('Github\Api\Enterprise\License', $api->license());
3131
}
3232

33+
/**
34+
* @test
35+
*/
36+
public function shouldGetEnterpriseManagementConsoleApiObject()
37+
{
38+
$api = $this->getApiMock();
39+
40+
$this->assertInstanceOf('Github\Api\Enterprise\ManagementConsole', $api->console());
41+
}
42+
3343
protected function getApiClass()
3444
{
3545
return 'Github\Api\Enterprise';
3646
}
3747
}
38-

0 commit comments

Comments
 (0)