Skip to content

Commit

Permalink
make use of attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Feb 22, 2023
1 parent 4baef4b commit 30366b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/vendor
composer.lock
composer.lock

.phpunit.cache
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Symplify\PhpConfigPrinter\Tests\Printer\SmartPhpConfigPrinter;

use Iterator;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\PackageBuilder\Testing\AbstractKernelTestCase;
use Symplify\PhpConfigPrinter\Printer\SmartPhpConfigPrinter;
use Symplify\PhpConfigPrinter\Tests\HttpKernel\PhpConfigPrinterKernel;
Expand All @@ -23,16 +24,16 @@ protected function setUp(): void
}

/**
* @dataProvider provideData()
* @param array<string, mixed[]> $services
*/
#[DataProvider('provideData')]
public function test(array $services, string $expectedContentFilePath): void
{
$printedContent = $this->smartPhpConfigPrinter->printConfiguredServices($services);
$this->assertStringEqualsFile($expectedContentFilePath, $printedContent, $expectedContentFilePath);
}

public function provideData(): Iterator
public static function provideData(): Iterator
{
yield [[
FirstClass::class => [
Expand Down

0 comments on commit 30366b8

Please sign in to comment.