allow to configure default values for users (#919)

This commit is contained in:
Kevin Papst
2019-07-05 02:42:50 +02:00
committed by GitHub
parent 3457f93ed0
commit 19843760e5
12 changed files with 142 additions and 29 deletions

View File

@@ -61,11 +61,12 @@ class CustomerControllerTest extends ControllerBaseTest
$kernel = self::bootKernel();
$container = $kernel->getContainer();
$defaults = $container->getParameter('kimai.defaults')['customer'];
$this->assertNull($defaults['timezone']);
$editForm = $client->getCrawler()->filter('form[name=customer_edit_form]')->form();
$this->assertEquals($defaults['country'], $editForm->get('customer_edit_form[country]')->getValue());
$this->assertEquals($defaults['currency'], $editForm->get('customer_edit_form[currency]')->getValue());
$this->assertEquals($defaults['timezone'], $editForm->get('customer_edit_form[timezone]')->getValue());
$this->assertEquals(date_default_timezone_get(), $editForm->get('customer_edit_form[timezone]')->getValue());
$client->submit($form, [
'customer_edit_form' => [