* remove unused file * fix paths leading slash * remove useless imports * refactor(legacy): use constants everywhere * fix path leading slash * remove useless import * consolidate legacy contants * format code * reuse LIBRETIME_CONFIG_DIR * fix test config path * remove ci legacy log dir creation * some logs improvements
23 lines
590 B
PHP
23 lines
590 B
PHP
<?php
|
|
|
|
/**
|
|
* @internal
|
|
* @coversNothing
|
|
*/
|
|
class ConfigTest extends PHPUnit_Framework_TestCase
|
|
{
|
|
public function testIsYesValue()
|
|
{
|
|
foreach (['yes', 'Yes', 'True', 'true', true] as $value) {
|
|
$this->assertEquals(Config::isYesValue($value), true);
|
|
}
|
|
|
|
foreach (['no', 'No', 'False', 'false', false] as $value) {
|
|
$this->assertEquals(Config::isYesValue($value), false);
|
|
}
|
|
|
|
foreach (['', 'anything', '0', 0, '1', 1, null] as $value) {
|
|
$this->assertEquals(Config::isYesValue($value), false);
|
|
}
|
|
}
|
|
}
|