Optimise test code.

This commit is contained in:
James Cole
2019-06-13 18:07:49 +02:00
parent 162c8af6ca
commit 5d1cfc661f
29 changed files with 110 additions and 75 deletions

View File

@@ -62,9 +62,9 @@ class CurrencyControllerTest extends TestCase
public function testStore(): void
{
$currency = TransactionCurrency::first();
$repository = $this->mock(CurrencyRepositoryInterface::class);
$transformer = $this->mock(CurrencyTransformer::class);
$currency = TransactionCurrency::first();
$repository = $this->mock(CurrencyRepositoryInterface::class);
$transformer = $this->mock(CurrencyTransformer::class);
$userRepository = $this->mock(UserRepositoryInterface::class);
// mock transformer
@@ -102,9 +102,9 @@ class CurrencyControllerTest extends TestCase
*/
public function testStoreWithDefault(): void
{
$currency = TransactionCurrency::first();
$repository = $this->mock(CurrencyRepositoryInterface::class);
$transformer = $this->mock(CurrencyTransformer::class);
$currency = TransactionCurrency::first();
$repository = $this->mock(CurrencyRepositoryInterface::class);
$transformer = $this->mock(CurrencyTransformer::class);
$userRepository = $this->mock(UserRepositoryInterface::class);
// mock transformer
@@ -188,9 +188,9 @@ class CurrencyControllerTest extends TestCase
*/
public function testUpdateWithDefault(): void
{
$currency = TransactionCurrency::first();
$repository = $this->mock(CurrencyRepositoryInterface::class);
$transformer = $this->mock(CurrencyTransformer::class);
$currency = TransactionCurrency::first();
$repository = $this->mock(CurrencyRepositoryInterface::class);
$transformer = $this->mock(CurrencyTransformer::class);
$this->mock(UserRepositoryInterface::class);
$preference = new Preference;
$preference->data = 'EUR';