1 | <?php |
||
6 | class FieldTest extends TestCase |
||
|
|||
7 | { |
||
8 | /** |
||
9 | * @expectedException Radowoj\Yaah\Exception |
||
10 | * @expectedExceptionMessage fid must be an integer |
||
11 | */ |
||
12 | public function testNonIntegerFid() |
||
16 | |||
17 | |||
18 | /** |
||
19 | * Tests that output of Field->toArray() has the exact keys expected by WebAPI |
||
20 | * @return void |
||
21 | */ |
||
22 | public function testReturnedArray() |
||
49 | |||
50 | |||
51 | public function valueTypesProvider() |
||
73 | |||
74 | |||
75 | /** |
||
76 | * Test if various value types are properly handled |
||
77 | * @dataProvider valueTypesProvider |
||
78 | */ |
||
79 | public function testValueTypes($testValue, $arrayKey) |
||
86 | |||
87 | |||
88 | |||
89 | public function rangeValueTypesProvider() |
||
107 | |||
108 | |||
109 | /** |
||
110 | * Test if various value types are properly handled |
||
111 | * @dataProvider rangeValueTypesProvider |
||
112 | */ |
||
113 | public function testRangeValues($testRange, $rangeKey) |
||
137 | |||
138 | |||
139 | /** |
||
140 | * Test forced value type - datetime |
||
141 | * @return void |
||
142 | */ |
||
143 | public function testDatetimeValue() |
||
151 | |||
152 | /** |
||
153 | * @expectedException Radowoj\Yaah\Exception |
||
154 | * @expectedExceptionMessage Not supported value type: object; fid=1 |
||
155 | */ |
||
156 | public function testExceptionOnInvalidValue() |
||
160 | |||
161 | |||
162 | /** |
||
163 | * @expectedException Radowoj\Yaah\Exception |
||
164 | * @expectedExceptionMessage Class Radowoj\Yaah\Field does not have property: fvalueUnicorn |
||
165 | */ |
||
166 | public function testExceptionOnInvalidForcedValue() |
||
170 | |||
171 | |||
172 | /** |
||
173 | * Test fid value |
||
174 | * @return void |
||
175 | */ |
||
176 | public function testFid() |
||
181 | |||
182 | } |
||
183 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.