Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Tests/Command/DumpCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use MyBuilder\Bundle\CronosBundle\Command\ReplaceCommand;
use MyBuilder\Bundle\CronosBundle\Tests\CronosTestCase;
use MyBuilder\Bundle\CronosBundle\Tests\Fixtures\Command\TestCommand;
use PHPUnit\Framework\Attributes\DataProvider;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Tester\CommandTester;
Expand Down Expand Up @@ -36,6 +37,7 @@ protected function tearDown(): void
/**
* @dataProvider environmentDumps
*/
#[DataProvider('environmentDumps')]
public function test_dump_should_be_as_expected(string $expectedOutput, array $input): void
{
$input = array_merge(['command' => $this->command->getName()], $input);
Expand All @@ -46,7 +48,7 @@ public function test_dump_should_be_as_expected(string $expectedOutput, array $i
static::assertEquals($expectedOutput, trim($commandTester->getDisplay()));
}

public function environmentDumps(): array
public static function environmentDumps(): array
{
return [
[
Expand Down
4 changes: 3 additions & 1 deletion Tests/DependencyInjection/MyBuilderCronosExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace MyBuilder\Bundle\CronosBundle\Tests\DependencyInjection;

use MyBuilder\Bundle\CronosBundle\DependencyInjection\MyBuilderCronosExtension;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand All @@ -23,14 +24,15 @@ protected function setUp(): void
/**
* @dataProvider providerTestConfig
*/
#[DataProvider('providerTestConfig')]
public function test_config(array $expected, string $file): void
{
$this->loader->load($this->getConfig($file), $this->container);

static::assertEquals($expected, $this->container->getParameter('mybuilder.cronos_bundle.exporter_config'));
}

public function providerTestConfig(): array
public static function providerTestConfig(): array
{
if (method_exists(Kernel::class, 'getProjectDir')) {
$pathToConsole = '%kernel.project_dir%/bin/console';
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"symfony/yaml": "^4.4.20 || ^5.4 || ^6.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5.27"
"phpunit/phpunit": "^9.6.19 || ^10.5.17"
},
"autoload": {
"psr-4": { "MyBuilder\\Bundle\\CronosBundle\\": "" }
Expand Down