File tree 2 files changed +0
-68
lines changed
lib/Github/Api/CurrentUser
test/Github/Tests/Api/CurrentUser 2 files changed +0
-68
lines changed Original file line number Diff line number Diff line change @@ -57,27 +57,6 @@ public function create(array $params)
57
57
return $ this ->post ('/user/keys ' , $ params );
58
58
}
59
59
60
- /**
61
- * Updates deploy key for the authenticated user.
62
- *
63
- * @link http://developer.github.com/v3/repos/keys/
64
- *
65
- * @param string $id
66
- * @param array $params
67
- *
68
- * @throws \Github\Exception\MissingArgumentException
69
- *
70
- * @return array
71
- */
72
- public function update ($ id , array $ params )
73
- {
74
- if (!isset ($ params ['title ' ], $ params ['key ' ])) {
75
- throw new MissingArgumentException (array ('title ' , 'key ' ));
76
- }
77
-
78
- return $ this ->patch ('/user/keys/ ' .rawurlencode ($ id ), $ params );
79
- }
80
-
81
60
/**
82
61
* Removes deploy key for the authenticated user.
83
62
*
Original file line number Diff line number Diff line change @@ -83,53 +83,6 @@ public function shouldNotCreateKeyWithoutKeyParam()
83
83
$ api ->create ($ data );
84
84
}
85
85
86
- /**
87
- * @test
88
- */
89
- public function shouldUpdateKey ()
90
- {
91
- $ expectedValue = array ('id ' => '123 ' , 'key ' => 'ssh-rsa ... ' );
92
- $ data = array ('title ' => 'my key ' , 'key ' => 'ssh-rsa ... ' );
93
-
94
- $ api = $ this ->getApiMock ();
95
- $ api ->expects ($ this ->once ())
96
- ->method ('patch ' )
97
- ->with ('/user/keys/123 ' , $ data )
98
- ->will ($ this ->returnValue ($ expectedValue ));
99
-
100
- $ this ->assertEquals ($ expectedValue , $ api ->update (123 , $ data ));
101
- }
102
-
103
- /**
104
- * @test
105
- * @expectedException \Github\Exception\MissingArgumentException
106
- */
107
- public function shouldNotUpdateKeyWithoutTitleParam ()
108
- {
109
- $ data = array ('key ' => 'ssh-rsa ... ' );
110
-
111
- $ api = $ this ->getApiMock ();
112
- $ api ->expects ($ this ->never ())
113
- ->method ('patch ' );
114
-
115
- $ api ->update (123 , $ data );
116
- }
117
-
118
- /**
119
- * @test
120
- * @expectedException \Github\Exception\MissingArgumentException
121
- */
122
- public function shouldNotUpdateKeyWithoutKeyParam ()
123
- {
124
- $ data = array ('title ' => 'my key ' );
125
-
126
- $ api = $ this ->getApiMock ();
127
- $ api ->expects ($ this ->never ())
128
- ->method ('patch ' );
129
-
130
- $ api ->update (123 , $ data );
131
- }
132
-
133
86
/**
134
87
* @test
135
88
*/
You can’t perform that action at this time.
0 commit comments