Code Duplication    Length = 11-12 lines in 2 locations

tests/Doctrine/Tests/ORM/Functional/BasicFunctionalTest.php 2 locations

@@ 926-936 (lines=11) @@
923
        $this->assertEquals('active', $user2->status);
924
    }
925
926
    public function testMergeThrowsExceptionIfEntityWithGeneratedIdentifierDoesNotExist()
927
    {
928
        $user = new CmsUser();
929
        $user->username = "beberlei";
930
        $user->name = "Benjamin E.";
931
        $user->status = 'active';
932
        $user->id = 42;
933
934
        $this->expectException(EntityNotFoundException::class);
935
        $this->_em->merge($user);
936
    }
937
938
    /**
939
     * @group DDC-634
@@ 1102-1113 (lines=12) @@
1099
    /**
1100
     * @group DDC-720
1101
     */
1102
    public function testFlushSingleUnmanagedEntity()
1103
    {
1104
        $user = new CmsUser;
1105
        $user->name = 'Dominik';
1106
        $user->username = 'domnikl';
1107
        $user->status = 'developer';
1108
1109
        $this->expectException(\InvalidArgumentException::class);
1110
        $this->expectExceptionMessage('Entity has to be managed or scheduled for removal for single computation');
1111
1112
        $this->_em->flush($user);
1113
    }
1114
1115
    /**
1116
     * @group DDC-720