Skip to content

Commit 8c600da

Browse files
author
Babichev Maxim
committed
added rate overload check
1 parent 9c0a1a9 commit 8c600da

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

tests/TestCase.php

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@
22

33
namespace Bavix\Wallet\Test;
44

5-
use Bavix\Wallet\Interfaces\Rateable;
6-
use Bavix\Wallet\Models\Transaction;
7-
use Bavix\Wallet\Models\Transfer;
8-
use Bavix\Wallet\Models\Wallet;
9-
use Bavix\Wallet\Services\CommonService;
10-
use Bavix\Wallet\Services\ExchangeService;
115
use Bavix\Wallet\Services\ProxyService;
12-
use Bavix\Wallet\Services\WalletService;
136
use Bavix\Wallet\Test\Common\Rate;
147
use Bavix\Wallet\WalletServiceProvider;
158
use Illuminate\Foundation\Application;
@@ -48,6 +41,8 @@ public function setUp(): void
4841
*/
4942
protected function getPackageProviders($app): array
5043
{
44+
// Bind eloquent models to IoC container
45+
$app['config']->set('wallet.package.rateable', Rate::class);
5146
return [WalletServiceProvider::class];
5247
}
5348

@@ -59,16 +54,6 @@ protected function getPackageProviders($app): array
5954
*/
6055
protected function getEnvironmentSetUp($app): void
6156
{
62-
// Bind eloquent models to IoC container
63-
$app->singleton(Rateable::class, Rate::class);
64-
$app->singleton(Transaction::class, config('wallet.transaction.model'));
65-
$app->singleton(Transfer::class, config('wallet.transfer.model'));
66-
$app->singleton(Wallet::class, config('wallet.wallet.model'));
67-
$app->singleton(ExchangeService::class, config('wallet.services.exchange'));
68-
$app->singleton(CommonService::class, config('wallet.services.common'));
69-
$app->singleton(ProxyService::class, config('wallet.services.proxy'));
70-
$app->singleton(WalletService::class, config('wallet.services.wallet'));
71-
7257
$app['config']->set('database.default', 'testbench');
7358
$app['config']->set('database.connections.testbench', [
7459
'driver' => 'sqlite',

0 commit comments

Comments
 (0)