mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
github special case check
This commit is contained in:
parent
6459e61a63
commit
9d7d48f424
|
|
@ -19,10 +19,50 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
|||
use phpOMS\DataStorage\Session\HttpSession;
|
||||
use phpOMS\Log\FileLogger;
|
||||
|
||||
var_dump($_SERVER);
|
||||
var_dump(php_uname());
|
||||
var_dump(getenv());
|
||||
var_dump(ini_get_all());
|
||||
$IS_GITHUB = false;
|
||||
|
||||
$temp = \array_keys($_SERVER);
|
||||
foreach ($temp as $key) {
|
||||
if (\stripos(\strtolower($key), 'github') !== false) {
|
||||
$IS_GITHUB = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$IS_GITHUB) {
|
||||
foreach ($_SERVER as $value) {
|
||||
if (\stripos(\strtolower($value), 'github') !== false) {
|
||||
$IS_GITHUB = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$temp = \array_keys(\getenv());
|
||||
if (!$IS_GITHUB) {
|
||||
foreach ($temp as $key) {
|
||||
if (\stripos(\strtolower($key), 'github') !== false) {
|
||||
$IS_GITHUB = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$temp = \array_values(\getenv());
|
||||
if (!$IS_GITHUB) {
|
||||
foreach ($temp as $value) {
|
||||
if (\stripos(\strtolower($value), 'github') !== false) {
|
||||
$IS_GITHUB = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['is_github'] = $IS_GITHUB;
|
||||
|
||||
// Initialize file logger with correct path
|
||||
$tmp = FileLogger::getInstance(__DIR__ . '/../Logs');
|
||||
|
|
|
|||
|
|
@ -39,6 +39,12 @@ final class ImapTest extends \PHPUnit\Framework\TestCase
|
|||
);
|
||||
}
|
||||
|
||||
if ($GLOBALS['is_github']) {
|
||||
$this->markTestSkipped(
|
||||
'Imap is not working in github actions'
|
||||
);
|
||||
}
|
||||
|
||||
$this->handler = new Imap('testuser', 'testuser', 143);
|
||||
$this->handler->host = '127.0.0.1';
|
||||
$this->handler->flags = '/imap/notls/norsh/novalidate-cert';
|
||||
|
|
|
|||
|
|
@ -39,6 +39,12 @@ final class Pop3Test extends \PHPUnit\Framework\TestCase
|
|||
);
|
||||
}
|
||||
|
||||
if ($GLOBALS['is_github']) {
|
||||
$this->markTestSkipped(
|
||||
'Imap is not working in github actions'
|
||||
);
|
||||
}
|
||||
|
||||
$this->handler = new Pop3('testuser', 'testuser', 110);
|
||||
$this->handler->host = '127.0.0.1';
|
||||
$this->handler->flags = '/pop3/notls';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user