tests: fix assertion (#1139)

* tests: fix assertion

* composer fix-style

Co-authored-by: laravel-ide-helper <[email protected]>
This commit is contained in:
Markus Podar
2021-01-11 09:14:12 +01:00
committed by GitHub
co-authored by laravel-ide-helper
parent fd30d1190d
commit a83df51ad4
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -1057,7 +1057,7 @@ class ModelsCommand extends Command
} }
$traits = class_uses(get_class($model), true); $traits = class_uses(get_class($model), true);
if (! in_array('Illuminate\\Database\\Eloquent\\Factories\\HasFactory', $traits)) { if (!in_array('Illuminate\\Database\\Eloquent\\Factories\\HasFactory', $traits)) {
return; return;
} }
@@ -1065,7 +1065,7 @@ class ModelsCommand extends Command
$factory = get_class($modelName::factory()); $factory = get_class($modelName::factory());
$factory = '\\' . trim($factory, '\\'); $factory = '\\' . trim($factory, '\\');
if (! class_exists($factory)) { if (!class_exists($factory)) {
return; return;
} }
@@ -4,15 +4,15 @@ declare(strict_types=1);
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories; namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Factories;
use Illuminate\Foundation\Application;
use Barryvdh\LaravelIdeHelper\Console\ModelsCommand; use Barryvdh\LaravelIdeHelper\Console\ModelsCommand;
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\AbstractModelsCommand; use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\AbstractModelsCommand;
use Illuminate\Foundation\Application;
class Test extends AbstractModelsCommand class Test extends AbstractModelsCommand
{ {
public function test(): void public function test(): void
{ {
if (! version_compare(Application::VERSION, '8.2', '>=')) { if (!version_compare(Application::VERSION, '8.2', '>=')) {
$this->markTestSkipped( $this->markTestSkipped(
'This test only works in Laravel >= 8.2' 'This test only works in Laravel >= 8.2'
); );
+1 -1
View File
@@ -225,10 +225,10 @@ class MacroTest extends TestCase
/** /**
* *
* *
* @see \Barryvdh\LaravelIdeHelper\Tests\UrlGeneratorMacroClass::__invoke()
* @param string $foo * @param string $foo
* @param int $bar * @param int $bar
* @return string * @return string
* @see \Barryvdh\LaravelIdeHelper\Tests\UrlGeneratorMacroClass::__invoke()
* @static * @static
*/ */
DOC; DOC;