Skip to content

Commit 8ef11c6

Browse files
Merge pull request #203
Added void typo
2 parents 2ff9ac7 + 34978e3 commit 8ef11c6

18 files changed

+68
-68
lines changed

tests/Commands/EventsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class EventsTest extends TestCase
1717
{
18-
public function testSuccess()
18+
public function testSuccess(): void
1919
{
2020
$this->copyFiles();
2121

@@ -29,7 +29,7 @@ public function testSuccess()
2929
Event::assertNotDispatched(DeployOperationFailed::class);
3030
}
3131

32-
public function testFailed()
32+
public function testFailed(): void
3333
{
3434
$this->expectException(Exception::class);
3535
$this->expectExceptionMessage('Custom exception');

tests/Commands/MakeTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class MakeTest extends TestCase
1212
{
13-
public function testMakingFiles()
13+
public function testMakingFiles(): void
1414
{
1515
$name = 'MakeExample';
1616

@@ -28,7 +28,7 @@ public function testMakingFiles()
2828
);
2929
}
3030

31-
public function testAskedName()
31+
public function testAskedName(): void
3232
{
3333
$path = $this->getOperationsPath() . '/' . date('Y_m_d_His') . '_some_name.php';
3434

@@ -41,7 +41,7 @@ public function testAskedName()
4141
$this->assertFileExists($path);
4242
}
4343

44-
public function testAutoName()
44+
public function testAutoName(): void
4545
{
4646
$path = $this->getOperationsPath() . '/' . date('Y_m_d_His') . '_auto.php';
4747

@@ -54,7 +54,7 @@ public function testAutoName()
5454
$this->assertFileExists($path);
5555
}
5656

57-
public function testNestedRightSlashWithoutExtension()
57+
public function testNestedRightSlashWithoutExtension(): void
5858
{
5959
$name = 'Foo/bar/QweRty';
6060

@@ -72,7 +72,7 @@ public function testNestedRightSlashWithoutExtension()
7272
);
7373
}
7474

75-
public function testNestedRightSlashWithExtension()
75+
public function testNestedRightSlashWithExtension(): void
7676
{
7777
$name = 'Foo/bar/QweRty.php';
7878

@@ -90,7 +90,7 @@ public function testNestedRightSlashWithExtension()
9090
);
9191
}
9292

93-
public function testNestedLeftSlashWithoutExtension()
93+
public function testNestedLeftSlashWithoutExtension(): void
9494
{
9595
$name = 'Foo\\bar\\QweRty';
9696

@@ -108,7 +108,7 @@ public function testNestedLeftSlashWithoutExtension()
108108
);
109109
}
110110

111-
public function testNestedLeftSlashWithExtension()
111+
public function testNestedLeftSlashWithExtension(): void
112112
{
113113
$name = 'Foo\\bar\\QweRty.php';
114114

@@ -126,7 +126,7 @@ public function testNestedLeftSlashWithExtension()
126126
);
127127
}
128128

129-
public function testFromCustomizedStub()
129+
public function testFromCustomizedStub(): void
130130
{
131131
$name = 'MakeExample';
132132

tests/Commands/MutexTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function handle(): int
3939
$this->command->setLaravel($container);
4040
}
4141

42-
public function testCanRunIsolatedCommandIfNotBlocked()
42+
public function testCanRunIsolatedCommandIfNotBlocked(): void
4343
{
4444
$this->mutex->shouldReceive('create')
4545
->andReturn(true)
@@ -53,7 +53,7 @@ public function testCanRunIsolatedCommandIfNotBlocked()
5353
$this->assertSame(1, $this->command->ran);
5454
}
5555

56-
public function testCannotRunIsolatedCommandIfBlocked()
56+
public function testCannotRunIsolatedCommandIfBlocked(): void
5757
{
5858
$this->mutex->shouldReceive('create')
5959
->andReturn(false)
@@ -67,7 +67,7 @@ public function testCannotRunIsolatedCommandIfBlocked()
6767
$this->assertSame(0, $this->command->ran);
6868
}
6969

70-
public function testCanRunCommandAgainAfterOtherCommandFinished()
70+
public function testCanRunCommandAgainAfterOtherCommandFinished(): void
7171
{
7272
$this->mutex->shouldReceive('create')
7373
->andReturn(true)
@@ -82,7 +82,7 @@ public function testCanRunCommandAgainAfterOtherCommandFinished()
8282
$this->assertEquals(2, $this->command->ran);
8383
}
8484

