1
1
<?php
2
2
3
- /*
4
- * This file is part of the olvlvl/symfony-dependency-injection-proxy package.
5
- *
6
- * (c) Olivier Laviale <[email protected] >
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
3
namespace tests \olvlvl \SymfonyDependencyInjectionProxy ;
13
4
14
5
use ArrayAccess ;
18
9
use olvlvl \SymfonyDependencyInjectionProxy \FactoryRenderer ;
19
10
use olvlvl \SymfonyDependencyInjectionProxy \InterfaceResolver ;
20
11
use olvlvl \SymfonyDependencyInjectionProxy \ProxyDumper ;
12
+ use PHPUnit \Framework \Attributes \DataProvider ;
13
+ use PHPUnit \Framework \Attributes \Group ;
14
+ use PHPUnit \Framework \Attributes \Test ;
21
15
use PHPUnit \Framework \TestCase ;
22
16
use Symfony \Component \DependencyInjection \Definition ;
23
17
use Throwable ;
24
18
25
- /**
26
- * @group unit
27
- */
19
+ #[Group('unit ' )]
28
20
final class ProxyDumperTest extends TestCase
29
21
{
30
- /**
31
- * @dataProvider provideIsProxyCandidate
32
- */
22
+ #[DataProvider('provideIsProxyCandidate ' )]
33
23
public function testIsProxyCandidate (Definition $ definition , bool $ expected ): void
34
24
{
35
25
$ stu = new ProxyDumper (
@@ -64,9 +54,9 @@ public static function provideIsProxyCandidate(): array
64
54
}
65
55
66
56
/**
67
- * @test
68
57
* @throws Throwable
69
58
*/
59
+ #[Test]
70
60
public function shouldFailIfFactoryCodeIsEmpty (): void
71
61
{
72
62
$ stu = new ProxyDumper (
@@ -81,8 +71,8 @@ public function shouldFailIfFactoryCodeIsEmpty(): void
81
71
82
72
/**
83
73
* @throws Throwable
84
- * @dataProvider provideGetProxyFactoryCode
85
74
*/
75
+ #[DataProvider('provideGetProxyFactoryCode ' )]
86
76
public function testGetProxyFactoryCode (string $ id , bool $ private , bool $ shared , string $ expectedStore ): void
87
77
{
88
78
$ definition = (new Definition ())
@@ -132,7 +122,7 @@ public static function provideGetProxyFactoryCode(): array
132
122
}
133
123
134
124
/**
135
- * @see https://github.com/symfony/symfony/issues/28852
125
+ * @link https://github.com/symfony/symfony/issues/28852
136
126
*/
137
127
public function testGetProxyCode (): void
138
128
{
0 commit comments