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() |
||
60 | |||
61 | |||
62 | /** |
||
63 | * Test if various value types are properly handled |
||
64 | * @dataProvider valueTypesProvider |
||
65 | */ |
||
66 | public function testValueTypes($testValue, $arrayKey) |
||
73 | |||
74 | |||
75 | /** |
||
76 | * Test forced value type - datetime |
||
77 | * @return void |
||
78 | */ |
||
79 | public function testDatetimeValue() |
||
87 | |||
88 | /** |
||
89 | * @expectedException Radowoj\Yaah\Exception |
||
90 | * @expectedExceptionMessage Not supported value type: object; fid=1 |
||
91 | */ |
||
92 | public function testExceptionOnInvalidValue() |
||
96 | |||
97 | |||
98 | /** |
||
99 | * @expectedException Radowoj\Yaah\Exception |
||
100 | * @expectedExceptionMessage Class Radowoj\Yaah\Field does not have property: fvalueUnicorn |
||
101 | */ |
||
102 | public function testExceptionOnInvalidForcedValue() |
||
106 | |||
107 | |||
108 | /** |
||
109 | * Test fid value |
||
110 | * @return void |
||
111 | */ |
||
112 | public function testFid() |
||
117 | |||
118 | } |
||
119 |
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.