mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
switch tests to snapshot assertions (#958)
* install spatie/phpunit-snapshot-assertions * switch GenerateBasicPhpdocFinal test to snapshot assertion * use v3 of spatie/phpunit-snapshot-assertions to be PHP7.2 compatible * add txt snapshot driver * fix EloquentCommandTest * replace all heredocs by snapshots * make test compatible with old/deprecated versions * Update composer.json * normalize composer.json * fix merge conflict * Allow older snapshot versions * normalize composer.json Co-authored-by: Barry vd. Heuvel <[email protected]> Co-authored-by: barryvdh <[email protected]>
This commit is contained in:
co-authored by
Barry vd. Heuvel
barryvdh
parent
cca99b6d25
commit
07d45d2d7a
@@ -66,32 +66,6 @@ class Test extends AbstractModelsCommand
|
||||
|
||||
$this->assertSame(0, $tester->getStatusCode());
|
||||
$this->assertEmpty($tester->getDisplay());
|
||||
|
||||
$expectedContent = <<<'PHP'
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\CustomDate\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\CustomDate\Models\CustomDate
|
||||
*
|
||||
* @property \Carbon\CarbonImmutable|null $created_at
|
||||
* @property \Carbon\CarbonImmutable|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CustomDate whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class CustomDate extends Model
|
||||
{
|
||||
}
|
||||
|
||||
PHP;
|
||||
|
||||
$this->assertSame($expectedContent, $actualContent);
|
||||
$this->assertMatchesPhpSnapshot($actualContent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user