Code Duplication    Length = 10-10 lines in 2 locations

tests/Converter/CurrencyConverterTest.php 1 location

@@ 44-53 (lines=10) @@
41
        $converter->convert(new ConvertibleValue('10', $converter::$eur), new Unit('eur', '€', '1'));
42
    }
43
44
    public function testOwnTypePassed()
45
    {
46
        $converter = $this->getConverter();
47
        $converter->addUnit(new Unit('myCurrency', 'mc', '5'));
48
        $result = $converter->convert(new ConvertibleValue('1', $converter::$eur), new Unit('myCurrency', 'mc', '5'));
49
50
        $this->assertEquals('5', $result->getValue());
51
        $this->assertEquals(new Unit('myCurrency', 'mc', '5'), $result->getUnit());
52
        $this->assertEquals('mc', $result->getUnit()->getAbbreviation());
53
    }
54
55
    /**
56
     * @return array

tests/Converter/LengthConverterTest.php 1 location

@@ 43-52 (lines=10) @@
40
        $converter->convert(new ConvertibleValue('10000', $converter::$nanometer), new Unit('noUnit', 'nu', '1'));
41
    }
42
43
    public function testOwnTypePassed()
44
    {
45
        $converter = $this->getConverter();
46
        $converter->addUnit(new Unit('myUnit', 'mu', '5'));
47
        $result = $converter->convert(new ConvertibleValue('1', $converter::$meter), new Unit('myUnit', 'mu', '5'));
48
49
        $this->assertEquals('5', $result->getValue());
50
        $this->assertEquals(new Unit('myUnit', 'mu', '5'), $result->getUnit());
51
        $this->assertEquals('mu', $result->getUnit()->getAbbreviation());
52
    }
53
54
    /**
55
     * @return array