Code Duplication    Length = 9-10 lines in 2 locations

tests/unit/Rules/AttributeSetTest.php 2 locations

@@ 14-22 (lines=9) @@
11
12
class AttributeSetTest extends TestCase
13
{
14
    public function testShouldAcceptAttributeRule()
15
    {
16
        $attribute = new Attribute('foo', new AlwaysValid(), false);
17
        $attributeSet = new AttributeSet($attribute);
18
19
        $rules = $attributeSet->getRules();
20
21
        $this->assertSame(current($rules), $attribute);
22
    }
23
24
    public function testShouldAcceptAllOfWithOneAttributeRule()
25
    {
@@ 24-33 (lines=10) @@
21
        $this->assertSame(current($rules), $attribute);
22
    }
23
24
    public function testShouldAcceptAllOfWithOneAttributeRule()
25
    {
26
        $attribute = new Attribute('foo', new AlwaysValid(), false);
27
        $allOf = new AllOf($attribute);
28
        $attributeSet = new AttributeSet($allOf);
29
30
        $rules = $attributeSet->getRules();
31
32
        $this->assertSame(current($rules), $attribute);
33
    }
34
35
    /**
36
     * @expectedException \Respect\Validation\Exceptions\ComponentException