1
1
<?php
2
2
3
- /**
4
- * Test: Nette\DI\Helpers::expand()
5
- */
6
-
7
3
declare (strict_types=1 );
8
4
9
5
use Nette \DI \Helpers ;
@@ -22,10 +18,10 @@ class TestClass
22
18
23
19
$ rc = new ReflectionClass (TestClass::class);
24
20
25
- Assert::same ('' , Helpers::parseAnnotation ($ rc , 'inject ' ));
26
- Assert::same (null , Helpers::parseAnnotation ($ rc , 'injec ' ));
27
- Assert::same ('type ' , Helpers::parseAnnotation ($ rc , 'var ' ));
28
- Assert::same ('bool|int ' , Helpers::parseAnnotation ($ rc , 'return ' ));
21
+ Assert::same ('' , @ Helpers::parseAnnotation ($ rc , 'inject ' ));
22
+ Assert::same (null , @ Helpers::parseAnnotation ($ rc , 'injec ' ));
23
+ Assert::same ('type ' , @ Helpers::parseAnnotation ($ rc , 'var ' ));
24
+ Assert::same ('bool|int ' , @ Helpers::parseAnnotation ($ rc , 'return ' ));
29
25
30
26
31
27
/** @return*/
@@ -35,7 +31,7 @@ class TestClass2
35
31
36
32
$ rc = new ReflectionClass (TestClass2::class);
37
33
38
- Assert::same ('' , Helpers::parseAnnotation ($ rc , 'return ' ));
34
+ Assert::same ('' , @ Helpers::parseAnnotation ($ rc , 'return ' ));
39
35
40
36
41
37
/** @return
@@ -47,7 +43,7 @@ class TestClass3
47
43
48
44
$ rc = new ReflectionClass (TestClass3::class);
49
45
50
- Assert::same ('' , Helpers::parseAnnotation ($ rc , 'return ' ));
46
+ Assert::same ('' , @ Helpers::parseAnnotation ($ rc , 'return ' ));
51
47
52
48
53
49
/**
@@ -59,6 +55,6 @@ class TestClass4
59
55
60
56
$ rc = new ReflectionClass (TestClass4::class);
61
57
62
- Assert::same (null , Helpers::parseAnnotation ($ rc , 'inject ' ));
63
- Assert::same (null , Helpers::parseAnnotation ($ rc , 'injec ' ));
64
- Assert::same (null , Helpers::parseAnnotation ($ rc , 'var ' ));
58
+ Assert::same (null , @ Helpers::parseAnnotation ($ rc , 'inject ' ));
59
+ Assert::same (null , @ Helpers::parseAnnotation ($ rc , 'injec ' ));
60
+ Assert::same (null , @ Helpers::parseAnnotation ($ rc , 'var ' ));
0 commit comments