Code Duplication    Length = 12-14 lines in 2 locations

tests/MetableTest.php 2 locations

@@ 29-40 (lines=12) @@
26
        $this->assertTrue($m->isDirty('foo'));
27
    }
28
29
    public function testIsDirtyMeta()
30
    {
31
        $m = $this->getMetableStub();
32
33
        $item = new MetaItem(['key' => 'foo', 'value' => 'bar']);
34
35
        $m->meta->add($item);
36
37
        $this->assertTrue($m->isDirty());
38
39
        $this->assertTrue($m->isDirty('value'));
40
    }
41
42
    public function testGetMetaItemClassNameDefault()
43
    {
@@ 133-146 (lines=14) @@
130
        $this->assertCount(0, $m->meta);
131
    }
132
133
    public function testObserveDeleteAndCascade()
134
    {
135
        $m = $this->getMetableStub();
136
137
        $item = new MetaItem(['key' => 'foo', 'value' => 'bar']);
138
139
        $m->meta->add($item);
140
141
        $m->save();
142
143
        $m->delete();
144
145
        $this->assertNull(MetaItem::first());
146
    }
147
148
    protected function getMetableStub()
149
    {