sintonia/legacy/tests/application/configs/ConfigTest.php
Jonas L 729a7b99e0
feat(legacy): consolidate constants (#1558)
* 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
2022-02-04 12:00:41 +02:00

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);
}
}
}