diff --git a/tests/TestCase.php b/tests/TestCase.php index 4fa6707c85..0fa64e999a 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -42,7 +42,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase Log::debug('Created new database.'); touch($original); Artisan::call('migrate'); - copy($original, $copy); + // create EUR currency /** @var TransactionCurrency $currency */ @@ -50,8 +50,11 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase $currency->code = 'EUR'; $currency->save(); Log::debug('Created new EUR currency.'); + copy($original, $copy); } else { + if (file_exists($copy)) { + Log::debug('Copied copy back over original.'); copy($copy, $original); } } diff --git a/tests/repositories/CurrencyRepositoryTest.php b/tests/repositories/CurrencyRepositoryTest.php index 221ea6ec15..ad819a5b94 100644 --- a/tests/repositories/CurrencyRepositoryTest.php +++ b/tests/repositories/CurrencyRepositoryTest.php @@ -50,7 +50,7 @@ class CurrencyRepositoryTest extends TestCase FactoryMuffin::create('FireflyIII\Models\TransactionCurrency'); $set = $this->object->get(); - $this->assertCount(2, $set); + $this->assertCount(3, $set); // EUR is already present. } /**