Skip to content

Commit 83b8a32

Browse files
authored
bug KnpLabs#1071 dont require encoding (gemal)
This PR was squashed before being merged into the 3.4.x-dev branch. Discussion ---------- fixes KnpLabs#1042 Commits ------- 89c71de dont require encoding 35c97c2 Update BlobsTest.php
1 parent c230ab0 commit 83b8a32

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

lib/Github/Api/GitData/Blobs.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public function show($username, $repository, $sha)
5959
*/
6060
public function create($username, $repository, array $params)
6161
{
62-
if (!isset($params['content'], $params['encoding'])) {
63-
throw new MissingArgumentException(['content', 'encoding']);
62+
if (!isset($params['content'])) {
63+
throw new MissingArgumentException('content');
6464
}
6565

6666
return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/blobs', $params);

test/Github/Tests/Api/GitData/BlobsTest.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,6 @@ public function shouldCreateBlob()
6868
$this->assertEquals($expectedValue, $api->create('l3l0', 'l3l0repo', $data));
6969
}
7070

71-
/**
72-
* @test
73-
*/
74-
public function shouldNotCreateBlobWithoutEncoding()
75-
{
76-
$this->expectException(MissingArgumentException::class);
77-
$data = ['content' => 'some cotent'];
78-
79-
$api = $this->getApiMock();
80-
$api->expects($this->never())
81-
->method('post');
82-
83-
$api->create('l3l0', 'l3l0repo', $data);
84-
}
85-
8671
/**
8772
* @test
8873
*/

0 commit comments

Comments
 (0)