mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Fix PHPDoc placement before PHP 8 class attributes and add regression tests (#1769)
* Initial plan * Add tests for PHP class attribute placement and fix whitespace in regex Co-authored-by: barryvdh <[email protected]> * Add advanced edge case tests: final+nested-brackets and multiple attributes Co-authored-by: barryvdh <[email protected]> * Add PHP 8.5 test for closures inside attribute arguments Co-authored-by: barryvdh <[email protected]> * composer fix-style --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: barryvdh <[email protected]> Co-authored-by: laravel-ide-helper <[email protected]>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\PhpAttributesBeforeClass;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user