composer update (#1104)

This commit is contained in:
Kevin Papst
2019-09-13 17:16:53 +02:00
committed by GitHub
parent 8f2b82b832
commit 35c65ba890
10 changed files with 664 additions and 480 deletions

View File

@@ -73,7 +73,7 @@
"symfony/phpunit-bridge": "^4.0", "symfony/phpunit-bridge": "^4.0",
"symfony/profiler-pack": "^1.0", "symfony/profiler-pack": "^1.0",
"symfony/thanks": "^1.0", "symfony/thanks": "^1.0",
"symfony/web-server-bundle": "~4.2.0" "symfony/web-server-bundle": "^4.0"
}, },
"config": { "config": {
"platform": { "platform": {

1103
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -168,9 +168,14 @@ class Extensions extends AbstractExtension
*/ */
public function country($country) public function country($country)
{ {
$country = strtoupper($country);
if (Countries::exists($country)) {
return Countries::getName($country); return Countries::getName($country);
} }
return $country;
}
/** /**
* @param string $url * @param string $url
* @return string * @return string

View File

@@ -426,6 +426,9 @@
"symfony/cache": { "symfony/cache": {
"version": "v4.0.3" "version": "v4.0.3"
}, },
"symfony/cache-contracts": {
"version": "v1.1.5"
},
"symfony/config": { "symfony/config": {
"version": "v4.0.3" "version": "v4.0.3"
}, },
@@ -438,9 +441,6 @@
"ref": "9f94d3ea453cd8a3b95db7f82592d7344fe3a76a" "ref": "9f94d3ea453cd8a3b95db7f82592d7344fe3a76a"
} }
}, },
"symfony/contracts": {
"version": "v1.0.2"
},
"symfony/css-selector": { "symfony/css-selector": {
"version": "v4.0.4" "version": "v4.0.4"
}, },
@@ -474,6 +474,9 @@
"symfony/event-dispatcher": { "symfony/event-dispatcher": {
"version": "v4.0.3" "version": "v4.0.3"
}, },
"symfony/event-dispatcher-contracts": {
"version": "v1.1.5"
},
"symfony/expression-language": { "symfony/expression-language": {
"version": "v4.0.3" "version": "v4.0.3"
}, },
@@ -621,6 +624,9 @@
"symfony/serializer": { "symfony/serializer": {
"version": "v4.1.2" "version": "v4.1.2"
}, },
"symfony/service-contracts": {
"version": "v1.1.6"
},
"symfony/stopwatch": { "symfony/stopwatch": {
"version": "v4.0.3" "version": "v4.0.3"
}, },
@@ -648,6 +654,9 @@
"ref": "6bcd6c570c017ea6ae5a7a6a027c929fd3542cd8" "ref": "6bcd6c570c017ea6ae5a7a6a027c929fd3542cd8"
} }
}, },
"symfony/translation-contracts": {
"version": "v1.1.6"
},
"symfony/twig-bridge": { "symfony/twig-bridge": {
"version": "v4.0.3" "version": "v4.0.3"
}, },

View File

@@ -209,6 +209,7 @@ abstract class ControllerBaseTest extends WebTestCase
{ {
$node = $client->getCrawler()->filter('section.content-header div.breadcrumb div.box-tools div.btn-group a.btn'); $node = $client->getCrawler()->filter('section.content-header div.breadcrumb div.box-tools div.btn-group a.btn');
/** @var \DOMElement $element */
foreach ($node->getIterator() as $element) { foreach ($node->getIterator() as $element) {
$expectedClass = str_replace('btn btn-default btn-', '', $element->getAttribute('class')); $expectedClass = str_replace('btn btn-default btn-', '', $element->getAttribute('class'));
self::assertArrayHasKey($expectedClass, $buttons); self::assertArrayHasKey($expectedClass, $buttons);
@@ -255,7 +256,9 @@ abstract class ControllerBaseTest extends WebTestCase
$validation = $list->filter('li.text-danger'); $validation = $list->filter('li.text-danger');
if (count($validation) < 1) { if (count($validation) < 1) {
// decorated form fields with icon have a different html structure, see kimai-theme.html.twig // decorated form fields with icon have a different html structure, see kimai-theme.html.twig
$classes = $field->parents()->getNode(1)->getAttribute('class'); /** @var \DOMElement $listMsg */
$listMsg = $field->parents()->getNode(1);
$classes = $listMsg->getAttribute('class');
self::assertContains('has-error', $classes, 'Form field has no validation message: ' . $name); self::assertContains('has-error', $classes, 'Form field has no validation message: ' . $name);
} }
} }

View File

@@ -60,6 +60,7 @@ class ExportControllerTest extends ControllerBaseTest
$expected = ['csv', 'html', 'pdf', 'xlsx']; $expected = ['csv', 'html', 'pdf', 'xlsx'];
$node = $client->getCrawler()->filter('#export-buttons button'); $node = $client->getCrawler()->filter('#export-buttons button');
$this->assertEquals(count($expected), $node->count()); $this->assertEquals(count($expected), $node->count());
/** @var \DOMElement $button */
foreach ($node->getIterator() as $button) { foreach ($node->getIterator() as $button) {
$type = $button->getAttribute('data-type'); $type = $button->getAttribute('data-type');
$this->assertContains($type, $expected); $this->assertContains($type, $expected);

View File

@@ -113,6 +113,8 @@ class ProfileControllerTest extends ControllerBaseTest
$tabs = $client->getCrawler()->filter('div.nav-tabs-custom ul.nav-tabs li'); $tabs = $client->getCrawler()->filter('div.nav-tabs-custom ul.nav-tabs li');
$this->assertEquals(count($expectedTabs), $tabs->count()); $this->assertEquals(count($expectedTabs), $tabs->count());
$foundTabs = []; $foundTabs = [];
/** @var \DOMElement $tab */
foreach ($tabs->filter('a') as $tab) { foreach ($tabs->filter('a') as $tab) {
$foundTabs[] = $tab->getAttribute('href'); $foundTabs[] = $tab->getAttribute('href');
} }

View File

@@ -144,7 +144,9 @@ class TimesheetControllerTest extends ControllerBaseTest
$this->assertTrue($client->getResponse()->isSuccessful()); $this->assertTrue($client->getResponse()->isSuccessful());
$node = $client->getCrawler()->filter('body'); $node = $client->getCrawler()->filter('body');
$this->assertEquals('invoice_print', $node->getNode(0)->getAttribute('class')); /** @var \DOMElement $body */
$body = $node->getNode(0);
$this->assertEquals('invoice_print', $body->getAttribute('class'));
$result = $node->filter('section.invoice table.table tbody tr'); $result = $node->filter('section.invoice table.table tbody tr');
$this->assertEquals(5, count($result)); $this->assertEquals(5, count($result));

View File

@@ -153,7 +153,9 @@ class TimesheetTeamControllerTest extends ControllerBaseTest
$this->assertTrue($client->getResponse()->isSuccessful()); $this->assertTrue($client->getResponse()->isSuccessful());
$node = $client->getCrawler()->filter('body'); $node = $client->getCrawler()->filter('body');
$this->assertEquals('invoice_print', $node->getNode(0)->getAttribute('class')); /** @var \DOMElement $body */
$body = $node->getNode(0);
$this->assertEquals('invoice_print', $body->getAttribute('class'));
$result = $node->filter('section.invoice table.table tbody tr'); $result = $node->filter('section.invoice table.table tbody tr');
$this->assertEquals(10, count($result)); $this->assertEquals(10, count($result));

View File

@@ -78,6 +78,7 @@ class UserControllerTest extends ControllerBaseTest
$tabs = $client->getCrawler()->filter('div.nav-tabs-custom ul.nav-tabs li'); $tabs = $client->getCrawler()->filter('div.nav-tabs-custom ul.nav-tabs li');
$this->assertEquals(count($expectedTabs), $tabs->count()); $this->assertEquals(count($expectedTabs), $tabs->count());
$foundTabs = []; $foundTabs = [];
/** @var \DOMElement $tab */
foreach ($tabs->filter('a') as $tab) { foreach ($tabs->filter('a') as $tab) {
$foundTabs[] = $tab->getAttribute('href'); $foundTabs[] = $tab->getAttribute('href');
} }