@@ -133,6 +133,48 @@ public function testRemove()
133133 $ this ->assertSame ($ expected , $ api ->remove (1 ));
134134 }
135135
136+ public function testEnable ()
137+ {
138+ $ expected = [
139+ 'id ' => 1 ,
140+ 'type ' => 'composer-repo ' ,
141+ 'name ' => $ name = 'Customer ' ,
142+ 'urlName ' => 'customer ' ,
143+ 'accessToVersionControlSource ' => false ,
144+ 'enabled ' => true ,
145+ ];
146+
147+ /** @var Customers&\PHPUnit_Framework_MockObject_MockObject $api */
148+ $ api = $ this ->getApiMock ();
149+ $ api ->expects ($ this ->once ())
150+ ->method ('put ' )
151+ ->with ($ this ->equalTo ('/customers/1/enable ' ))
152+ ->willReturn ($ expected );
153+
154+ $ this ->assertSame ($ expected , $ api ->enable (1 ));
155+ }
156+
157+ public function testDisable ()
158+ {
159+ $ expected = [
160+ 'id ' => 1 ,
161+ 'type ' => 'composer-repo ' ,
162+ 'name ' => $ name = 'Customer ' ,
163+ 'urlName ' => 'customer ' ,
164+ 'accessToVersionControlSource ' => false ,
165+ 'enabled ' => false ,
166+ ];
167+
168+ /** @var Customers&\PHPUnit_Framework_MockObject_MockObject $api */
169+ $ api = $ this ->getApiMock ();
170+ $ api ->expects ($ this ->once ())
171+ ->method ('put ' )
172+ ->with ($ this ->equalTo ('/customers/1/disable ' ))
173+ ->willReturn ($ expected );
174+
175+ $ this ->assertSame ($ expected , $ api ->disable (1 ));
176+ }
177+
136178 public function testListPackages ()
137179 {
138180 $ expected = [
0 commit comments