22
33namespace 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 ;
115use Bavix \Wallet \Services \ProxyService ;
12- use Bavix \Wallet \Services \WalletService ;
136use Bavix \Wallet \Test \Common \Rate ;
147use Bavix \Wallet \WalletServiceProvider ;
158use 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