From fcc1d62d9be96bfc31f962473bc798919f63f32c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 18 Feb 2016 16:59:50 +0200 Subject: [PATCH] Fixing test payment in Travis --- .travis.yml | 22 +++++++++++----------- tests/_bootstrap.php.default | 4 ++-- tests/acceptance/OnlinePaymentCest.php | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 10d7092e23..e059572897 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ install: - travis_retry composer install --prefer-dist; before_script: - - mysql -e 'SET @@GLOBAL.wait_timeout=28800' + - mysql -u root -e 'SET @@GLOBAL.wait_timeout=28800;' # copy configuration files - cp .env.example .env - cp tests/_bootstrap.php.default tests/_bootstrap.php @@ -62,17 +62,17 @@ before_script: script: #- php ./vendor/codeception/codeception/codecept run --html --debug - - php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php - - php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php - - php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php - - php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php - - php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php - - php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php - - php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceDesignCest.php + #- php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php + #- php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php + #- php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php + #- php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php + #- php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php + #- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php + #- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceDesignCest.php - php ./vendor/codeception/codeception/codecept run --debug acceptance OnlinePaymentCest.php - - php ./vendor/codeception/codeception/codecept run --debug acceptance PaymentCest.php - - php ./vendor/codeception/codeception/codecept run --debug acceptance TaskCest.php - - php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php + #- php ./vendor/codeception/codeception/codecept run --debug acceptance PaymentCest.php + #- php ./vendor/codeception/codeception/codecept run --debug acceptance TaskCest.php + #- php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php #- php ./vendor/codeception/codeception/codecept run--debug acceptance GoProCest.php after_script: diff --git a/tests/_bootstrap.php.default b/tests/_bootstrap.php.default index 19fc7eba0d..33ecdcb607 100644 --- a/tests/_bootstrap.php.default +++ b/tests/_bootstrap.php.default @@ -7,5 +7,5 @@ Fixtures::add('username', 'user@example.com'); Fixtures::add('password', 'password'); Fixtures::add('api_secret', 'password'); -Fixtures::add('secret_key', ''); -Fixtures::add('publishable_key', ''); \ No newline at end of file +Fixtures::add('stripe_secret_key', ''); +Fixtures::add('stripe_publishable_key', ''); \ No newline at end of file diff --git a/tests/acceptance/OnlinePaymentCest.php b/tests/acceptance/OnlinePaymentCest.php index be21ce3a95..c0dccf6188 100644 --- a/tests/acceptance/OnlinePaymentCest.php +++ b/tests/acceptance/OnlinePaymentCest.php @@ -26,7 +26,7 @@ class OnlinePaymentCest $I->amOnPage('/settings/online_payments'); if (strpos($I->grabFromCurrentUrl(), 'create') !== false) { - $I->fillField(['name' =>'23_apiKey'], Fixtures::get('secret_key')); + $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->selectOption('#token_billing_type_id', 4);