mirror of
https://github.com/ovh/php-ovh.git
synced 2023-11-05 03:20:26 +01:00
test: skip functional tests if no credentials are provided
Signed-off-by: Adrien Barreau <adrien.barreau@ovhcloud.com>
This commit is contained in:
parent
255b26a56e
commit
73dab16efb
@ -86,6 +86,13 @@ class ApiFunctionalTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
protected function setUp() :void
|
protected function setUp() :void
|
||||||
{
|
{
|
||||||
|
foreach (['APP_KEY', 'APP_SECRET', 'CONSUMER', 'ENDPOINT'] as $envName) {
|
||||||
|
if (!getenv($envName)) {
|
||||||
|
$this->markTestSkipped("Skip test due to missing $envName variable");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->application_key = getenv('APP_KEY');
|
$this->application_key = getenv('APP_KEY');
|
||||||
$this->application_secret = getenv('APP_SECRET');
|
$this->application_secret = getenv('APP_SECRET');
|
||||||
$this->consumer_key = getenv('CONSUMER');
|
$this->consumer_key = getenv('CONSUMER');
|
||||||
|
Loading…
Reference in New Issue
Block a user