Total Complexity | 5 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class ModelTest extends TestCase |
||
9 | { |
||
10 | public function testOffsetGet() |
||
11 | { |
||
12 | $data = ['hey' => 'there', 'us' => 'them']; |
||
13 | $model = $this->getMockForAbstractClass(AbstractModel::class, [$data]); |
||
14 | $this->assertSame('there', $model['hey']); |
||
15 | } |
||
16 | |||
17 | public function testOffsetSet() |
||
18 | { |
||
19 | $data = ['hey' => 'there']; |
||
20 | $model = $this->getMockForAbstractClass(AbstractModel::class, [$data]); |
||
21 | $model['you'] = 'two'; |
||
22 | $this->assertSame('two', $model['you']); |
||
23 | } |
||
24 | |||
25 | public function testOffsetSetNullOffset() |
||
26 | { |
||
27 | $model = $this->getMockForAbstractClass(AbstractModel::class); |
||
28 | $model[] = 'two'; |
||
29 | $this->assertSame('two', $model[0]); |
||
30 | } |
||
31 | |||
32 | public function testOffsetUnset() |
||
33 | { |
||
34 | $data = ['hey' => 'there', 'me' => 'you']; |
||
35 | $model = $this->getMockForAbstractClass(AbstractModel::class, [$data]); |
||
36 | unset($model['me']); |
||
37 | $this->assertNull($model['me']); |
||
38 | } |
||
39 | |||
40 | public function testToJson() |
||
44 | } |
||
45 | } |
||
46 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.