Code Duplication    Length = 8-10 lines in 2 locations

src/Kunstmaan/AdminBundle/Tests/Entity/GroupTest.php 1 location

@@ 113-122 (lines=10) @@
110
     * @covers Kunstmaan\AdminBundle\Entity\Group::addRole
111
     * @covers Kunstmaan\AdminBundle\Entity\Group::removeRole
112
     */
113
    public function testRemoveRole()
114
    {
115
        /* @var $role Role */
116
        $role = $this->getRole();
117
        $this->object->addRole($role);
118
        $this->assertTrue($this->object->hasRole('role1'));
119
120
        $this->object->removeRole('role1');
121
        $this->assertFalse($this->object->hasRole('role1'));
122
    }
123
124
    /**
125
     * @expectedException \InvalidArgumentException

src/Kunstmaan/AdminBundle/Tests/Entity/UserTest.php 1 location

@@ 105-112 (lines=8) @@
102
    /**
103
     * @covers Kunstmaan\AdminBundle\Entity\User::hasRole
104
     */
105
    public function testHasRole()
106
    {
107
        $this->object->addRole('ROLE_CUSTOM');
108
        $this->assertTrue($this->object->hasRole('ROLE_CUSTOM'));
109
110
        $this->object->removeRole('ROLE_CUSTOM');
111
        $this->assertFalse($this->object->hasRole('ROLE_CUSTOM'));
112
    }
113
}
114