mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-21 12:29:01 +02:00
26 lines
674 B
PHP
26 lines
674 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace RssBridge\Tests;
|
||
|
|
||
|
use Configuration;
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
|
||
|
final class ConfigurationTest extends TestCase
|
||
|
{
|
||
|
public function test()
|
||
|
{
|
||
|
putenv('RSSBRIDGE_system_timezone=Europe/Berlin');
|
||
|
Configuration::loadConfiguration();
|
||
|
|
||
|
// test nonsense
|
||
|
$this->assertSame(null, Configuration::getConfig('foobar', ''));
|
||
|
$this->assertSame(null, Configuration::getConfig('foo', 'bar'));
|
||
|
$this->assertSame(null, Configuration::getConfig('cache', ''));
|
||
|
|
||
|
// test value from env
|
||
|
$this->assertSame('Europe/Berlin', Configuration::getConfig('system', 'timezone'));
|
||
|
}
|
||
|
}
|