85-
public function testCanRunCommandAgainNonAutomated()
85+
public function testCanRunCommandAgainNonAutomated(): void
8686
{
8787
$this->mutex->shouldNotHaveBeenCalled();
8888

tests/Commands/OperationsTest.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
class OperationsTest extends TestCase
1818
{
19-
public function testSuccess()
19+
public function testSuccess(): void
2020
{
2121
$this->assertDatabaseDoesntTable($this->table);
2222

@@ -32,7 +32,7 @@ public function testSuccess()
3232
$this->assertDatabaseOperationHas($this->table, 'test_migration');
3333
}
3434

35-
public function testSameName()
35+
public function testSameName(): void
3636
{
3737
$this->assertDatabaseDoesntTable($this->table);
3838

@@ -52,7 +52,7 @@ public function testSameName()
5252
$this->assertDatabaseOperationHas($this->table, 'test_migration');
5353
}
5454

55-
public function testOnce()
55+
public function testOnce(): void
5656
{
5757
$this->copyFiles();
5858

@@ -85,7 +85,7 @@ public function testOnce()
8585
$this->assertDatabaseOperationDoesntLike($this->table, $table);
8686
}
8787

88-
public function testSuccessTransaction()
88+
public function testSuccessTransaction(): void
8989
{
9090
$this->copySuccessTransaction();
9191

@@ -103,7 +103,7 @@ public function testSuccessTransaction()
103103
$this->assertDatabaseOperationHas($this->table, $table);
104104
}
105105

106-
public function testFailedTransaction()
106+
public function testFailedTransaction(): void
107107
{
108108
$this->copyFailedTransaction();
109109

@@ -128,7 +128,7 @@ public function testFailedTransaction()
128128
$this->assertDatabaseOperationDoesntLike($this->table, $table);
129129
}
130130

131-
public function testSingleEnvironment()
131+
public function testSingleEnvironment(): void
132132
{
133133
$this->copyFiles();
134134

@@ -163,7 +163,7 @@ public function testSingleEnvironment()
163163
$this->assertDatabaseOperationDoesntLike($this->table, 'run_except_testing');
164164
}
165165

166-
public function testManyEnvironments()
166+
public function testManyEnvironments(): void
167167
{
168168
$this->copyFiles();
169169

@@ -204,7 +204,7 @@ public function testManyEnvironments()
204204
$this->assertDatabaseOperationDoesntLike($this->table, 'run_except_many_environments');
205205
}
206206

207-
public function testAllow()
207+
public function testAllow(): void
208208
{
209209
$this->copyFiles();
210210

@@ -230,7 +230,7 @@ public function testAllow()
230230
$this->assertDatabaseOperationDoesntLike($this->table, 'run_disallow');
231231
}
232232

233-
public function testUpSuccess()
233+
public function testUpSuccess(): void
234234
{
235235
$this->copyFiles();
236236

@@ -248,7 +248,7 @@ public function testUpSuccess()
248248
$this->assertDatabaseOperationHas($this->table, 'run_success');
249249
}
250250

251-
public function testUpSuccessOnFailed()
251+
public function testUpSuccessOnFailed(): void
252252
{
253253
$this->copyFiles();
254254

@@ -283,7 +283,7 @@ public function testUpSuccessOnFailed()
283283
$this->assertDatabaseOperationDoesntLike($this->table, 'run_success_on_failed');
284284
}
285285

286-
public function testUpFailed()
286+
public function testUpFailed(): void
287287
{
288288
$this->copyFiles();
289289

@@ -301,7 +301,7 @@ public function testUpFailed()
301301
$this->assertDatabaseOperationHas($this->table, 'run_failed');
302302
}
303303

304-
public function testUpFailedOnException()
304+
public function testUpFailedOnException(): void
305305
{
306306
$this->copyFiles();
307307

@@ -336,7 +336,7 @@ public function testUpFailedOnException()
336336
$this->assertDatabaseOperationDoesntLike($this->table, 'run_failed_failure');
337337
}
338338

339-
public function testPathAsFileWithExtension()
339+
public function testPathAsFileWithExtension(): void
340340
{
341341
$this->copyFiles();
342342

@@ -358,7 +358,7 @@ public function testPathAsFileWithExtension()
358358
$this->assertSame('sub_path/2021_12_15_205804_baz', $this->table()->first()->operation);
359359
}
360360

361-
public function testPathAsFileWithoutExtension()
361+
public function testPathAsFileWithoutExtension(): void
362362
{
363363
$this->copyFiles();
364364

@@ -380,7 +380,7 @@ public function testPathAsFileWithoutExtension()
380380
$this->assertSame($path, $this->table()->first()->operation);
381381
}
382382

383-
public function testPathAsDirectory()
383+
public function testPathAsDirectory(): void
384384
{
385385
$this->copyFiles();
386386

@@ -402,7 +402,7 @@ public function testPathAsDirectory()
402402
$this->assertSame('sub_path/2021_12_15_205804_baz', $this->table()->first()->operation);
403403
}
404404

405-
public function testOperationsNotFound()
405+
public function testOperationsNotFound(): void
406406
{
407407
$this->assertDatabaseDoesntTable($this->table);
408408

@@ -413,7 +413,7 @@ public function testOperationsNotFound()
413413
$this->artisan(Names::Status)->assertExitCode(0);
414414
}
415415

416-
public function testDisabledBefore()
416+
public function testDisabledBefore(): void
417417
{
418418
$this->copyFiles();
419419

@@ -439,7 +439,7 @@ public function testDisabledBefore()
439439
$this->assertDatabaseOperationHas($this->table, 'test_before_disabled');
440440
}
441441

442-
public function testEnabledBefore()
442+
public function testEnabledBefore(): void
443443
{
444444
$this->copyFiles();
445445

@@ -465,7 +465,7 @@ public function testEnabledBefore()
465465
$this->assertDatabaseOperationDoesntLike($this->table, 'test_before_disabled');
466466
}
467467

468-
public function testMixedBefore()
468+
public function testMixedBefore(): void
469469
{
470470
$this->copyFiles();
471471

@@ -563,7 +563,7 @@ public function testSorting(): void
563563
$this->assertSame($files, $records);
564564
}
565565

566-
public function testDirectoryExclusion()
566+
public function testDirectoryExclusion(): void
567567
{
568568
$this->copyFiles();
569569

@@ -613,7 +613,7 @@ public function testDirectoryExclusion()
613613
$this->assertDatabaseOperationDoesntLike($this->table, 'sub_path/2022_10_27_230732_foo');
614614
}
615615

616-
public function testFileExclusion()
616+
public function testFileExclusion(): void
617617
{
618618
$this->copyFiles();
619619

@@ -658,7 +658,7 @@ public function testFileExclusion()
658658
$this->assertDatabaseOperationHas($this->table, 'sub_path/2022_10_27_230732_foo');
659659
}
660660

661-
public function testEmptyDirectory()
661+
public function testEmptyDirectory(): void
662662
{
663663
$this->copyEmptyDirectory();
664664

@@ -675,7 +675,7 @@ public function testEmptyDirectory()
675675
$this->assertDatabaseCount($this->table, 0);
676676
}
677677

678-
public function testAsync()
678+
public function testAsync(): void
679679
{
680680
$this->copyAsync();
681681

@@ -711,7 +711,7 @@ public function testAsync()
711711
]));
712712
}
713713

714-
public function testSync()
714+
public function testSync(): void
715715
{
716716
$this->copyAsync();
717717

@@ -748,7 +748,7 @@ public function testSync()
748748
$this->assertDatabaseOperationDoesntLike($this->table, 'every_time');
749749
}
750750

751-
public function testViaMigrationMethod()
751+
public function testViaMigrationMethod(): void
752752
{
753753
$this->copyViaMigrations();
754754

tests/Commands/RefreshTest.php

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

1010
class RefreshTest extends TestCase
1111
{
12-
public function testRefreshCommand()
12+
public function testRefreshCommand(): void
1313
{
1414
$this->assertDatabaseDoesntTable($this->table);
1515

tests/Commands/ResetTest.php

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

1010
class ResetTest extends TestCase
1111
{
12-
public function testResetCommand()
12+
public function testResetCommand(): void
1313
{
1414
$this->assertDatabaseDoesntTable($this->table);
1515

0 commit comments

Comments
 (0)