1 | <?php |
||
19 | class AbstractSnapshotTest extends PHPUnit_Framework_TestCase |
||
20 | { |
||
21 | /** |
||
22 | * @expectedException Totem\Exception\IncomparableDataException |
||
23 | * @expectedExceptionMessage This data is not comparable with the base |
||
24 | */ |
||
25 | public function testDiffIncomparable() |
||
30 | |||
31 | /** |
||
32 | * @expectedException InvalidArgumentException |
||
33 | * @expectedExceptionMessage The computed data is not an array, "string" given |
||
34 | */ |
||
35 | public function testComparableDataFailure() |
||
40 | |||
41 | /** |
||
42 | * @dataProvider existsProvider |
||
43 | */ |
||
44 | public function testOffsetExists($key, $expect) |
||
49 | |||
50 | public function existsProvider() |
||
55 | |||
56 | /** |
||
57 | * @expectedException BadMethodCallException |
||
58 | * @expectedExceptionMessage A snapshot is frozen by nature |
||
59 | */ |
||
60 | public function testOffsetUnset() |
||
65 | |||
66 | /** |
||
67 | * @expectedException BadMethodCallException |
||
68 | * @expectedExceptionMessage A snapshot is frozen by nature |
||
69 | */ |
||
70 | public function testOffsetSet() |
||
75 | |||
76 | /** |
||
77 | * @expectedException InvalidArgumentException |
||
78 | * @expectedExceptionMessage The computed data is not an array, "string" given |
||
79 | */ |
||
80 | public function testInvalidDataNormalizer() |
||
88 | |||
89 | /** @dataProvider normalizerProvider */ |
||
90 | public function testNormalizer($data, $snapshotClass, $setClass = null) |
||
110 | |||
111 | public function normalizerProvider() |
||
117 | |||
118 | public function testDiff() |
||
124 | |||
125 | public function testCorrectSetClass() |
||
130 | |||
131 | /** |
||
132 | * @expectedException InvalidArgumentException |
||
133 | * @expectedExceptionMessage A Set Class should be instantiable and implement Totem\SetInterface |
||
134 | */ |
||
135 | public function testWrongSetClass() |
||
140 | } |
||
141 | |||
142 |