Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ public function getFlickr(bool $authenticate = false): PhpFlickr
$apiSecret = getenv('FLICKR_API_SECRET');
$accessToken = getenv('FLICKR_ACCESS_TOKEN');
$accessTokenSecret = getenv('FLICKR_ACCESS_SECRET');
if (empty($apiKey) && file_exists(__DIR__ . '/config.php')) {
require __DIR__ . '/config.php';
$configFile = __DIR__ . '/config.php';
if (empty($apiKey) && file_exists($configFile)) {
require $configFile;
}
if (empty($apiKey)) {
// Skip if no key found, so PRs from forks can still be run in CI.
static::markTestSkipped('No Flickr API key set.');
static::markTestSkipped('No Flickr API key set (in either the FLICKR_* env vars or ' . $configFile . ')');
}
try {
$this->flickrs[$authed] = new PhpFlickr($apiKey, $apiSecret);
Expand Down
Loading