Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit 304ced0

Browse files
committed
wip
1 parent 1365d84 commit 304ced0

File tree

5 files changed

+23
-45
lines changed

5 files changed

+23
-45
lines changed

database/factories/ModelFactory.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

database/migrations/create_cody_table.php.stub

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/CodyServiceProvider.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Spatie\LaravelPackageTools\Package;
66
use Codinglabs\Cody\Commands\CodyCommand;
7+
use Codinglabs\Cody\Commands\CodyListCommand;
78
use Spatie\LaravelPackageTools\PackageServiceProvider;
89

910
class CodyServiceProvider extends PackageServiceProvider
@@ -19,7 +20,9 @@ public function configurePackage(Package $package): void
1920
->name('cody')
2021
->hasConfigFile()
2122
->hasViews()
22-
->hasMigration('create_cody_table')
23-
->hasCommand(CodyCommand::class);
23+
->hasCommands([
24+
CodyCommand::class,
25+
CodyListCommand::class,
26+
]);
2427
}
2528
}

tests/CodyListCommandTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
use Illuminate\Process\ProcessResult;
4+
use Illuminate\Process\PendingProcess;
5+
use Illuminate\Support\Facades\Process;
6+
use Illuminate\Support\Facades\Artisan;
7+
8+
test('process is invoked', function () {
9+
Process::fake();
10+
11+
Artisan::call('cody:list');
12+
13+
Process::assertRan(function (PendingProcess $process) {
14+
return $process->command === 'git worktree list' &&
15+
$process->timeout === 300 &&
16+
$process->environment === [];
17+
});
18+
});

tests/ExampleTest.php

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)