8000 Merge branch '2.0' into 2.1 · symfony/symfony@889bd2e · GitHub
[go: up one dir, main page]

Skip to content

Commit 889bd2e

Browse files
committed
Merge branch '2.0' into 2.1
* 2.0: [Locale] fixed tests [Config] Fixed tests on Windows [TwigBundle] Fixed tests Conflicts: phpunit.xml.dist src/Symfony/Bundle/TwigBundle/Tests/TwigEngineTest.php src/Symfony/Component/Locale/Tests/Stub/StubIntlDateFormatterTest.php src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php
2 parents b94d4c4 + 874ea1c commit 889bd2e

File tree

3 files changed

+16
-101
lines changed

3 files changed

+16
-101
lines changed

src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,17 @@ public function testLoadFullConfiguration($format)
5959

6060
// Globals
6161
$calls = $container->getDefinition('twig')->getMethodCalls();
62-
$this->assertEquals('foo', $calls[0][1][0], '->load() registers services as Twig globals');
63-
$this->assertEquals(new Reference('bar'), $calls[0][1][1], '->load() registers services as Twig globals');
64-
$this->assertEquals('pi', $calls[1][1][0], '->load() registers variables as Twig globals');
65-
$this->assertEquals(3.14, $calls[1][1][1], '->load() registers variables as Twig globals');
62+
$this->assertEquals('app', $calls[0][1][0]);
63+
$this->assertEquals(new Reference('templating.globals'), $calls[0][1][1]);
64+
$this->assertEquals('foo', $calls[1][1][0], '->load() registers services as Twig globals');
65+
$this->assertEquals(new Reference('bar'), $calls[1][1][1], '->load() registers services as Twig globals');
66+
$this->assertEquals('pi', $calls[2][1][0], '->load() registers variables as Twig globals');
67+
$this->assertEquals(3.14, $calls[2][1][1], '->load() registers variables as Twig globals');
6668

6769
// Yaml and Php specific configs
6870
if (in_array($format, array('yml', 'php'))) {
69-
$this->assertEquals('bad', $calls[2][1][0], '->load() registers variables as Twig globals');
70-
$this->assertEquals(array('key' => 'foo'), $calls[2][1][1], '->load() registers variables as Twig globals');
71+
$this->assertEquals('bad', $calls[3][1][0], '->load() registers variables as Twig globals');
72+
$this->assertEquals(array('key' => 'foo'), $calls[3][1][1], '->load() registers variables as Twig globals');
7173
}
7274

7375
// Twig options
@@ -101,7 +103,7 @@ public function testGlobalsWithDifferentTypesAndValues()
101103

102104
$calls = $container->getDefinition('twig')->getMethodCalls();
103105

104-
foreach ($calls as $call) {
106+
foreach (array_slice($calls, 1) as $call) {
105107
list($name, $value) = each($globals);
106108
$this->assertEquals($name, $call[1][0]);
107109
$this->assertSame($value, $call[1][1]);

src/Symfony/Bundle/TwigBundle/Tests/TwigEngineTest.php

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/Symfony/Component/Locale/Tests/Stub/StubIntlDateFormatterTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,13 @@ public function parseErrorProvider()
878878
array('y-LLLLL-d', '1970-J-1'),
879879
array('y-LLLLL-d', '1970-S-1'),
880880
);
881+
882+
if (!$this->isIntlExtensionLoaded() || $this->isLowerThanIcuVersion('4.8')) {
883+
$data[] = array('y-M-d', '1970/1/1');
884+
$data[] = array('yy-M-d', '70/1/1');
885+
}
886+
887+
return $data;
881888
}
882889

883890
/*

0 commit comments

Comments
 (0)
0