Compare commits
22 Commits
feature-ph
...
master
Author | SHA1 | Date |
---|---|---|
David Goodwin | 864065cd37 | 5 years ago |
David Goodwin | 192c797fe1 | 5 years ago |
David Goodwin | 052f2faffb | 5 years ago |
David Goodwin | 85e15790bb | 5 years ago |
Christian Boltz | ad4142134a | 5 years ago |
Christian Boltz | 9833a8f289 | 5 years ago |
Christian Boltz | 4e9e3db75d | 5 years ago |
David Goodwin | fc464d6e69 | 5 years ago |
David Goodwin | df9a400ea2 | 5 years ago |
David Goodwin | fd48714615 | 5 years ago |
Christian Boltz | 44c3ac5e20 | 5 years ago |
David Goodwin | be0105b33e | 5 years ago |
drakos | f17c722f0b | 5 years ago |
David Goodwin | 844840c6a8 | 5 years ago |
David Goodwin | e4158d6d7e | 5 years ago |
David Goodwin | f8415eef2a | 5 years ago |
David Goodwin | ffc7787b76 | 5 years ago |
David Goodwin | 3cd62f9f4f | 5 years ago |
David Goodwin | 5e8ce2b5b0 | 5 years ago |
David Goodwin | c69211ca5f | 5 years ago |
David Goodwin | eea72e0019 | 5 years ago |
Christian Boltz | 3b704715dc | 5 years ago |
@ -0,0 +1,33 @@
|
|||||||
|
<?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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue