Code Duplication    Length = 11-12 lines in 2 locations

tests/TestCase/Controller/Component/CurrencyConverterComponentTest.php 1 location

@@ 140-150 (lines=11) @@
137
        $this->assertEquals($expected, $result);
138
    }
139
140
    public function testConvertUsingDatabaseWhenRateExistInDatabaseAndNoNeedToBeUpdated()
141
    {
142
        $amount = 20.00;
143
        $fromCurrency = 'EUR';
144
        $toCurrency = 'GBP';
145
146
        $result = $this->CurrencyConverter->convert($amount, $fromCurrency, $toCurrency);
147
        $expected = round(number_format(0.8 * 20.00, 2), 2);
148
149
        $this->assertEquals($expected, $result);
150
    }
151
152
    public function testConvertUsingDatabaseWhenRateExistInDatabaseAndNeedToBeUpdated()
153
    {

tests/TestCase/View/Helper/CurrencyConverterHelperTest.php 1 location

@@ 140-151 (lines=12) @@
137
        $this->assertEquals($expected, $result);
138
    }
139
140
    public function testConvertUsingDatabaseWhenRateExistInDatabaseAndNoNeedToBeUpdated()
141
    {
142
        $amount = 20.00;
143
        $fromCurrency = 'EUR';
144
        $toCurrency = 'GBP';
145
146
        $result = $this->CurrencyConverter->convert($amount, $fromCurrency, $toCurrency);
147
        $expected = round(number_format(0.8 * 20.00, 2), 2);
148
149
        $this->assertEquals($expected, $result);
150
151
    }
152
153
    public function testConvertUsingDatabaseWhenRateExistInDatabaseAndNeedToBeUpdated()
154
    {