mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
* 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]>
25 lines
436 B
PHP
25 lines
436 B
PHP
<?php
|
|
|
|
namespace Barryvdh\LaravelIdeHelper\Tests;
|
|
|
|
use PHPUnit\Framework\Assert;
|
|
use Spatie\Snapshots\Driver;
|
|
|
|
class SnapshotPhpDriver implements Driver
|
|
{
|
|
public function serialize($data): string
|
|
{
|
|
return $data;
|
|
}
|
|
|
|
public function extension(): string
|
|
{
|
|
return 'php';
|
|
}
|
|
|
|
public function match($expected, $actual)
|
|
{
|
|
Assert::assertSame($expected, $this->serialize($actual));
|
|
}
|
|
}
|