added project importer and grandtotal converter (#1468)

This commit is contained in:
Kevin Papst
2020-10-11 22:08:00 +02:00
committed by GitHub
parent 0ce02b4f06
commit 996f05c73a
68 changed files with 2827 additions and 384 deletions

View File

@@ -51,6 +51,12 @@ class SystemConfigurationTest extends TestCase
'currency' => 'GBP',
'country' => 'FR',
],
'user' => [
'timezone' => 'foo/bar',
'theme' => 'blue',
'language' => 'IT',
'currency' => 'USD',
],
],
'calendar' => [
'businessHours' => [
@@ -164,4 +170,28 @@ class SystemConfigurationTest extends TestCase
$sources = $sut->getCalendarGoogleSources();
$this->assertEquals(2, \count($sources));
}
public function testFormDefaultWithoutLoader()
{
$sut = $this->getSut($this->getDefaultSettings(), []);
$this->assertEquals('Europe/London', $sut->getCustomerDefaultTimezone());
$this->assertEquals('GBP', $sut->getCustomerDefaultCurrency());
$this->assertEquals('FR', $sut->getCustomerDefaultCountry());
$this->assertEquals('foo/bar', $sut->getUserDefaultTimezone());
$this->assertEquals('blue', $sut->getUserDefaultTheme());
$this->assertEquals('IT', $sut->getUserDefaultLanguage());
$this->assertEquals('USD', $sut->getUserDefaultCurrency());
}
public function testFormDefaultWithLoader()
{
$sut = $this->getSut($this->getDefaultSettings(), $this->getDefaultLoaderSettings());
$this->assertEquals('Russia/Moscov', $sut->getCustomerDefaultTimezone());
$this->assertEquals('RUB', $sut->getCustomerDefaultCurrency());
$this->assertEquals('FR', $sut->getCustomerDefaultCountry());
$this->assertEquals('foo/bar', $sut->getUserDefaultTimezone());
$this->assertEquals('blue', $sut->getUserDefaultTheme());
$this->assertEquals('IT', $sut->getUserDefaultLanguage());
$this->assertEquals('USD', $sut->getUserDefaultCurrency());
}
}