From fed9078c42c4c80d77c2be56415f4eec3c31660e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 23:05:30 +0200 Subject: [PATCH] Travis... --- .travis.yml | 1 - app/Libraries/Utils.php | 4 ++-- tests/acceptance/OnlinePaymentCest.php | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5c8eeb309278..d13457af1a40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,6 @@ before_script: - sed -i 's/APP_ENV=production/APP_ENV=development/g' .env - sed -i 's/APP_DEBUG=false/APP_DEBUG=true/g' .env - sed -i 's/REQUIRE_HTTPS=false/NINJA_DEV=true/g' .env - - cat .env # create the database and user - mysql -u root -e "create database IF NOT EXISTS ninja;" - mysql -u root -e "GRANT ALL PRIVILEGES ON ninja.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;" diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index 53a586f804be..340cfdfeba48 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -62,12 +62,12 @@ class Utils return true; } - return isset($_ENV['NINJA_PROD']) && $_ENV['NINJA_PROD'] == 'true'; + return env('NINJA_PROD') == 'true'; } public static function isNinjaDev() { - return isset($_ENV['NINJA_DEV']) && $_ENV['NINJA_DEV'] == 'true'; + return env('NINJA_DEV') == 'true'; } public static function requireHTTPS() diff --git a/tests/acceptance/OnlinePaymentCest.php b/tests/acceptance/OnlinePaymentCest.php index c0dccf6188bd..ad4b15517579 100644 --- a/tests/acceptance/OnlinePaymentCest.php +++ b/tests/acceptance/OnlinePaymentCest.php @@ -28,7 +28,7 @@ class OnlinePaymentCest if (strpos($I->grabFromCurrentUrl(), 'create') !== false) { $I->fillField(['name' =>'23_apiKey'], env('stripe_secret_key') ?: Fixtures::get('stripe_secret_key')); // Fails to load StripeJS causing "ReferenceError: Can't find variable: Stripe" - //$I->fillField(['name' =>'publishable_key'], Fixtures::get('publishable_key')); + //$I->fillField(['name' =>'stripe_publishable_key'], env('stripe_secret_key') ?: Fixtures::get('stripe_publishable_key')); $I->selectOption('#token_billing_type_id', 4); $I->click('Save'); $I->see('Successfully created gateway');