13
13
14
14
use Symfony \Component \PropertyAccess \Exception \NoSuchPropertyException ;
15
15
16
- class PropertyAccessorCollectionTest_Car
16
+ class PropertyAccessorCollectionTestCase_Car
17
17
{
18
18
private $ axes ;
19
19
@@ -45,7 +45,7 @@ public function getAxes()
45
45
}
46
46
}
47
47
48
- class PropertyAccessorCollectionTest_CarOnlyAdder
48
+ class PropertyAccessorCollectionTestCase_CarOnlyAdder
49
49
{
50
50
public function addAxis ($ axis )
51
51
{
@@ -56,7 +56,7 @@ public function getAxes()
56
56
}
57
57
}
58
58
59
- class PropertyAccessorCollectionTest_CarOnlyRemover
59
+ class PropertyAccessorCollectionTestCase_CarOnlyRemover
60
60
{
61
61
public function removeAxis ($ axis )
62
62
{
@@ -67,14 +67,14 @@ public function getAxes()
67
67
}
68
68
}
69
69
70
- class PropertyAccessorCollectionTest_CarNoAdderAndRemover
70
+ class PropertyAccessorCollectionTestCase_CarNoAdderAndRemover
71
71
{
72
72
public function getAxes ()
73
73
{
74
74
}
75
75
}
76
76
77
- class PropertyAccessorCollectionTest_CompositeCar
77
+ class PropertyAccessorCollectionTestCase_CompositeCar
78
78
{
79
79
public function getStructure ()
80
80
{
@@ -85,7 +85,7 @@ public function setStructure($structure)
85
85
}
86
86
}
87
87
88
- class PropertyAccessorCollectionTest_CarStructure
88
+ class PropertyAccessorCollectionTestCase_CarStructure
89
89
{
90
90
public function addAxis ($ axis )
91
91
{
@@ -100,7 +100,7 @@ public function getAxes()
100
100
}
101
101
}
102
102
103
- abstract class PropertyAccessorCollectionTest extends PropertyAccessorArrayAccessTest
103
+ abstract class PropertyAccessorCollectionTestCase extends PropertyAccessorArrayAccessTestCase
104
104
{
105
105
public function testSetValueCallsAdderAndRemoverForCollections ()
106
106
{
@@ -111,7 +111,7 @@ public function testSetValueCallsAdderAndRemoverForCollections()
111
111
112
112
// Don't use a mock in order to test whether the collections are
113
113
// modified while iterating them
114
- $ car = new PropertyAccessorCollectionTest_Car ($ axesBefore );
114
+ $ car = new PropertyAccessorCollectionTestCase_Car ($ axesBefore );
115
115
116
116
$ this ->propertyAccessor ->setValue ($ car , 'axes ' , $ axesMerged );
117
117
@@ -151,7 +151,7 @@ public function testSetValueCallsAdderAndRemoverForNestedCollections()
151
151
public function testSetValueFailsIfNoAdderNorRemoverFound ()
152
152
{
153
153
$ this ->expectException (NoSuchPropertyException::class);
154
- $ this ->expectExceptionMessageMatches ('/Could not determine access type for property "axes" in class "Mock_PropertyAccessorCollectionTest_CarNoAdderAndRemover_ [^"]*"./ ' );
154
+ $ this ->expectExceptionMessageMatches ('/Could not determine access type for property "axes" in class "Mock_PropertyAccessorCollectionTestCase_CarNoAdderAndRemover_ [^"]*"./ ' );
155
155
$ car = $ this ->createMock (__CLASS__ .'_CarNoAdderAndRemover ' );
156
156
$ axesBefore = $ this ->getContainer ([1 => 'second ' , 3 => 'fourth ' ]);
157
157
$ axesAfter = $ this ->getContainer ([0 => 'first ' , 1 => 'second ' , 2 => 'third ' ]);
@@ -165,33 +165,33 @@ public function testSetValueFailsIfNoAdderNorRemoverFound()
165
165
166
166
public function testIsWritableReturnsTrueIfAdderAndRemoverExists ()
167
167
{
168
- $ car = new PropertyAccessorCollectionTest_Car ();
168
+ $ car = new PropertyAccessorCollectionTestCase_Car ();
169
169
$ this ->assertTrue ($ this ->propertyAccessor ->isWritable ($ car , 'axes ' ));
170
170
}
171
171
172
172
public function testIsWritableReturnsFalseIfOnlyAdderExists ()
173
173
{
174
- $ car = new PropertyAccessorCollectionTest_CarOnlyAdder ();
174
+ $ car = new PropertyAccessorCollectionTestCase_CarOnlyAdder ();
175
175
$ this ->assertFalse ($ this ->propertyAccessor ->isWritable ($ car , 'axes ' ));
176
176
}
177
177
178
178
public function testIsWritableReturnsFalseIfOnlyRemoverExists ()
179
179
{
180
- $ car = new PropertyAccessorCollectionTest_CarOnlyRemover ();
180
+ $ car = new PropertyAccessorCollectionTestCase_CarOnlyRemover ();
181
181
$ this ->assertFalse ($ this ->propertyAccessor ->isWritable ($ car , 'axes ' ));
182
182
}
183
183
184
184
public function testIsWritableReturnsFalseIfNoAdderNorRemoverExists ()
185
185
{
186
- $ car = new PropertyAccessorCollectionTest_CarNoAdderAndRemover ();
186
+ $ car = new PropertyAccessorCollectionTestCase_CarNoAdderAndRemover ();
187
187
$ this ->assertFalse ($ this ->propertyAccessor ->isWritable ($ car , 'axes ' ));
188
188
}
189
189
190
190
public function testSetValueFailsIfAdderAndRemoverExistButValueIsNotTraversable ()
191
191
{
192
192
$ this ->expectException (NoSuchPropertyException::class);
193
- $ this ->expectExceptionMessageMatches ('/The property "axes" in class "Symfony \\\Component \\\PropertyAccess \\\Tests \\\PropertyAccessorCollectionTest_Car " can be defined with the methods "addAxis\(\)", "removeAxis\(\)" but the new value must be an array or an instance of \\\Traversable\./ ' );
194
- $ car = new PropertyAccessorCollectionTest_Car ();
193
+ $ this ->expectExceptionMessageMatches ('/The property "axes" in class "Symfony \\\Component \\\PropertyAccess \\\Tests \\\PropertyAccessorCollectionTestCase_Car " can be defined with the methods "addAxis\(\)", "removeAxis\(\)" but the new value must be an array or an instance of \\\Traversable\./ ' );
194
+ $ car = new PropertyAccessorCollectionTestCase_Car ();
195
195
196
196
$ this ->propertyAccessor ->setValue ($ car , 'axes ' , 'Not an array or Traversable ' );
197
197
}
0 commit comments