Skip to content

Commit 8636d7d

Browse files
committed
Revert "Tests: project members all"
This reverts commit 3ec9c85.
1 parent f7f82c0 commit 8636d7d

File tree

1 file changed

+0
-116
lines changed

1 file changed

+0
-116
lines changed

test/Gitlab/Tests/Api/ProjectsTest.php

Lines changed: 0 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -662,122 +662,6 @@ public function shouldGetMembersWithPagination()
662662
$this->assertEquals($expectedArray, $api->members(1, array('page' => 2, 'per_page' => 15)));
663663
}
664664

665-
/**
666-
* Get expected array for tests which check project members all
667-
*
668-
* @return array
669-
* Project issues list.
670-
*/
671-
public function getMembersAllExpectedArray()
672-
{
673-
return [
674-
[
675-
"id" => 1,
676-
"username" => "raymond_smith",
677-
"name" => "Raymond Smith",
678-
"state" => "active",
679-
"avatar_url" => "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
680-
"web_url" => "http://192.168.1.8:3000/root",
681-
"expires_at" => "2012-10-22T14:13:35Z",
682-
"access_level" => 30
683-
],
684-
[
685-
"id" => 2,
686-
"username" => "john_doe",
687-
"name" => "John Doe",
688-
"state" => "active",
689-
"avatar_url" => "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
690-
"web_url" => "http://192.168.1.8:3000/root",
691-
"expires_at" => "2012-10-22T14:13:35Z",
692-
"access_level" => 40
693-
],
694-
[
695-
"id" => 3,
696-
"username" => "mr_admin",
697-
"name" => "Mr Admin",
698-
"state" => "active",
699-
"avatar_url" => "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
700-
"web_url" => "http://192.168.1.8:3000/root",
701-
"expires_at" => "2012-11-22T14:13:35Z",
702-
"access_level" => 50
703-
]
704-
];
705-
}
706-
707-
/**
708-
* @test
709-
*/
710-
public function shouldGetMembersAll()
711-
{
712-
$expectedArray = $this->getMembersAllExpectedArray();
713-
714-
$api = $this->getApiMock();
715-
$api->expects($this->once())
716-
->method('get')
717-
->with('projects/1/members/all')
718-
->will($this->returnValue($expectedArray))
719-
;
720-
721-
$this->assertEquals($expectedArray, $api->membersAll(1));
722-
}
723-
724-
/**
725-
* @test
726-
*/
727-
public function shouldGetMembersAllWithQuery()
728-
{
729-
$expectedmMembersAllArray = $this->getMembersAllExpectedArray();
730-
$expectedArray = array(
731-
$expectedmMembersAllArray[0]
732-
);
733-
734-
$api = $this->getApiMock();
735-
$api->expects($this->once())
736-
->method('get')
737-
->with('projects/1/members/all', array('query' => 'at'))
738-
->will($this->returnValue($expectedArray))
739-
;
740-
741-
$this->assertEquals($expectedArray, $api->membersAll(1, 'at'));
742-
}
743-
744-
/**
745-
* @test
746-
*/
747-
public function shouldGetMembersAllWithNullQuery()
748-
{
749-
$expectedArray = $this->getMembersAllExpectedArray();
750-
751-
$api = $this->getApiMock();
752-
$api->expects($this->once())
753-
->method('get')
754-
->with('projects/1/members/all')
755-
->will($this->returnValue($expectedArray))
756-
;
757-
758-
$this->assertEquals($expectedArray, $api->membersAll(1, null));
759-
}
760-
761-
/**
762-
* @test
763-
*/
764-
public function shouldGetMembersAllWithPagination()
765-
{
766-
$expectedArray = $this->getMembersAllExpectedArray();
767-
768-
$api = $this->getApiMock();
769-
$api->expects($this->once())
770-
->method('get')
771-
->with('projects/1/members/all', array(
772-
'page' => 2,
773-
'per_page' => 15
774-
))
775-
->will($this->returnValue($expectedArray))
776-
;
777-
778-
$this->assertEquals($expectedArray, $api->membersAll(1, array('page' => 2, 'per_page' => 15)));
779-
}
780-
781665
/**
782666
* @test
783667
*/

0 commit comments

Comments
 (0)