Skip to content

Commit 6422a18

Browse files
committed
Remove unused Use statement
1 parent 8e66d57 commit 6422a18

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

tests/Commands/CleanupTest.php

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,27 @@
22

33
namespace Spatie\DbSnapshots\Commands\Test;
44

5-
use Mockery as m;
65
use Spatie\DbSnapshots\Test\TestCase;
76
use Illuminate\Support\Facades\Artisan;
8-
use Illuminate\Support\Facades\Storage;
97

108
class CleanupTest extends TestCase
119
{
12-
/** @test */
13-
public function it_can_delete_old_snapshots_keeping_the_desired_number_of_snapshots()
14-
{
15-
// Add sleep to make sure files do not have the same modified time.
16-
// They may not sort properly if all have the same timestamp.
17-
$this->clearDisk();
18-
19-
$this->disk->put("snapshot1.sql", 'new content');
20-
21-
sleep(1);
22-
23-
$this->disk->put("snapshot2.sql", 'new content');
24-
25-
Artisan::call('snapshot:cleanup', ['--keep' => 1]);
26-
27-
$this->disk->assertMissing('snapshot1.sql');
28-
$this->disk->assertExists('snapshot2.sql');
29-
}
10+
/** @test */
11+
public function it_can_delete_old_snapshots_keeping_the_desired_number_of_snapshots()
12+
{
13+
// Add sleep to make sure files do not have the same modified time.
14+
// They may not sort properly if all have the same timestamp.
15+
$this->clearDisk();
16+
17+
$this->disk->put('snapshot1.sql', 'new content');
18+
19+
sleep(1);
20+
21+
$this->disk->put('snapshot2.sql', 'new content');
22+
23+
Artisan::call('snapshot:cleanup', ['--keep' => 1]);
24+
25+
$this->disk->assertMissing('snapshot1.sql');
26+
$this->disk->assertExists('snapshot2.sql');
27+
}
3028
}

0 commit comments

Comments
 (0)