events: extend system configurations and set invoice formatter (#1995)

This commit is contained in:
Kevin Papst
2020-09-25 19:51:23 +02:00
committed by GitHub
parent 23f484a14d
commit 2b033710e2
10 changed files with 119 additions and 41 deletions

View File

@@ -86,14 +86,13 @@ class FormConfigurationTest extends TestCase
$this->assertEquals('FR', $sut->find('defaults.customer.country'));
}
public function testUnknownConfigAreNotImportedAndFindingThemThrowsException()
public function testUnknownConfigAreImported()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Unknown config: foobar');
$sut = $this->getSut($this->getDefaultSettings(), [
(new Configuration())->setName('defaults.customer.foobar')->setValue('hello'),
]);
$this->assertTrue($sut->has('customer.foobar'));
$this->assertFalse($sut->has('xxxx.foobar'));
$this->assertEquals('hello', $sut->find('customer.foobar'));
}
}