|
7 | 7 | use Symfony\Component\Console\Output\BufferedOutput;
|
8 | 8 |
|
9 | 9 | it('ensure models-count is callable', function () {
|
10 |
| - // Http::fake([ |
11 |
| - // config('eloquentize.api_url').'/api/metrics/models' => Http::response(['status' => 'ok'], 200), |
12 |
| - // ]); |
| 10 | + Http::fake([ |
| 11 | + config('eloquentize.api_url').'/api/metrics/models' => Http::response(['status' => 'ok'], 200), |
| 12 | + ]); |
13 | 13 |
|
14 |
| - // $this->artisan('eloquentize:models-count --modelsPath=Testing/Models -v --scope=PriceOver --scopeValue=1 ') |
15 |
| - // ->assertExitCode(Command::SUCCESS); |
| 14 | + $this->artisan('eloquentize:models-count --modelsPath=Testing/Models -v --models=Bill --scope=PriceOver --scopeValue=1 ') |
| 15 | + ->assertExitCode(Command::SUCCESS); |
16 | 16 |
|
17 |
| - $this->output = new BufferedOutput(); |
18 |
| - Artisan::call('eloquentize:models-count --modelsPath=Testing/Models -v --models=Bill --scope=PriceOver --scopeValue=1 -v', [], $this->output); |
19 |
| - $outputContent = $this->output->fetch(); |
20 |
| - echo 'out :'.$outputContent; |
| 17 | + // $this->output = new BufferedOutput(); |
| 18 | + // Artisan::call('eloquentize:models-count --modelsPath=Testing/Models -v --models=Bill --scope=PriceOver --scopeValue=1 -v', [], $this->output); |
| 19 | + // $outputContent = $this->output->fetch(); |
| 20 | + // echo 'out :'.$outputContent; |
21 | 21 | })->with([
|
22 | 22 | fn () => Bill::factory()->create(['ref' => 'BILL_0000001', 'price' => 1000]),
|
23 | 23 | fn () => Bill::factory()->create(['ref' => 'BILL_0000002', 'price' => 500]),
|
24 |
| -])->only(); |
| 24 | +]); |
0 commit comments