@@ -12,7 +12,9 @@ validity of the resulting config node tree, this library provides a PHPUnit test
1212
1313Using Composer:
1414
15- composer require --dev matthiasnoback/symfony-config-test
15+ ``` bash
16+ composer require --dev matthiasnoback/symfony-config-test
17+ ```
1618
1719## Usage
1820
@@ -22,9 +24,9 @@ Then implement ``getConfiguration()``:
2224``` php
2325<?php
2426
27+ use App\Configuration;
2528use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
2629use PHPUnit\Framework\TestCase;
27- use App\Configuration;
2830
2931class ConfigurationTest extends TestCase
3032{
@@ -75,15 +77,14 @@ When you provide an empty array as the value for this configuration, you would e
7577<?php
7678
7779use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
80+ use PHPUnit\Framework\Attributes\Test;
7881use PHPUnit\Framework\TestCase;
7982
8083class ConfigurationTest extends TestCase
8184{
8285 use ConfigurationTestCaseTrait;
8386
84- /**
85- * @test
86- */
87+ #[Test]
8788 public function values_are_invalid_if_required_value_is_not_provided(): void
8889 {
8990 $this->assertConfigurationIsInvalid(
@@ -104,15 +105,14 @@ You may also want to verify that after processing an array of configuration valu
104105<?php
105106
106107use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
108+ use PHPUnit\Framework\Attributes\Test;
107109use PHPUnit\Framework\TestCase;
108110
109111class ConfigurationTest extends TestCase
110112{
111113 use ConfigurationTestCaseTrait;
112114
113- /**
114- * @test
115- */
115+ #[Test]
116116 public function processed_value_contains_required_value(): void
117117 {
118118 $this->assertProcessedConfigurationEquals([
@@ -177,9 +177,7 @@ If you want to test, for instance, only the `array_node_1` branch from the examp
177177provide ` array_node_1 ` as the argument for the ` $breadcrumbPath ` parameter of the test helper functions, for example:
178178
179179``` php
180- /**
181- * @test
182- */
180+ #[Test]
183181public function processed_configuration_for_array_node_1(): void
184182{
185183 $this->assertProcessedConfigurationEquals(
@@ -244,9 +242,7 @@ If you want to test whether `default_value` is set to `foobar` by default, but d
244242requirements on ` required_value ` node, you can define its path as ` array_node.*.default_value ` , for example:
245243
246244``` php
247- /**
248- * @test
249- */
245+ #[Test]
250246public function processed_configuration_for_array_node_1(): void
251247{
252248 $this->assertProcessedConfigurationEquals(
0 commit comments