Code Duplication    Length = 8-8 lines in 2 locations

tests/Doctrine/Tests/ODM/CouchDB/Functional/RepositoryTest.php 2 locations

@@ 105-112 (lines=8) @@
102
103
    public function testFindBy()
104
    {
105
        for ($i = 0; $i < 10; $i++) {
106
            $user = new \Doctrine\Tests\Models\CMS\CmsUser();
107
            $user->username = "beberlei" . $i;
108
            $user->status = ($i % 2 == 0) ? "active" : "inactive";
109
            $user->name = "Benjamin";
110
111
            $this->dm->persist($user);
112
        }
113
        $this->dm->flush();
114
115
        $users = $this->dm->getRepository('Doctrine\Tests\Models\CMS\CmsUser')->findBy(array('status' => 'active'));
@@ 137-144 (lines=8) @@
134
135
    public function testFindByManyConstraints()
136
    {
137
        for ($i = 0; $i < 10; $i++) {
138
            $user = new \Doctrine\Tests\Models\CMS\CmsUser();
139
            $user->username = "beberlei" . $i;
140
            $user->status = ($i % 2 == 0) ? "active" : "inactive";
141
            $user->name = "Benjamin" . $i;
142
143
            $this->dm->persist($user);
144
        }
145
        $this->dm->flush();
146
147
        $users = $this->dm->getRepository('Doctrine\Tests\Models\CMS\CmsUser')->findBy(array('username' => 'beberlei0'));