Code Duplication    Length = 18-18 lines in 3 locations

tests/Localization/ItTest.php 1 location

@@ 17-34 (lines=18) @@
14
use HMLB\Date\Date;
15
use HMLB\Date\Tests\AbstractTestCase;
16
17
class ItTest extends AbstractTestCase
18
{
19
    public function testDiffForHumansLocalizedInItalian()
20
    {
21
        Date::setLocale('it');
22
23
        $scope = $this;
24
        $this->wrapWithTestNow(
25
            function () use ($scope) {
26
                $d = Date::now()->addYear();
27
                $scope->assertSame('1 anno da adesso', $d->diffForHumans());
28
29
                $d = Date::now()->addYears(2);
30
                $scope->assertSame('2 anni da adesso', $d->diffForHumans());
31
            }
32
        );
33
    }
34
}
35

tests/Localization/KoTest.php 1 location

@@ 17-34 (lines=18) @@
14
use HMLB\Date\Date;
15
use HMLB\Date\Tests\AbstractTestCase;
16
17
class KoTest extends AbstractTestCase
18
{
19
    public function testDiffForHumansLocalizedInKorean()
20
    {
21
        Date::setLocale('ko');
22
23
        $scope = $this;
24
        $this->wrapWithTestNow(
25
            function () use ($scope) {
26
                $d = Date::now()->addYear();
27
                $scope->assertSame('1 년 후', $d->diffForHumans());
28
29
                $d = Date::now()->addYears(2);
30
                $scope->assertSame('2 년 후', $d->diffForHumans());
31
            }
32
        );
33
    }
34
}
35

tests/Localization/LtTest.php 1 location

@@ 17-34 (lines=18) @@
14
use HMLB\Date\Date;
15
use HMLB\Date\Tests\AbstractTestCase;
16
17
class LtTest extends AbstractTestCase
18
{
19
    public function testDiffForHumansLocalizedInLithuanian()
20
    {
21
        Date::setLocale('lt');
22
23
        $scope = $this;
24
        $this->wrapWithTestNow(
25
            function () use ($scope) {
26
                $d = Date::now()->addYear();
27
                $scope->assertSame('už 1 metus', $d->diffForHumans());
28
29
                $d = Date::now()->addYears(2);
30
                $scope->assertSame('už 2 metus', $d->diffForHumans());
31
            }
32
        );
33
    }
34
}
35