File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# PayTech - PHP API Client (installable with Composer)
22
3- [ ![ Coverage Status] ( https://img.shields.io/badge/coverage-100 %25-success )] ( https://coveralls.io/github/PapiHack/paytech-php-client?branch=master )
3+ [ ![ Coverage Status] ( https://img.shields.io/badge/coverage-99.25 %25-success )] ( https://coveralls.io/github/PapiHack/paytech-php-client?branch=master )
44![ Issues] ( https://img.shields.io/github/issues/PapiHack/paytech-php-client )
55![ PR] ( https://img.shields.io/github/issues-pr/PapiHack/paytech-php-client )
66[ ![ Latest Stable Version] ( https://poser.pugx.org/papihack/paytech-php-client/v )] ( //packagist.org/packages/papihack/paytech-php-client )
Original file line number Diff line number Diff line change @@ -31,6 +31,6 @@ public static function isCurrencyAllowed($currency)
3131
3232 public static function isEnvAllowed ($ env )
3333 {
34- return array_search (strtoupper ($ env ), self ::autorizedEnv);
34+ return in_array (strtoupper ($ env ), self ::autorizedEnv);
3535 }
3636}
Original file line number Diff line number Diff line change 5858 it ('Should raise an CurrencyException when currency is not allowed ' , function () {
5959 $ this ->expectException (\PayTech \Exceptions \CurrencyException::class);
6060 Config::setCurrency ('dummy currency ' );
61- });
61+ });
62+
63+ it ('Should raise an Exception when env is not allowed ' , function () {
64+ $ this ->expectException (\Exception::class);
65+ Config::setEnv ('dummyEnv ' );
66+ });
67+
68+ it ('Should set Env when env is allowed ' , function () {
69+ Config::setEnv (\PayTech \Enums \Environment::TEST );
70+ $ this ->assertIsString (Config::getEnv ());
71+ });
You can’t perform that action at this time.
0 commit comments