Code Duplication    Length = 17-18 lines in 2 locations

tests/VersionsCheckTest.php 2 locations

@@ 107-124 (lines=18) @@
104
     * @param bool $preferStable
105
     * @param int  $outdatedPackagesCount
106
     */
107
    public function testMultiplePackagesComparison(array $packagesData, $preferStable, $outdatedPackagesCount)
108
    {
109
        $this->rootPackage->setMinimumStability('dev');
110
        $this->rootPackage->setPreferStable($preferStable);
111
112
        $shouldBeUpdatedOutput = $this->addPackagesAndGetShouldBeUpdatedOutput($packagesData);
113
114
        $this->checkPackages();
115
116
        $this->assertSame(sprintf(<<<'EOF'
117
<warning>%d packages are not up to date:</warning>
118
119
%s
120
121
122
EOF
123
        , $outdatedPackagesCount, implode("\n\n", $shouldBeUpdatedOutput)), $this->versionsCheck->getOutput());
124
    }
125
126
    /**
127
     * @return array
@@ 193-209 (lines=17) @@
190
    /**
191
     * @dataProvider getRootOnlyPackageTestsData
192
     */
193
    public function testRootOnlyPackage(array $packagesData, array $packagesRequired, array $packagesDevRequired, $rootOnly, $outdatedPackagesCount)
194
    {
195
        $shouldBeUpdatedOutput = $this->addPackagesAndGetShouldBeUpdatedOutput($packagesData);
196
        $this->rootPackage->setRequires($packagesRequired);
197
        $this->rootPackage->setDevRequires($packagesDevRequired);
198
199
        $this->checkPackages($rootOnly);
200
201
        $this->assertSame(sprintf(<<<'EOF'
202
<warning>%d packages are not up to date:</warning>
203
204
%s
205
206
207
EOF
208
            , $outdatedPackagesCount, implode("\n\n", $shouldBeUpdatedOutput)), $this->versionsCheck->getOutput());
209
    }
210
211
    /**
212
     * @return array