Skip to content

Commit 01f5fe5

Browse files
committed
add void return type in tests
1 parent e069bf5 commit 01f5fe5

File tree

132 files changed

+422
-422
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+422
-422
lines changed

tests/Integration/IssueCategoryXmlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class IssueCategoryXmlTest extends TestCase
1010
{
11-
public function testCreateBlank()
11+
public function testCreateBlank(): void
1212
{
1313
/** @var \Redmine\Api\IssueCategory */
1414
$api = MockClient::create()->getApi('issue_category');

tests/Integration/Psr18ClientRequestGenerationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testPsr18ClientCreatesCorrectRequests(
3232
string $path,
3333
$data,
3434
$expectedOutput
35-
) {
35+
): void {
3636
$response = $this->createMock(ResponseInterface::class);
3737

3838
/** @var ClientInterface|\PHPUnit\Framework\MockObject\MockObject */

tests/Integration/UrlTest.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class UrlTest extends TestCase
99
{
10-
public function testAttachment()
10+
public function testAttachment(): void
1111
{
1212
/** @var \Redmine\Api\Attachment */
1313
$api = MockClient::create()->getApi('attachment');
@@ -17,7 +17,7 @@ public function testAttachment()
1717
$this->assertEquals('GET', $res['method']);
1818
}
1919

20-
public function testCustomFields()
20+
public function testCustomFields(): void
2121
{
2222
/** @var \Redmine\Api\CustomField */
2323
$api = MockClient::create()->getApi('custom_fields');
@@ -27,7 +27,7 @@ public function testCustomFields()
2727
$this->assertEquals('GET', $res['method']);
2828
}
2929

30-
public function testGroup()
30+
public function testGroup(): void
3131
{
3232
/** @var \Redmine\Api\Group */
3333
$api = MockClient::create()->getApi('group');
@@ -55,7 +55,7 @@ public function testGroup()
5555
$this->assertEquals('DELETE', $res['method']);
5656
}
5757

58-
public function testIssue()
58+
public function testIssue(): void
5959
{
6060
/** @var \Redmine\Api\Issue */
6161
$api = MockClient::create()->getApi('issue');
@@ -85,7 +85,7 @@ public function testIssue()
8585
// $this->assertEquals($res, array('path' => '/issues/1.xml', 'method' => 'DELETE'));
8686
}
8787

88-
public function testIssueCategory()
88+
public function testIssueCategory(): void
8989
{
9090
/** @var \Redmine\Api\IssueCategory */
9191
$api = MockClient::create()->getApi('issue_category');
@@ -113,7 +113,7 @@ public function testIssueCategory()
113113
$this->assertEquals('DELETE', $res['method']);
114114
}
115115

116-
public function testIssuePriority()
116+
public function testIssuePriority(): void
117117
{
118118
/** @var \Redmine\Api\IssuePriority */
119119
$api = MockClient::create()->getApi('issue_priority');
@@ -123,7 +123,7 @@ public function testIssuePriority()
123123
$this->assertEquals('GET', $res['method']);
124124
}
125125

126-
public function testIssueRelation()
126+
public function testIssueRelation(): void
127127
{
128128
/** @var \Redmine\Api\IssueRelation */
129129
$api = MockClient::create()->getApi('issue_relation');
@@ -142,7 +142,7 @@ public function testIssueRelation()
142142
$this->assertEquals('DELETE', $res['method']);
143143
}
144144

145-
public function testIssueStatus()
145+
public function testIssueStatus(): void
146146
{
147147
/** @var \Redmine\Api\IssueStatus */
148148
$api = MockClient::create()->getApi('issue_status');
@@ -152,7 +152,7 @@ public function testIssueStatus()
152152
$this->assertEquals('GET', $res['method']);
153153
}
154154

155-
public function testMembership()
155+
public function testMembership(): void
156156
{
157157
/** @var \Redmine\Api\Membership */
158158
$api = MockClient::create()->getApi('membership');
@@ -169,7 +169,7 @@ public function testMembership()
169169
$this->assertEquals('DELETE', $res['method']);
170170
}
171171

172-
public function testNews()
172+
public function testNews(): void
173173
{
174174
/** @var \Redmine\Api\News */
175175
$api = MockClient::create()->getApi('news');
@@ -184,7 +184,7 @@ public function testNews()
184184
$this->assertEquals('GET', $res['method']);
185185
}
186186

187-
public function testProject()
187+
public function testProject(): void
188188
{
189189
/** @var \Redmine\Api\Project */
190190
$api = MockClient::create()->getApi('project');
@@ -206,7 +206,7 @@ public function testProject()
206206
$this->assertEquals('DELETE', $res['method']);
207207
}
208208

209-
public function testQuery()
209+
public function testQuery(): void
210210
{
211211
/** @var \Redmine\Api\Query */
212212
$api = MockClient::create()->getApi('query');
@@ -216,7 +216,7 @@ public function testQuery()
216216
$this->assertEquals('GET', $res['method']);
217217
}
218218

219-
public function testRole()
219+
public function testRole(): void
220220
{
221221
/** @var \Redmine\Api\Role */
222222
$api = MockClient::create()->getApi('role');
@@ -231,7 +231,7 @@ public function testRole()
231231
$this->assertEquals('GET', $res['method']);
232232
}
233233

234-
public function testTimeEntry()
234+
public function testTimeEntry(): void
235235
{
236236
/** @var \Redmine\Api\TimeEntry */
237237
$api = MockClient::create()->getApi('time_entry');
@@ -267,7 +267,7 @@ public function testTimeEntry()
267267
$this->assertEquals('DELETE', $res['method']);
268268
}
269269

270-
public function testTimeEntryActivity()
270+
public function testTimeEntryActivity(): void
271271
{
272272
/** @var \Redmine\Api\TimeEntryActivity */
273273
$api = MockClient::create()->getApi('time_entry_activity');
@@ -277,7 +277,7 @@ public function testTimeEntryActivity()
277277
$this->assertEquals('GET', $res['method']);
278278
}
279279

280-
public function testTracker()
280+
public function testTracker(): void
281281
{
282282
/** @var \Redmine\Api\Tracker */
283283
$api = MockClient::create()->getApi('tracker');
@@ -287,7 +287,7 @@ public function testTracker()
287287
$this->assertEquals('GET', $res['method']);
288288
}
289289

290-
public function testUser()
290+
public function testUser(): void
291291
{
292292
/** @var \Redmine\Api\User */
293293
$api = MockClient::create()->getApi('user');
@@ -324,7 +324,7 @@ public function testUser()
324324
$this->assertEquals('DELETE', $res['method']);
325325
}
326326

327-
public function testVersion()
327+
public function testVersion(): void
328328
{
329329
/** @var \Redmine\Api\Version */
330330
$api = MockClient::create()->getApi('version');
@@ -346,7 +346,7 @@ public function testVersion()
346346
$this->assertEquals('DELETE', $res['method']);
347347
}
348348

349-
public function testWiki()
349+
public function testWiki(): void
350350
{
351351
/** @var \Redmine\Api\Wiki */
352352
$api = MockClient::create()->getApi('wiki');

tests/Integration/UserXmlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class UserXmlTest extends TestCase
1010
{
11-
public function testCreateBlank()
11+
public function testCreateBlank(): void
1212
{
1313
/** @var \Redmine\Api\User */
1414
$api = MockClient::create()->getApi('user');

tests/Unit/Api/AbstractApi/DeleteTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#[CoversClass(AbstractApi::class)]
1616
class DeleteTest extends TestCase
1717
{
18-
public function testDeleteWithHttpClient()
18+
public function testDeleteWithHttpClient(): void
1919
{
2020
$client = AssertingHttpClient::create(
2121
$this,
@@ -45,7 +45,7 @@ public function testDeleteWithHttpClient()
4545
* @dataProvider getXmlDecodingFromDeleteMethodData
4646
*/
4747
#[DataProvider('getXmlDecodingFromDeleteMethodData')]
48-
public function testXmlDecodingFromDeleteMethod($response, $expected)
48+
public function testXmlDecodingFromDeleteMethod($response, $expected): void
4949
{
5050
$client = $this->createMock(Client::class);
5151
$client->method('getLastResponseBody')->willReturn($response);

tests/Unit/Api/AbstractApi/GetTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#[CoversClass(AbstractApi::class)]
1717
class GetTest extends TestCase
1818
{
19-
public function testGetWithHttpClient()
19+
public function testGetWithHttpClient(): void
2020
{
2121
$client = AssertingHttpClient::create(
2222
$this,
@@ -47,7 +47,7 @@ public function testGetWithHttpClient()
4747
* @dataProvider getJsonDecodingFromGetMethodData
4848
*/
4949
#[DataProvider('getJsonDecodingFromGetMethodData')]
50-
public function testJsonDecodingFromGetMethod($response, $decode, $expected)
50+
public function testJsonDecodingFromGetMethod($response, $decode, $expected): void
5151
{
5252
$client = $this->createMock(Client::class);
5353
$client->method('getLastResponseBody')->willReturn($response);
@@ -82,7 +82,7 @@ public static function getJsonDecodingFromGetMethodData(): array
8282
* @dataProvider getXmlDecodingFromGetMethodData
8383
*/
8484
#[DataProvider('getXmlDecodingFromGetMethodData')]
85-
public function testXmlDecodingFromGetMethod($response, $decode, $expected)
85+
public function testXmlDecodingFromGetMethod($response, $decode, $expected): void
8686
{
8787
$client = $this->createMock(Client::class);
8888
$client->method('getLastResponseBody')->willReturn($response);

tests/Unit/Api/AbstractApi/PostTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#[CoversClass(AbstractApi::class)]
1717
class PostTest extends TestCase
1818
{
19-
public function testPostWithHttpClient()
19+
public function testPostWithHttpClient(): void
2020
{
2121
$client = AssertingHttpClient::create(
2222
$this,
@@ -47,7 +47,7 @@ public function testPostWithHttpClient()
4747
* @dataProvider getXmlDecodingFromPostMethodData
4848
*/
4949
#[DataProvider('getXmlDecodingFromPostMethodData')]
50-
public function testXmlDecodingFromPostMethod($response, $expected)
50+
public function testXmlDecodingFromPostMethod($response, $expected): void
5151
{
5252
$client = $this->createMock(Client::class);
5353
$client->method('getLastResponseBody')->willReturn($response);

tests/Unit/Api/AbstractApi/PutTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#[CoversClass(AbstractApi::class)]
1717
class PutTest extends TestCase
1818
{
19-
public function testPutWithHttpClient()
19+
public function testPutWithHttpClient(): void
2020
{
2121
$client = AssertingHttpClient::create(
2222
$this,
@@ -47,7 +47,7 @@ public function testPutWithHttpClient()
4747
* @dataProvider getXmlDecodingFromPutMethodData
4848
*/
4949
#[DataProvider('getXmlDecodingFromPutMethodData')]
50-
public function testXmlDecodingFromPutMethod($response, $expected)
50+
public function testXmlDecodingFromPutMethod($response, $expected): void
5151
{
5252
$client = $this->createMock(Client::class);
5353
$client->method('getLastResponseBody')->willReturn($response);

0 commit comments

Comments
 (0)