Skip to content

Commit 06b18c1

Browse files
author
Andrey Helldar
committed
Fixed tests
1 parent 57be9ab commit 06b18c1

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

tests/Commands/CreatorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public function testCreateAction()
1818
$this->assertFileDoesNotExist($path);
1919

2020
$this->artisan('make:migration:action', compact('name'))->run();
21+
$this->await();
2122

2223
$this->assertFileExists($path);
2324
}

tests/Commands/MakeTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public function testMakingFiles()
1717
$this->assertFileDoesNotExist($path);
1818

1919
$this->artisan('make:migration:action', compact('name'))->run();
20+
$this->await();
2021

2122
$this->assertFileExists($path);
2223

tests/Concerns/Sleepable.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Tests\Concerns;
4+
5+
trait Sleepable
6+
{
7+
protected function await(): void
8+
{
9+
usleep(100);
10+
}
11+
}

tests/TestCase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Tests\Concerns\Database;
1111
use Tests\Concerns\Files;
1212
use Tests\Concerns\Settings;
13+
use Tests\Concerns\Sleepable;
1314

1415
abstract class TestCase extends BaseTestCase
1516
{
@@ -18,6 +19,7 @@ abstract class TestCase extends BaseTestCase
1819
use Files;
1920
use RefreshDatabase;
2021
use Settings;
22+
use Sleepable;
2123

2224
protected function setUp(): void
2325
{

0 commit comments

Comments
 (0)