@@ -40,31 +40,6 @@ public function testExtract($property, array $type = null, $shortDescription, $l
40
40
$ this ->assertSame ($ longDescription , $ this ->extractor ->getLongDescription ('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy ' , $ property ));
41
41
}
42
42
43
- public function testParamTagTypeIsOmitted ()
44
- {
45
- $ this ->assertNull ($ this ->extractor ->getTypes (OmittedParamTagTypeDocBlock::class, 'omittedType ' ));
46
- }
47
-
48
- /**
49
- * @dataProvider typesWithCustomPrefixesProvider
50
- */
51
- public function testExtractTypesWithCustomPrefixes ($ property , array $ type = null )
52
- {
53
- $ customExtractor = new PhpDocExtractor (null , array ('add ' , 'remove ' ), array ('is ' , 'can ' ));
54
-
55
- $ this ->assertEquals ($ type , $ customExtractor ->getTypes ('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy ' , $ property ));
56
- }
57
-
58
- /**
59
- * @dataProvider typesWithNoPrefixesProvider
60
- */
61
- public function testExtractTypesWithNoPrefixes ($ property , array $ type = null )
62
- {
63
- $ noPrefixExtractor = new PhpDocExtractor (null , array (), array (), array ());
64
-
65
- $ this ->assertEquals ($ type , $ noPrefixExtractor ->getTypes ('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy ' , $ property ));
66
- }
67
-
68
43
public function typesProvider ()
69
44
{
70
45
return array (
@@ -102,6 +77,21 @@ public function typesProvider()
102
77
);
103
78
}
104
79
80
+ public function testParamTagTypeIsOmitted ()
81
+ {
82
+ $ this ->assertNull ($ this ->extractor ->getTypes (OmittedParamTagTypeDocBlock::class, 'omittedType ' ));
83
+ }
84
+
85
+ /**
86
+ * @dataProvider typesWithCustomPrefixesProvider
87
+ */
88
+ public function testExtractTypesWithCustomPrefixes ($ property , array $ type = null )
89
+ {
90
+ $ customExtractor = new PhpDocExtractor (null , array ('add ' , 'remove ' ), array ('is ' , 'can ' ));
91
+
92
+ $ this ->assertEquals ($ type , $ customExtractor ->getTypes ('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy' , $ property ));
93
+ }
94
+
105
95
public function typesWithCustomPrefixesProvider ()
106
96
{
107
97
return array (
@@ -130,13 +120,23 @@ public function typesWithCustomPrefixesProvider()
130
120
array ('d ' , array (new Type (Type::BUILTIN_TYPE_BOOL )), null , null ),
131
121
array ('e ' , array (new Type (Type::BUILTIN_TYPE_ARRAY , false , null , true , new Type (Type::BUILTIN_TYPE_INT ), new Type (Type::BUILTIN_TYPE_RESOURCE ))), null , null ),
132
122
array ('f ' , array (new Type (Type::BUILTIN_TYPE_ARRAY , false , null , true , new Type (Type::BUILTIN_TYPE_INT ), new Type (Type::BUILTIN_TYPE_OBJECT , false , 'DateTime ' ))), null , null ),
133
- array ('g ' , array ( new Type (Type:: BUILTIN_TYPE_ARRAY , true , null , true )), ' Nullable array. ' , null ),
123
+ array ('g ' , null ),
134
124
array ('donotexist ' , null , null , null ),
135
125
array ('staticGetter ' , null , null , null ),
136
126
array ('staticSetter ' , null , null , null ),
137
127
);
138
128
}
139
129
130
+ /**
131
+ * @dataProvider typesWithNoPrefixesProvider
132
+ */
133
+ public function testExtractTypesWithNoPrefixes ($ property , array $ type = null )
134
+ {
135
+ $ noPrefixExtractor = new PhpDocExtractor (null , array (), array (), array ());
136
+
137
+ $ this ->assertEquals ($ type , $ noPrefixExtractor ->getTypes ('Symfony\Component\PropertyInfo\Tests\Fixtures\Dummy ' , $ property ));
138
+ }
139
+
140
140
public function typesWithNoPrefixesProvider ()
141
141
{
142
142
return array (
@@ -165,7 +165,7 @@ public function typesWithNoPrefixesProvider()
165
165
array ('d ' , null , null , null ),
166
166
array ('e ' , null , null , null ),
167
167
array ('f ' , null , null , null ),
168
- array ('g ' , array ( new Type (Type:: BUILTIN_TYPE_ARRAY , true , null , true )), ' Nullable array. ' , null ),
168
+ array ('g ' , null ),
169
169
array ('donotexist ' , null , null , null ),
170
170
array ('staticGetter ' , null , null , null ),
171
171
array ('staticSetter ' , null , null , null ),
0 commit comments