-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option for only eloquent (#1636)
* Add option for only eloquent * composer fix-style * Add snapshot * Add option to models command * composer fix-style * Fix namespace --------- Co-authored-by: laravel-ide-helper <[email protected]>
- Loading branch information
Showing
13 changed files
with
305 additions
and
45,343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
tests/Console/GeneratorCommand/GenerateEloquentOnly/Test.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\GeneratorCommand\GenerateEloquentOnly; | ||
|
||
use Barryvdh\LaravelIdeHelper\Console\GeneratorCommand; | ||
use Barryvdh\LaravelIdeHelper\Tests\Console\GeneratorCommand\AbstractGeneratorCommand; | ||
|
||
class Test extends AbstractGeneratorCommand | ||
{ | ||
public function testGenerator(): void | ||
{ | ||
$command = $this->app->make(GeneratorCommand::class); | ||
|
||
$tester = $this->runCommand($command, [ | ||
'--eloquent' => true, | ||
]); | ||
|
||
$this->assertSame(0, $tester->getStatusCode()); | ||
$this->assertStringContainsString('A new helper file was written to _ide_helper.php', $tester->getDisplay()); | ||
$this->assertStringNotContainsString('public static function configure($basePath = null)', $this->mockFilesystemOutput); | ||
$this->assertStringContainsString('class Eloquent extends \Illuminate\Database\Eloquent\Model', $this->mockFilesystemOutput); | ||
} | ||
} |
Oops, something went wrong.