mirror of
https://github.com/predis/predis.git
synced 2026-09-16 05:17:02 +00:00
[tests] Add utility method to skip tests on CI environment.
This commit is contained in:
@@ -372,4 +372,16 @@ abstract class PredisTestCase extends \PHPUnit\Framework\TestCase
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Marks current test skipped when test suite is running on CI environments.
|
||||||
|
*
|
||||||
|
* @param string $message
|
||||||
|
*/
|
||||||
|
protected function markTestSkippedOnCIEnvironment(string $message = 'Test skipped on CI environment'): void
|
||||||
|
{
|
||||||
|
if (getenv('GITHUB_ACTIONS') || getenv('TRAVIS')) {
|
||||||
|
$this->markTestSkipped($message);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user