Add pivot class property (#1518)

* Add pivot class property

* Add test for pivot class properties

* Fix failed test for pivot class properties

* Update CHANGELOG.md

* Fix failed test
This commit is contained in:
dev2a
2024-03-11 14:37:15 +01:00
committed by GitHub
parent bc1d67f01c
commit ac7e186270
6 changed files with 107 additions and 0 deletions
@@ -0,0 +1,22 @@
<?php
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Pivot;
use Barryvdh\LaravelIdeHelper\Console\ModelsCommand;
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\AbstractModelsCommand;
class Test extends AbstractModelsCommand
{
public function test(): void
{
$command = $this->app->make(ModelsCommand::class);
$tester = $this->runCommand($command, [
'--write' => true,
]);
$this->assertSame(0, $tester->getStatusCode());
$this->assertStringContainsString('Written new phpDocBlock to', $tester->getDisplay());
$this->assertMatchesMockedSnapshot();
}
}