Skip to content

Commit 5c1d477

Browse files
committed
test: add return void
1 parent 2c524fd commit 5c1d477

Some content is hidden

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

45 files changed

+173
-173
lines changed

tests/_support/Models/UserCastsTimestampModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class UserCastsTimestampModel extends Model
3939
protected $useTimestamps = true;
4040
protected $dateFormat = 'datetime';
4141

42-
protected function initialize()
42+
protected function initialize(): void
4343
{
4444
parent::initialize();
4545

tests/_support/Services/Translation/TranslationNested/TranslationFour.php

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

1616
class TranslationFour
1717
{
18-
public function list()
18+
public function list(): void
1919
{
2020
lang('TranslationOne.title');
2121
lang('TranslationOne.last_operation_success');

tests/_support/Services/Translation/TranslationOne.php

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

1616
class TranslationOne
1717
{
18-
public function list()
18+
public function list(): void
1919
{
2020
lang('TranslationOne.title');
2121
lang('TranslationOne.DESCRIPTION');

tests/_support/Services/Translation/TranslationThree.php

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

1616
class TranslationThree
1717
{
18-
public function list()
18+
public function list(): void
1919
{
2020
lang('TranslationOne.title');
2121
lang('TranslationOne.DESCRIPTION');

tests/_support/Services/Translation/TranslationTwo.php

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

1616
class TranslationTwo
1717
{
18-
public function list()
18+
public function list(): void
1919
{
2020
// Error language keys
2121
lang('TranslationTwo');

tests/system/Autoloader/FileLocatorCachedTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ protected function tearDown(): void
7474
parent::tearDown();
7575
}
7676

77-
public function testDeleteCache()
77+
public function testDeleteCache(): void
7878
{
7979
$this->assertNotSame([], $this->handler->get('FileLocatorCache'));
8080

tests/system/Cache/FactoriesCacheFileVarExportHandlerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ protected function createFactoriesCache(): void
3939
$this->cache = new FactoriesCache($this->handler);
4040
}
4141

42-
public function testInstantiate()
42+
public function testInstantiate(): void
4343
{
4444
$this->createFactoriesCache();
4545

4646
$this->assertInstanceOf(FactoriesCache::class, $this->cache);
4747
}
4848

49-
public function testSave()
49+
public function testSave(): void
5050
{
5151
Factories::reset();
5252
Factories::config('App');
@@ -62,7 +62,7 @@ public function testSave()
6262
$this->assertArrayHasKey('App', $cachedData['aliases']);
6363
}
6464

65-
public function testLoad()
65+
public function testLoad(): void
6666
{
6767
Factories::reset();
6868
/** @var App $appConfig */
@@ -80,7 +80,7 @@ public function testLoad()
8080
$this->assertSame('http://test.example.jp/this-is-test/', $appConfig->baseURL);
8181
}
8282

83-
public function testDelete()
83+
public function testDelete(): void
8484
{
8585
$this->createFactoriesCache();
8686

tests/system/Cache/ResponseCacheTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private function createResponseCache(?CacheConfig $cacheConfig = null): Response
9393
return (new ResponseCache($cacheConfig, $cache))->setTtl(300);
9494
}
9595

96-
public function testCachePageIncomingRequest()
96+
public function testCachePageIncomingRequest(): void
9797
{
9898
$pageCache = $this->createResponseCache();
9999

@@ -131,7 +131,7 @@ public function testCachePageIncomingRequest()
131131
$this->assertNull($cachedResponse);
132132
}
133133

134-
public function testCachePageIncomingRequestWithCacheQueryString()
134+
public function testCachePageIncomingRequestWithCacheQueryString(): void
135135
{
136136
$cacheConfig = new CacheConfig();
137137
$cacheConfig->cacheQueryString = true;
@@ -169,7 +169,7 @@ public function testCachePageIncomingRequestWithCacheQueryString()
169169
$this->assertNull($cachedResponse);
170170
}
171171

172-
public function testCachePageIncomingRequestWithHttpMethods()
172+
public function testCachePageIncomingRequestWithHttpMethods(): void
173173
{
174174
$pageCache = $this->createResponseCache();
175175

@@ -189,7 +189,7 @@ public function testCachePageIncomingRequestWithHttpMethods()
189189
$this->assertNull($cachedResponse);
190190
}
191191

192-
public function testCachePageCLIRequest()
192+
public function testCachePageCLIRequest(): void
193193
{
194194
$pageCache = $this->createResponseCache();
195195

@@ -217,7 +217,7 @@ public function testCachePageCLIRequest()
217217
$this->assertNull($cachedResponse);
218218
}
219219

220-
public function testUnserializeError()
220+
public function testUnserializeError(): void
221221
{
222222
$this->expectException(ErrorException::class);
223223
$this->expectExceptionMessage('unserialize(): Error at offset 0 of 12 bytes');
@@ -243,7 +243,7 @@ public function testUnserializeError()
243243
$pageCache->get($request, new Response($this->appConfig));
244244
}
245245

246-
public function testInvalidCacheError()
246+
public function testInvalidCacheError(): void
247247
{
248248
$this->expectException(Exception::class);
249249
$this->expectExceptionMessage('Error unserializing page cache');

tests/system/CodeIgniterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function testRunEmptyDefaultRoute(): void
8383
$this->assertStringContainsString('Welcome to CodeIgniter', $output);
8484
}
8585

86-
public function testOutputBufferingControl()
86+
public function testOutputBufferingControl(): void
8787
{
8888
ob_start();
8989
$this->codeigniter->run();
@@ -310,7 +310,7 @@ public function testRunExecuteFilterByClassName(): void
310310
$this->resetServices();
311311
}
312312

313-
public function testRegisterSameFilterTwiceWithDifferentArgument()
313+
public function testRegisterSameFilterTwiceWithDifferentArgument(): void
314314
{
315315
$this->expectException(ConfigException::class);
316316
$this->expectExceptionMessage('"test-customfilter" already has arguments: null');

tests/system/Commands/RoutesTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function testRoutesCommandSortByHandler(): void
116116
$this->assertStringContainsString($expected, $this->getBuffer());
117117
}
118118

119-
public function testRoutesCommandHostHostname()
119+
public function testRoutesCommandHostHostname(): void
120120
{
121121
Services::injectMock('routes', null);
122122

@@ -145,7 +145,7 @@ public function testRoutesCommandHostHostname()
145145
$this->assertStringContainsString($expected, $this->getBuffer());
146146
}
147147

148-
public function testRoutesCommandHostSubdomain()
148+
public function testRoutesCommandHostSubdomain(): void
149149
{
150150
Services::injectMock('routes', null);
151151

0 commit comments

Comments
 (0)