diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php index f8981ce6c1..0906ffebbb 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php @@ -25,6 +25,7 @@ class Hour1200Transformer extends HourTransformer { $hourOfDay = $dateTime->format('g'); $hourOfDay = ('12' == $hourOfDay) ? '0' : $hourOfDay; + return $this->padLeft($hourOfDay, $length); } diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php index 56e1203572..d4a0b4e8cb 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php @@ -25,6 +25,7 @@ class Hour2401Transformer extends HourTransformer { $hourOfDay = $dateTime->format('G'); $hourOfDay = ('0' == $hourOfDay) ? '24' : $hourOfDay; + return $this->padLeft($hourOfDay, $length); } diff --git a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php index 62aff5ae21..dd36743253 100644 --- a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php @@ -303,6 +303,7 @@ class StubNumberFormatter // The original NumberFormatter does not support this format type if ($type == self::TYPE_CURRENCY) { trigger_error(__METHOD__ . '(): Unsupported format type ' . $type, \E_USER_WARNING); + return false; } @@ -439,6 +440,7 @@ class StubNumberFormatter { if ($type == self::TYPE_DEFAULT || $type == self::TYPE_CURRENCY) { trigger_error(__METHOD__ . '(): Unsupported format type ' . $type, \E_USER_WARNING); + return false; } @@ -593,6 +595,7 @@ class StubNumberFormatter private function getCurrencySymbol($currency) { $currencies = StubLocale::getCurrenciesData($this->locale); + return $currencies[$currency]['symbol']; } @@ -605,6 +608,7 @@ class StubNumberFormatter private function getCurrencyFractionDigits($currency) { $currencies = StubLocale::getCurrenciesData($this->locale); + return $currencies[$currency]['fractionDigits']; } @@ -617,6 +621,7 @@ class StubNumberFormatter private function getCurrencyRoundingIncrement($currency) { $currencies = StubLocale::getCurrenciesData($this->locale); + return $currencies[$currency]['roundingIncrement']; } diff --git a/tests/Symfony/Tests/Bridge/Doctrine/Fixtures/CompositeIdentEntity.php b/tests/Symfony/Tests/Bridge/Doctrine/Fixtures/CompositeIdentEntity.php index 6e37d2a0ae..58454aedcf 100644 --- a/tests/Symfony/Tests/Bridge/Doctrine/Fixtures/CompositeIdentEntity.php +++ b/tests/Symfony/Tests/Bridge/Doctrine/Fixtures/CompositeIdentEntity.php @@ -23,4 +23,4 @@ class CompositeIdentEntity $this->id2 = $id2; $this->name = $name; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Bridge/Doctrine/Fixtures/SingleIdentEntity.php b/tests/Symfony/Tests/Bridge/Doctrine/Fixtures/SingleIdentEntity.php index 9ebdf3acf5..ec518ee0ab 100644 --- a/tests/Symfony/Tests/Bridge/Doctrine/Fixtures/SingleIdentEntity.php +++ b/tests/Symfony/Tests/Bridge/Doctrine/Fixtures/SingleIdentEntity.php @@ -19,4 +19,4 @@ class SingleIdentEntity $this->id = $id; $this->name = $name; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Bridge/Doctrine/Form/ChoiceList/EntityChoiceListTest.php b/tests/Symfony/Tests/Bridge/Doctrine/Form/ChoiceList/EntityChoiceListTest.php index 35ed1f1a53..8dc5bfe33f 100644 --- a/tests/Symfony/Tests/Bridge/Doctrine/Form/ChoiceList/EntityChoiceListTest.php +++ b/tests/Symfony/Tests/Bridge/Doctrine/Form/ChoiceList/EntityChoiceListTest.php @@ -106,4 +106,4 @@ class EntityChoiceListTest extends DoctrineOrmTestCase 'group2' => array(2 => 'Bar') ), $choiceList->getChoices()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Bridge/Doctrine/Mapping/Driver/AbstractDriverTest.php b/tests/Symfony/Tests/Bridge/Doctrine/Mapping/Driver/AbstractDriverTest.php index 5f7f90ac2f..b2a97d9306 100644 --- a/tests/Symfony/Tests/Bridge/Doctrine/Mapping/Driver/AbstractDriverTest.php +++ b/tests/Symfony/Tests/Bridge/Doctrine/Mapping/Driver/AbstractDriverTest.php @@ -103,4 +103,4 @@ abstract class AbstractDriverTest extends \PHPUnit_Framework_TestCase return $ref->invokeArgs($obj, $args); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Bridge/Doctrine/Mapping/Driver/XmlDriverTest.php b/tests/Symfony/Tests/Bridge/Doctrine/Mapping/Driver/XmlDriverTest.php index a0ac944dae..ad270f83d0 100644 --- a/tests/Symfony/Tests/Bridge/Doctrine/Mapping/Driver/XmlDriverTest.php +++ b/tests/Symfony/Tests/Bridge/Doctrine/Mapping/Driver/XmlDriverTest.php @@ -27,4 +27,4 @@ class XmlDriverTest extends AbstractDriverTest return $driver; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Bridge/Doctrine/Mapping/Driver/YamlDriverTest.php b/tests/Symfony/Tests/Bridge/Doctrine/Mapping/Driver/YamlDriverTest.php index 95f616601a..08fda76113 100644 --- a/tests/Symfony/Tests/Bridge/Doctrine/Mapping/Driver/YamlDriverTest.php +++ b/tests/Symfony/Tests/Bridge/Doctrine/Mapping/Driver/YamlDriverTest.php @@ -27,4 +27,4 @@ class YamlDriverTest extends AbstractDriverTest return $driver; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Bridge/Twig/Extension/Fixtures/StubFilesystemLoader.php b/tests/Symfony/Tests/Bridge/Twig/Extension/Fixtures/StubFilesystemLoader.php index b8a211c176..bf7c0c0b95 100644 --- a/tests/Symfony/Tests/Bridge/Twig/Extension/Fixtures/StubFilesystemLoader.php +++ b/tests/Symfony/Tests/Bridge/Twig/Extension/Fixtures/StubFilesystemLoader.php @@ -22,8 +22,8 @@ if (!class_exists('Twig_Environment')) { { // strip away bundle name $parts = explode(':', $name); - + return parent::findTemplate(end($parts)); } } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Bridge/Twig/Extension/Fixtures/StubTranslator.php b/tests/Symfony/Tests/Bridge/Twig/Extension/Fixtures/StubTranslator.php index b34c946734..2e245949f4 100644 --- a/tests/Symfony/Tests/Bridge/Twig/Extension/Fixtures/StubTranslator.php +++ b/tests/Symfony/Tests/Bridge/Twig/Extension/Fixtures/StubTranslator.php @@ -32,4 +32,4 @@ class StubTranslator implements TranslatorInterface public function getLocale() { } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Bridge/Twig/Extension/custom_widgets.html.twig b/tests/Symfony/Tests/Bridge/Twig/Extension/custom_widgets.html.twig index bed5fe1d41..d5d9392280 100644 --- a/tests/Symfony/Tests/Bridge/Twig/Extension/custom_widgets.html.twig +++ b/tests/Symfony/Tests/Bridge/Twig/Extension/custom_widgets.html.twig @@ -3,4 +3,4 @@ {# TODO find a smarter way to render the parent type #} -{% endblock _text_id_widget %} \ No newline at end of file +{% endblock _text_id_widget %} diff --git a/tests/Symfony/Tests/Component/BrowserKit/ResponseTest.php b/tests/Symfony/Tests/Component/BrowserKit/ResponseTest.php index 6e0f52b909..c7f839cfa8 100644 --- a/tests/Symfony/Tests/Component/BrowserKit/ResponseTest.php +++ b/tests/Symfony/Tests/Component/BrowserKit/ResponseTest.php @@ -73,4 +73,4 @@ class ResponseTest extends \PHPUnit_Framework_TestCase $this->assertEquals($expected, $response->__toString(), '->__toString() returns the headers and the content as a string'); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/Namespaced/Baz.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/Namespaced/Baz.php index 23126300b9..bd97f16750 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/Namespaced/Baz.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/Namespaced/Baz.php @@ -5,4 +5,4 @@ namespace Apc\Namespaced; class Baz { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/ApcPrefixCollision/A/Bar.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/ApcPrefixCollision/A/Bar.php index 79fd99483f..3df50fab5a 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/ApcPrefixCollision/A/Bar.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/ApcPrefixCollision/A/Bar.php @@ -3,4 +3,4 @@ class ApcPrefixCollision_A_Bar { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/ApcPrefixCollision/A/Foo.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/ApcPrefixCollision/A/Foo.php index c56706ae78..206c9f8e67 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/ApcPrefixCollision/A/Foo.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/ApcPrefixCollision/A/Foo.php @@ -3,4 +3,4 @@ class ApcPrefixCollision_A_Foo { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Bar.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Bar.php index 89eb99c495..e909db3cea 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Bar.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Bar.php @@ -5,4 +5,4 @@ namespace Apc\NamespaceCollision\A; class Bar { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Foo.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Foo.php index d2af241fb6..a524282f76 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Foo.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Foo.php @@ -5,4 +5,4 @@ namespace Apc\NamespaceCollision\A; class Foo { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Bar.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Bar.php index 071a92ada4..3892f70683 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Bar.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Bar.php @@ -3,4 +3,4 @@ class ApcPrefixCollision_A_B_Bar { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Foo.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Foo.php index 20d3e2ddae..62e749f757 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Foo.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Foo.php @@ -3,4 +3,4 @@ class ApcPrefixCollision_A_B_Foo { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Bar.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Bar.php index 4d2cb4230c..21caf55149 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Bar.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Bar.php @@ -5,4 +5,4 @@ namespace Apc\NamespaceCollision\A\B; class Bar { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Foo.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Foo.php index c52a6c220d..b132451abc 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Foo.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Foo.php @@ -5,4 +5,4 @@ namespace Apc\NamespaceCollision\A\B; class Foo { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Namespaced/Baz.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Namespaced/Baz.php index a02fcb88c5..c3723f0ee8 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Namespaced/Baz.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/Namespaced/Baz.php @@ -5,4 +5,4 @@ namespace Namespaced; class Baz { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/NamespaceCollision/A/Bar.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/NamespaceCollision/A/Bar.php index 0f44fc2e99..f0f97a59fe 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/NamespaceCollision/A/Bar.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/NamespaceCollision/A/Bar.php @@ -5,4 +5,4 @@ namespace NamespaceCollision\A; class Bar { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/NamespaceCollision/A/Foo.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/NamespaceCollision/A/Foo.php index 7437e21db3..95d7226549 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/NamespaceCollision/A/Foo.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/NamespaceCollision/A/Foo.php @@ -5,4 +5,4 @@ namespace NamespaceCollision\A; class Foo { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/PrefixCollision/A/Bar.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/PrefixCollision/A/Bar.php index d27c16e34f..676daadd2b 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/PrefixCollision/A/Bar.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/PrefixCollision/A/Bar.php @@ -3,4 +3,4 @@ class PrefixCollision_A_Bar { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/PrefixCollision/A/Foo.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/PrefixCollision/A/Foo.php index 895ad98c57..44388be7c6 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/PrefixCollision/A/Foo.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/alpha/PrefixCollision/A/Foo.php @@ -3,4 +3,4 @@ class PrefixCollision_A_Foo { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/NamespaceCollision/A/B/Bar.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/NamespaceCollision/A/B/Bar.php index 953a6609a9..6a4678832c 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/NamespaceCollision/A/B/Bar.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/NamespaceCollision/A/B/Bar.php @@ -5,4 +5,4 @@ namespace NamespaceCollision\A\B; class Bar { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/NamespaceCollision/A/B/Foo.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/NamespaceCollision/A/B/Foo.php index 3e51d8bc7d..d3a43e8b80 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/NamespaceCollision/A/B/Foo.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/NamespaceCollision/A/B/Foo.php @@ -5,4 +5,4 @@ namespace NamespaceCollision\A\B; class Foo { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/PrefixCollision/A/B/Bar.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/PrefixCollision/A/B/Bar.php index 2f80c40cb3..f2682e4982 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/PrefixCollision/A/B/Bar.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/PrefixCollision/A/B/Bar.php @@ -3,4 +3,4 @@ class PrefixCollision_A_B_Bar { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/PrefixCollision/A/B/Foo.php b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/PrefixCollision/A/B/Foo.php index 423790f573..af7ca70431 100644 --- a/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/PrefixCollision/A/B/Foo.php +++ b/tests/Symfony/Tests/Component/ClassLoader/Fixtures/beta/PrefixCollision/A/B/Foo.php @@ -3,4 +3,4 @@ class PrefixCollision_A_B_Foo { public static $loaded = true; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Config/Definition/Builder/ArrayNodeDefinitionTest.php b/tests/Symfony/Tests/Component/Config/Definition/Builder/ArrayNodeDefinitionTest.php index a41d1ff958..96590e1e87 100644 --- a/tests/Symfony/Tests/Component/Config/Definition/Builder/ArrayNodeDefinitionTest.php +++ b/tests/Symfony/Tests/Component/Config/Definition/Builder/ArrayNodeDefinitionTest.php @@ -39,4 +39,4 @@ class ArrayNodeDefinitionTest extends \PHPUnit_Framework_TestCase return $reflection->getValue($object); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Config/Definition/Builder/NodeBuilderTest.php b/tests/Symfony/Tests/Component/Config/Definition/Builder/NodeBuilderTest.php index 92e669b75f..8115d97ab4 100644 --- a/tests/Symfony/Tests/Component/Config/Definition/Builder/NodeBuilderTest.php +++ b/tests/Symfony/Tests/Component/Config/Definition/Builder/NodeBuilderTest.php @@ -80,4 +80,4 @@ class NodeBuilderTest extends \PHPUnit_Framework_TestCase class SomeNodeDefinition extends BaseVariableNodeDefinition { -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Config/Definition/Builder/TreeBuilderTest.php b/tests/Symfony/Tests/Component/Config/Definition/Builder/TreeBuilderTest.php index f37d098430..df95cee12e 100644 --- a/tests/Symfony/Tests/Component/Config/Definition/Builder/TreeBuilderTest.php +++ b/tests/Symfony/Tests/Component/Config/Definition/Builder/TreeBuilderTest.php @@ -89,4 +89,4 @@ class TreeBuilderTest extends \PHPUnit_Framework_TestCase ->end() ->end(); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Config/Definition/FinalizationTest.php b/tests/Symfony/Tests/Component/Config/Definition/FinalizationTest.php index 5df77eaae3..4140ead49e 100644 --- a/tests/Symfony/Tests/Component/Config/Definition/FinalizationTest.php +++ b/tests/Symfony/Tests/Component/Config/Definition/FinalizationTest.php @@ -71,4 +71,4 @@ class FinalizationTest extends \PHPUnit_Framework_TestCase return $processor->process($tree, $configs); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Config/Definition/MergeTest.php b/tests/Symfony/Tests/Component/Config/Definition/MergeTest.php index 11d6f56b55..0b09dd6a99 100644 --- a/tests/Symfony/Tests/Component/Config/Definition/MergeTest.php +++ b/tests/Symfony/Tests/Component/Config/Definition/MergeTest.php @@ -192,4 +192,4 @@ class MergeTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array('append_elements' => array('a', 'b', 'c', 'd')), $tree->merge($a, $b)); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Config/Definition/NormalizationTest.php b/tests/Symfony/Tests/Component/Config/Definition/NormalizationTest.php index 6982e0d145..8032237664 100644 --- a/tests/Symfony/Tests/Component/Config/Definition/NormalizationTest.php +++ b/tests/Symfony/Tests/Component/Config/Definition/NormalizationTest.php @@ -141,4 +141,4 @@ class NormalizerTest extends \PHPUnit_Framework_TestCase { self::assertSame($normalized, $tree->normalize($denormalized)); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Config/Definition/ScalarNodeTest.php b/tests/Symfony/Tests/Component/Config/Definition/ScalarNodeTest.php index 123de5d10a..b897522b19 100644 --- a/tests/Symfony/Tests/Component/Config/Definition/ScalarNodeTest.php +++ b/tests/Symfony/Tests/Component/Config/Definition/ScalarNodeTest.php @@ -57,4 +57,4 @@ class ScalarNodeTest extends \PHPUnit_Framework_TestCase array(new \stdClass()), ); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Config/Fixtures/Builder/BarNodeDefinition.php b/tests/Symfony/Tests/Component/Config/Fixtures/Builder/BarNodeDefinition.php index 594a0da8a8..7023fde6c5 100644 --- a/tests/Symfony/Tests/Component/Config/Fixtures/Builder/BarNodeDefinition.php +++ b/tests/Symfony/Tests/Component/Config/Fixtures/Builder/BarNodeDefinition.php @@ -9,4 +9,4 @@ class BarNodeDefinition extends NodeDefinition protected function createNode() { } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Config/Fixtures/Builder/NodeBuilder.php b/tests/Symfony/Tests/Component/Config/Fixtures/Builder/NodeBuilder.php index fb582d6c46..3dd2bd15fb 100644 --- a/tests/Symfony/Tests/Component/Config/Fixtures/Builder/NodeBuilder.php +++ b/tests/Symfony/Tests/Component/Config/Fixtures/Builder/NodeBuilder.php @@ -22,4 +22,4 @@ class NodeBuilder extends BaseNodeBuilder return parent::getNodeClass($type); } } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Config/Fixtures/Builder/VariableNodeDefinition.php b/tests/Symfony/Tests/Component/Config/Fixtures/Builder/VariableNodeDefinition.php index d638e7015e..1d81db8e17 100644 --- a/tests/Symfony/Tests/Component/Config/Fixtures/Builder/VariableNodeDefinition.php +++ b/tests/Symfony/Tests/Component/Config/Fixtures/Builder/VariableNodeDefinition.php @@ -6,4 +6,4 @@ use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVa class VariableNodeDefinition extends BaseVariableNodeDefinition { -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Console/Fixtures/Foo3Command.php b/tests/Symfony/Tests/Component/Console/Fixtures/Foo3Command.php index b0d9916464..7349bc355e 100644 --- a/tests/Symfony/Tests/Component/Console/Fixtures/Foo3Command.php +++ b/tests/Symfony/Tests/Component/Console/Fixtures/Foo3Command.php @@ -22,4 +22,4 @@ class Foo3Command extends Command throw new \Exception("Second exception", 0, $e); } } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckCircularReferencesPassTest.php b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckCircularReferencesPassTest.php index 5dc134346d..8955a6eb0e 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckCircularReferencesPassTest.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckCircularReferencesPassTest.php @@ -69,4 +69,4 @@ class CheckCircularReferencesPassTest extends \PHPUnit_Framework_TestCase $compiler->compile($container); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckDefinitionValidityPassTest.php b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckDefinitionValidityPassTest.php index 5e62bb1986..f54e569dff 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckDefinitionValidityPassTest.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckDefinitionValidityPassTest.php @@ -67,4 +67,4 @@ class CheckDefinitionValidityPassTest extends \PHPUnit_Framework_TestCase $pass = new CheckDefinitionValidityPass(); $pass->process($container); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php index 131e79bbe3..875c6a61d4 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php @@ -68,4 +68,4 @@ class CheckExceptionOnInvalidReferenceBehaviorPassTest extends \PHPUnit_Framewor $pass = new CheckExceptionOnInvalidReferenceBehaviorPass(); $pass->process($container); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckReferenceValidityPassTest.php b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckReferenceValidityPassTest.php index d66bd0e82a..be7f7aea43 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckReferenceValidityPassTest.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/CheckReferenceValidityPassTest.php @@ -95,4 +95,4 @@ class CheckReferenceValidityPassTest extends \PHPUnit_Framework_TestCase $pass = new CheckReferenceValidityPass(); $pass->process($container); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPassTest.php b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPassTest.php index af2db49452..a3669eeda6 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPassTest.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/InlineServiceDefinitionsPassTest.php @@ -131,4 +131,4 @@ class InlineServiceDefinitionsPassTest extends \PHPUnit_Framework_TestCase $repeatedPass = new RepeatedPass(array(new AnalyzeServiceReferencesPass(), new InlineServiceDefinitionsPass())); $repeatedPass->process($container); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/IntegrationTest.php b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/IntegrationTest.php index 2f1681b692..f461cc4d52 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/IntegrationTest.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/IntegrationTest.php @@ -108,4 +108,4 @@ class IntegrationTest extends \PHPUnit_Framework_TestCase $this->assertFalse($container->hasDefinition('b')); $this->assertFalse($container->hasDefinition('c'), 'Service C was not inlined.'); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPassTest.php b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPassTest.php index 80fa4b0ee5..26feaab1bd 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPassTest.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/RemoveUnusedDefinitionsPassTest.php @@ -86,4 +86,4 @@ class RemoveUnusedDefinitionsPassTest extends \PHPUnit_Framework_TestCase $repeatedPass = new RepeatedPass(array(new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass())); $repeatedPass->process($container); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPassTest.php b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPassTest.php index e3932cad49..2beb18c081 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPassTest.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Compiler/ResolveReferencesToAliasesPassTest.php @@ -53,4 +53,4 @@ class ResolveReferencesToAliasesPassTest extends \PHPUnit_Framework_TestCase $pass = new ResolveReferencesToAliasesPass(); $pass->process($container); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/DependencyInjection/DefinitionDecoratorTest.php b/tests/Symfony/Tests/Component/DependencyInjection/DefinitionDecoratorTest.php index 743fc30560..5d48846d6d 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/DefinitionDecoratorTest.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/DefinitionDecoratorTest.php @@ -69,4 +69,4 @@ class DefinitionDecoratorTest extends \PHPUnit_Framework_TestCase $this->assertSame($def, $def->replaceArgument(0, 'foo')); $this->assertEquals(array('index_0' => 'foo'), $def->getArguments()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/containers/container11.php b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/containers/container11.php index c9bade1de5..3e6cafca24 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/containers/container11.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/containers/container11.php @@ -9,4 +9,4 @@ $container-> addArgument(new Definition('BarClass', array(new Definition('BazClass')))) ; -return $container; \ No newline at end of file +return $container; diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/containers/container12.php b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/containers/container12.php index b8f9dc31ff..0dc8679d86 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/containers/container12.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/containers/container12.php @@ -10,4 +10,4 @@ $container-> addTag('foo"bar\\bar', array('foo' => 'foo"barřž€')) ; -return $container; \ No newline at end of file +return $container; diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/containers/interfaces2.php b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/containers/interfaces2.php index 935a345930..a85190145e 100755 --- a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/containers/interfaces2.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/containers/interfaces2.php @@ -31,4 +31,4 @@ class BarClassFactory { return new BarClass(); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/includes/createphar.php b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/includes/createphar.php index 114855a0c5..a5933513da 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/includes/createphar.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/includes/createphar.php @@ -44,4 +44,4 @@ $phar->addFromString('schema/project-1.0.xsd', << EOT ); -$phar->setStub(''); \ No newline at end of file +$phar->setStub(''); diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/xml/extensions/services6.xml b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/xml/extensions/services6.xml index 554bc5c188..a9c01030d1 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/xml/extensions/services6.xml +++ b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/xml/extensions/services6.xml @@ -8,4 +8,4 @@ - \ No newline at end of file + diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/xml/extensions/services7.xml b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/xml/extensions/services7.xml index 4af3a6b5ee..e77780db6a 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/xml/extensions/services7.xml +++ b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/xml/extensions/services7.xml @@ -8,4 +8,4 @@ - \ No newline at end of file + diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/badtag1.yml b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/badtag1.yml index af4af1f12b..14536fdb36 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/badtag1.yml +++ b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/badtag1.yml @@ -2,4 +2,4 @@ services: foo_service: class: FooClass # tags is not an array - tags: string \ No newline at end of file + tags: string diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/badtag2.yml b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/badtag2.yml index 269b6b6530..90288144c8 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/badtag2.yml +++ b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/badtag2.yml @@ -3,4 +3,4 @@ services: class: FooClass tags: # tag is missing the name key - foo_tag: { foo: bar } \ No newline at end of file + foo_tag: { foo: bar } diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/nonvalid2.yml b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/nonvalid2.yml index 02e4a84d62..c508d5366f 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/nonvalid2.yml +++ b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/nonvalid2.yml @@ -1 +1 @@ -false \ No newline at end of file +false diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/services2.yml b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/services2.yml index 965245dbcd..a90ca5c505 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/services2.yml +++ b/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/yaml/services2.yml @@ -8,4 +8,4 @@ parameters: bar: foo foo_bar: @foo_bar MixedCase: - MixedCaseKey: value \ No newline at end of file + MixedCaseKey: value diff --git a/tests/Symfony/Tests/Component/DependencyInjection/Loader/XmlFileLoaderTest.php b/tests/Symfony/Tests/Component/DependencyInjection/Loader/XmlFileLoaderTest.php index d60553ea89..b7f54f657d 100644 --- a/tests/Symfony/Tests/Component/DependencyInjection/Loader/XmlFileLoaderTest.php +++ b/tests/Symfony/Tests/Component/DependencyInjection/Loader/XmlFileLoaderTest.php @@ -296,7 +296,7 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase $loader1 = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml/extension1')); $loader1->load('services.xml'); $services = $container->getDefinitions(); - $this->assertEquals(2, count($services), '->load() attributes unique ids to anonymous services'); + $this->assertEquals(2, count($services), '->load() attributes unique ids to anonymous services'); $loader2 = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml/extension2')); $loader2->load('services.xml'); $services = $container->getDefinitions(); diff --git a/tests/Symfony/Tests/Component/Form/AbstractExtensionTest.php b/tests/Symfony/Tests/Component/Form/AbstractExtensionTest.php index 6e00c734c7..85e5bc868c 100644 --- a/tests/Symfony/Tests/Component/Form/AbstractExtensionTest.php +++ b/tests/Symfony/Tests/Component/Form/AbstractExtensionTest.php @@ -45,4 +45,4 @@ class ConcreteExtension extends AbstractExtension protected function loadTypeGuesser() { } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/AbstractTypeTest.php b/tests/Symfony/Tests/Component/Form/AbstractTypeTest.php index 00957be901..d4c7e6cdd3 100644 --- a/tests/Symfony/Tests/Component/Form/AbstractTypeTest.php +++ b/tests/Symfony/Tests/Component/Form/AbstractTypeTest.php @@ -50,4 +50,4 @@ class MyTestType extends AbstractType {} class MyTestForm extends AbstractType {} -class MyTestFormType extends AbstractType {} \ No newline at end of file +class MyTestFormType extends AbstractType {} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/DataMapper/PropertyPathMapperTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/DataMapper/PropertyPathMapperTest.php index 140f58e054..e14e75ba7e 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/DataMapper/PropertyPathMapperTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/DataMapper/PropertyPathMapperTest.php @@ -82,4 +82,4 @@ class PropertyPathMapperTest extends \PHPUnit_Framework_TestCase $this->mapper->mapDataToForm(null, $form); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/DataTransformer/DateTimeTestCase.php b/tests/Symfony/Tests/Component/Form/Extension/Core/DataTransformer/DateTimeTestCase.php index bb6eccc4cc..01a9493c64 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/DataTransformer/DateTimeTestCase.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/DataTransformer/DateTimeTestCase.php @@ -19,4 +19,4 @@ class DateTimeTestCase extends LocalizedTestCase { self::assertEquals($expected->format('c'), $actual->format('c')); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/DataTransformer/LocalizedTestCase.php b/tests/Symfony/Tests/Component/Form/Extension/Core/DataTransformer/LocalizedTestCase.php index 558797caa9..5fbe292440 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/DataTransformer/LocalizedTestCase.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/DataTransformer/LocalizedTestCase.php @@ -21,4 +21,4 @@ class LocalizedTestCase extends \PHPUnit_Framework_TestCase $this->markTestSkipped('The "intl" extension is not available'); } } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/FixFileUploadListenerTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/FixFileUploadListenerTest.php index 4d1004ef3e..a6a5c78d2e 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/FixFileUploadListenerTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/FixFileUploadListenerTest.php @@ -164,4 +164,4 @@ class FixFileUploadListenerTest extends \PHPUnit_Framework_TestCase return $file; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/FixUrlProtocolListenerTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/FixUrlProtocolListenerTest.php index 88b5dfc85e..c68f8870b9 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/FixUrlProtocolListenerTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/FixUrlProtocolListenerTest.php @@ -51,4 +51,4 @@ class FixUrlProtocolListenerTest extends \PHPUnit_Framework_TestCase $this->assertEquals('ftp://www.symfony.com', $event->getData()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/ResizeFormListenerTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/ResizeFormListenerTest.php index df1bfc991f..52758edce7 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/ResizeFormListenerTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/ResizeFormListenerTest.php @@ -254,4 +254,4 @@ class ResizeFormListenerTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array(), $event->getData()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/TrimListenerTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/TrimListenerTest.php index d273665a94..79fc75841a 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/TrimListenerTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/EventListener/TrimListenerTest.php @@ -39,4 +39,4 @@ class TrimListenerTest extends \PHPUnit_Framework_TestCase $this->assertSame(1234, $event->getData()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/ChoiceTypeTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/ChoiceTypeTest.php index f9a2e3604a..e4069aeb7b 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/ChoiceTypeTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/ChoiceTypeTest.php @@ -172,9 +172,9 @@ class ChoiceTypeTest extends TypeTestCase 'expanded' => true, 'choices' => $this->choices, )); - + $form->bind(false); - + $this->assertEmpty($form->getExtraData()); $this->assertNull($form->getData()); } diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/DateTimeTypeTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/DateTimeTypeTest.php index ec20468fff..3a4d4a8f19 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/DateTimeTypeTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/DateTimeTypeTest.php @@ -160,4 +160,4 @@ class DateTimeTypeTest extends LocalizedTestCase $this->assertEquals($dateTime->format('Y-m-d H:i:s'), $form->getData()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/FormTypeTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/FormTypeTest.php index cc9c15a59c..7188db3234 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/FormTypeTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/FormTypeTest.php @@ -136,6 +136,7 @@ class FormTypeTest extends TypeTestCase $builder->get('referenceCopy')->appendClientTransformer(new CallbackTransformer( function () {}, function ($value) { // reverseTransform + return 'foobar'; } )); @@ -162,6 +163,7 @@ class FormTypeTest extends TypeTestCase $builder->get('referenceCopy')->appendClientTransformer(new CallbackTransformer( function () {}, function ($value) use ($ref2) { // reverseTransform + return $ref2; } )); diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/IntegerTypeTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/IntegerTypeTest.php index ec99fc2ec7..5cb798c867 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/IntegerTypeTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/IntegerTypeTest.php @@ -26,4 +26,4 @@ class IntegerTypeTest extends LocalizedTestCase $this->assertSame(1, $form->getData()); $this->assertSame('1', $form->getClientData()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/LocalizedTestCase.php b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/LocalizedTestCase.php index 378a12ec0f..38e0382864 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/LocalizedTestCase.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/LocalizedTestCase.php @@ -23,4 +23,4 @@ abstract class LocalizedTestCase extends TypeTestCase $this->markTestSkipped('The "intl" extension is not available'); } } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/RepeatedTypeTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/RepeatedTypeTest.php index 9fa7f47cb0..06da6cf524 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/RepeatedTypeTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/RepeatedTypeTest.php @@ -61,4 +61,4 @@ class RepeatedTypeTest extends TypeTestCase $this->assertEquals($input, $this->form->getClientData()); $this->assertEquals('foo', $this->form->getData()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/TimeTypeTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/TimeTypeTest.php index 0870d693cc..0d3e1d230c 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/TimeTypeTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/TimeTypeTest.php @@ -396,4 +396,4 @@ class TimeTypeTest extends LocalizedTestCase $this->assertTrue($form->isPartiallyFilled()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/UrlTypeTest.php b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/UrlTypeTest.php index 8542cff8c2..0c4dc528b0 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Core/Type/UrlTypeTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Core/Type/UrlTypeTest.php @@ -62,4 +62,4 @@ class UrlTypeTest extends LocalizedTestCase $this->assertSame('www.domain.com', $form->getData()); $this->assertSame('www.domain.com', $form->getClientData()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProviderTest.php b/tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProviderTest.php index fcefffa676..42a3fb4eda 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProviderTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProviderTest.php @@ -47,4 +47,4 @@ class DefaultCsrfProviderTest extends \PHPUnit_Framework_TestCase $this->assertFalse($this->provider->isCsrfTokenValid('foo', $token)); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProviderTest.php b/tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProviderTest.php index a7f7e6bb38..824ec3d32e 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProviderTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProviderTest.php @@ -70,4 +70,4 @@ class SessionCsrfProviderTest extends \PHPUnit_Framework_TestCase $this->assertFalse($this->provider->isCsrfTokenValid('foo', $token)); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Extension/Validator/Validator/DelegatingValidatorTest.php b/tests/Symfony/Tests/Component/Form/Extension/Validator/Validator/DelegatingValidatorTest.php index 7581925881..8bb90205e2 100644 --- a/tests/Symfony/Tests/Component/Form/Extension/Validator/Validator/DelegatingValidatorTest.php +++ b/tests/Symfony/Tests/Component/Form/Extension/Validator/Validator/DelegatingValidatorTest.php @@ -607,4 +607,4 @@ class DelegatingValidatorTest extends \PHPUnit_Framework_TestCase $this->validator->validate($form); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Fixtures/Author.php b/tests/Symfony/Tests/Component/Form/Fixtures/Author.php index 4a1478ec7d..5bde5ee116 100644 --- a/tests/Symfony/Tests/Component/Form/Fixtures/Author.php +++ b/tests/Symfony/Tests/Component/Form/Fixtures/Author.php @@ -48,4 +48,4 @@ class Author private function setPrivateSetter($data) { } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Fixtures/FixedDataTransformer.php b/tests/Symfony/Tests/Component/Form/Fixtures/FixedDataTransformer.php index 6008e3770c..6d7a745b4f 100644 --- a/tests/Symfony/Tests/Component/Form/Fixtures/FixedDataTransformer.php +++ b/tests/Symfony/Tests/Component/Form/Fixtures/FixedDataTransformer.php @@ -32,4 +32,4 @@ class FixedDataTransformer implements DataTransformerInterface return $result; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Fixtures/FooType.php b/tests/Symfony/Tests/Component/Form/Fixtures/FooType.php index a5393f75ae..de8ba0a181 100644 --- a/tests/Symfony/Tests/Component/Form/Fixtures/FooType.php +++ b/tests/Symfony/Tests/Component/Form/Fixtures/FooType.php @@ -46,4 +46,4 @@ class FooType extends AbstractType { return null; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Fixtures/FooTypeBarExtension.php b/tests/Symfony/Tests/Component/Form/Fixtures/FooTypeBarExtension.php index 3d8bc5a4a8..acaf633b93 100644 --- a/tests/Symfony/Tests/Component/Form/Fixtures/FooTypeBarExtension.php +++ b/tests/Symfony/Tests/Component/Form/Fixtures/FooTypeBarExtension.php @@ -23,4 +23,4 @@ class FooTypeBarExtension extends AbstractTypeExtension { return 'foo'; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Fixtures/FooTypeBazExtension.php b/tests/Symfony/Tests/Component/Form/Fixtures/FooTypeBazExtension.php index c256c39c7f..2d8ad87ef6 100644 --- a/tests/Symfony/Tests/Component/Form/Fixtures/FooTypeBazExtension.php +++ b/tests/Symfony/Tests/Component/Form/Fixtures/FooTypeBazExtension.php @@ -16,4 +16,4 @@ class FooTypeBazExtension extends AbstractTypeExtension { return 'foo'; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Fixtures/Magician.php b/tests/Symfony/Tests/Component/Form/Fixtures/Magician.php index e7005aafe9..295b5a1721 100644 --- a/tests/Symfony/Tests/Component/Form/Fixtures/Magician.php +++ b/tests/Symfony/Tests/Component/Form/Fixtures/Magician.php @@ -15,4 +15,4 @@ class Magician { return isset($this->$property) ? $this->$property : null; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Fixtures/TestExtension.php b/tests/Symfony/Tests/Component/Form/Fixtures/TestExtension.php index e3071b8342..212a235f8f 100644 --- a/tests/Symfony/Tests/Component/Form/Fixtures/TestExtension.php +++ b/tests/Symfony/Tests/Component/Form/Fixtures/TestExtension.php @@ -60,4 +60,4 @@ class TestExtension implements FormExtensionInterface { return $this->guesser; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/FormBuilderTest.php b/tests/Symfony/Tests/Component/Form/FormBuilderTest.php index e90f3e0383..5d5caa8d31 100644 --- a/tests/Symfony/Tests/Component/Form/FormBuilderTest.php +++ b/tests/Symfony/Tests/Component/Form/FormBuilderTest.php @@ -147,4 +147,4 @@ class FormBuilderTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/FormInterface.php b/tests/Symfony/Tests/Component/Form/FormInterface.php index 84280afadb..797e8368a6 100644 --- a/tests/Symfony/Tests/Component/Form/FormInterface.php +++ b/tests/Symfony/Tests/Component/Form/FormInterface.php @@ -4,4 +4,4 @@ namespace Symfony\Tests\Component\Form; interface FormInterface extends \Iterator, \Symfony\Component\Form\FormInterface { -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/FormTest.php b/tests/Symfony/Tests/Component/Form/FormTest.php index ab3439fe94..a6c7107185 100644 --- a/tests/Symfony/Tests/Component/Form/FormTest.php +++ b/tests/Symfony/Tests/Component/Form/FormTest.php @@ -1029,4 +1029,4 @@ class FormTest extends \PHPUnit_Framework_TestCase { return $this->getMock('Symfony\Component\Form\FormValidatorInterface'); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Guess/GuessTest.php b/tests/Symfony/Tests/Component/Form/Guess/GuessTest.php index 1e6b95bf8d..d5a26fcefc 100644 --- a/tests/Symfony/Tests/Component/Form/Guess/GuessTest.php +++ b/tests/Symfony/Tests/Component/Form/Guess/GuessTest.php @@ -33,4 +33,4 @@ class GuessTest extends \PHPUnit_Framework_TestCase { new TestGuess(5); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/PropertyPathTest.php b/tests/Symfony/Tests/Component/Form/PropertyPathTest.php index 2f2a58e22f..26711ab827 100644 --- a/tests/Symfony/Tests/Component/Form/PropertyPathTest.php +++ b/tests/Symfony/Tests/Component/Form/PropertyPathTest.php @@ -399,4 +399,4 @@ class PropertyPathTest extends \PHPUnit_Framework_TestCase new PropertyPath(null); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Form/Util/FormUtilTest.php b/tests/Symfony/Tests/Component/Form/Util/FormUtilTest.php index ec7b82b054..e886d0802b 100644 --- a/tests/Symfony/Tests/Component/Form/Util/FormUtilTest.php +++ b/tests/Symfony/Tests/Component/Form/Util/FormUtilTest.php @@ -50,4 +50,4 @@ class FormUtilTest extends \PHPUnit_Framework_TestCase $this->assertSame($out, FormUtil::toArrayKeys($in)); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/HttpFoundation/CookieTest.php b/tests/Symfony/Tests/Component/HttpFoundation/CookieTest.php index 7960576f8c..114d3ad2cb 100644 --- a/tests/Symfony/Tests/Component/HttpFoundation/CookieTest.php +++ b/tests/Symfony/Tests/Component/HttpFoundation/CookieTest.php @@ -137,15 +137,15 @@ class CookieTest extends \PHPUnit_Framework_TestCase $this->assertTrue($cookie->isCleared(), '->isCleared() returns true if the cookie has expired'); } - + public function testToString() { $cookie = new Cookie('foo', 'bar', strtotime('Fri, 20-May-2011 15:25:52 GMT'), '/', '.myfoodomain.com', true); $this->assertEquals('foo=bar; expires=Fri, 20-May-2011 15:25:52 GMT; path=/; domain=.myfoodomain.com; secure; httponly', $cookie->__toString(), '->__toString() returns string representation of the cookie'); - + $cookie = new Cookie('foo', null, 1, '/', '.myfoodomain.com'); - + $this->assertEquals('foo=deleted; expires=' . gmdate("D, d-M-Y H:i:s T", time()-31536001) . '; path=/; domain=.myfoodomain.com; httponly', $cookie->__toString(), '->__toString() returns string representation of a cleared cookie if value is NULL'); } } diff --git a/tests/Symfony/Tests/Component/HttpFoundation/File/FileTest.php b/tests/Symfony/Tests/Component/HttpFoundation/File/FileTest.php index f583174307..67c2d842b3 100644 --- a/tests/Symfony/Tests/Component/HttpFoundation/File/FileTest.php +++ b/tests/Symfony/Tests/Component/HttpFoundation/File/FileTest.php @@ -184,4 +184,4 @@ class FileTest extends \PHPUnit_Framework_TestCase return $guesser; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/HttpFoundation/File/UploadedFileTest.php b/tests/Symfony/Tests/Component/HttpFoundation/File/UploadedFileTest.php index 088b6554ed..cbd133d155 100644 --- a/tests/Symfony/Tests/Component/HttpFoundation/File/UploadedFileTest.php +++ b/tests/Symfony/Tests/Component/HttpFoundation/File/UploadedFileTest.php @@ -79,7 +79,7 @@ class UploadedFileTest extends \PHPUnit_Framework_TestCase $this->assertEquals('original.gif', $file->getOriginalName()); } - + public function testGetOriginalNameSanitizeFilename() { $file = new UploadedFile( @@ -91,5 +91,5 @@ class UploadedFileTest extends \PHPUnit_Framework_TestCase ); $this->assertEquals('original.gif', $file->getOriginalName()); - } + } } diff --git a/tests/Symfony/Tests/Component/HttpFoundation/ParameterBagTest.php b/tests/Symfony/Tests/Component/HttpFoundation/ParameterBagTest.php index 95d6740cca..d93f6a4d55 100644 --- a/tests/Symfony/Tests/Component/HttpFoundation/ParameterBagTest.php +++ b/tests/Symfony/Tests/Component/HttpFoundation/ParameterBagTest.php @@ -162,4 +162,4 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(123, $bag->getInt('digits'), '->getInt() gets a value of parameter as integer'); $this->assertEquals(0, $bag->getInt('unknown'), '->getInt() returns zero if a parameter is not defined'); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php b/tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php index 9d4c701504..2986d1f922 100644 --- a/tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php +++ b/tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php @@ -462,11 +462,11 @@ class RequestTest extends \PHPUnit_Framework_TestCase $request->setMethod('POST'); $request->request->set('_method', 'purge'); $this->assertEquals('PURGE', $request->getMethod(), '->getMethod() returns the method from _method if defined and POST'); - + $request->setMethod('POST'); $request->server->set('X-HTTP-METHOD-OVERRIDE', 'delete'); $this->assertEquals('DELETE', $request->getMethod(), '->getMethod() returns the method from X-HTTP-Method-Override even though _method is set if defined and POST'); - + $request = new Request(); $request->setMethod('POST'); $request->server->set('X-HTTP-METHOD-OVERRIDE', 'delete'); diff --git a/tests/Symfony/Tests/Component/HttpKernel/Bundle/BundleTest.php b/tests/Symfony/Tests/Component/HttpKernel/Bundle/BundleTest.php index 8028edc7ab..031020e2ab 100644 --- a/tests/Symfony/Tests/Component/HttpKernel/Bundle/BundleTest.php +++ b/tests/Symfony/Tests/Component/HttpKernel/Bundle/BundleTest.php @@ -33,4 +33,4 @@ class BundleTest extends \PHPUnit_Framework_TestCase $this->assertNull($bundle2->registerCommands($app)); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/HttpKernel/EventListener/ExceptionListenerTest.php b/tests/Symfony/Tests/Component/HttpKernel/EventListener/ExceptionListenerTest.php index 05b7530dac..944dc21401 100644 --- a/tests/Symfony/Tests/Component/HttpKernel/EventListener/ExceptionListenerTest.php +++ b/tests/Symfony/Tests/Component/HttpKernel/EventListener/ExceptionListenerTest.php @@ -122,4 +122,4 @@ class TestKernelThatThrowsException implements HttpKernelInterface { throw new \Exception('bar'); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/HttpKernel/HttpCache/TestHttpKernel.php b/tests/Symfony/Tests/Component/HttpKernel/HttpCache/TestHttpKernel.php index cb14f94f29..6632bce4e3 100644 --- a/tests/Symfony/Tests/Component/HttpKernel/HttpCache/TestHttpKernel.php +++ b/tests/Symfony/Tests/Component/HttpKernel/HttpCache/TestHttpKernel.php @@ -42,6 +42,7 @@ class TestHttpKernel extends HttpKernel implements ControllerResolverInterface public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = false) { $this->catch = $catch; + return parent::handle($request, $type, $catch); } diff --git a/tests/Symfony/Tests/Component/HttpKernel/KernelTest.php b/tests/Symfony/Tests/Component/HttpKernel/KernelTest.php index c2e07c1cde..3223e17ebf 100644 --- a/tests/Symfony/Tests/Component/HttpKernel/KernelTest.php +++ b/tests/Symfony/Tests/Component/HttpKernel/KernelTest.php @@ -211,6 +211,7 @@ class KernelTest extends \PHPUnit_Framework_TestCase { if (!function_exists('token_get_all')) { $this->markTestSkipped('The function token_get_all() is not available.'); + return; } $source = <<setSymbol(\NumberFormatter::CURRENCY_SYMBOL, 'SFD'); + return $formatter; } } diff --git a/tests/Symfony/Tests/Component/Process/PhpExecutableFinderTest.php b/tests/Symfony/Tests/Component/Process/PhpExecutableFinderTest.php index d8b88a36bc..db33ba1980 100644 --- a/tests/Symfony/Tests/Component/Process/PhpExecutableFinderTest.php +++ b/tests/Symfony/Tests/Component/Process/PhpExecutableFinderTest.php @@ -26,13 +26,13 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase $f = new PhpExecutableFinder(); $current = $f->find(); - + //not executable PHP_PATH putenv('PHP_PATH=/not/executable/php'); $this->assertFalse($f->find(), '::find() returns false for not executable php'); - + //executable PHP_PATH - putenv('PHP_PATH='.$current); + putenv('PHP_PATH='.$current); $this->assertEquals($f->find(), $current, '::find() returns the executable php'); } @@ -46,13 +46,13 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase $f = new PhpExecutableFinder(); $current = $f->find(); - + //TODO maybe php executable is custom or even windows if (false === strstr(PHP_OS, 'WIN')) { $this->assertEquals($current, PHP_BINDIR.DIRECTORY_SEPARATOR.'php', '::find() returns the executable php with suffixes'); } } - + /** * tests find() with env var PHP_BINDIR */ @@ -60,19 +60,19 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase { //TODO the code for suffixes in PHP_BINDIR always catches, so the rest cant be tested //maybe remove the code or move the PHP_PEAR_PHP_BIN code above - + $this->markTestIncomplete(); - + $f = new PhpExecutableFinder(); $current = $f->find(); - + //not executable PHP_PEAR_PHP_BIN putenv('PHP_PEAR_PHP_BIN=/not/executable/php'); $this->assertFalse($f->find(), '::find() returns false for not executable php'); - + //executable PHP_PEAR_PHP_BIN - putenv('PHP_PEAR_PHP_BIN='.$current); + putenv('PHP_PEAR_PHP_BIN='.$current); $this->assertEquals($f->find(), $current, '::find() returns the executable php'); } } diff --git a/tests/Symfony/Tests/Component/Process/ProcessTest.php b/tests/Symfony/Tests/Component/Process/ProcessTest.php index a2436ae4c1..7ca99f0235 100644 --- a/tests/Symfony/Tests/Component/Process/ProcessTest.php +++ b/tests/Symfony/Tests/Component/Process/ProcessTest.php @@ -20,13 +20,13 @@ class ProcessTest extends \PHPUnit_Framework_TestCase { /** * tests getter/setter - * + * * @dataProvider methodProvider */ public function testDefaultGetterSetter($fn) { $p = new Process('php'); - + $setter = 'set'.$fn; $getter = 'get'.$fn; @@ -34,20 +34,20 @@ class ProcessTest extends \PHPUnit_Framework_TestCase $this->assertSame(array('foo'), $p->$getter(array('foo'))); } - + /** * tests results from sub processes - * + * * @dataProvider codeProvider */ public function testProcessResponses($expected, $getter, $code) { $p = new Process(sprintf('php -r "%s"', $code)); $p->run(); - + $this->assertSame($expected, $p->$getter()); } - + public function codeProvider() { return array( @@ -57,7 +57,7 @@ class ProcessTest extends \PHPUnit_Framework_TestCase array('output', 'getOutput', 'echo \"output\";'), ); } - + /** * provides default method names for simple getter/setter */ @@ -71,7 +71,7 @@ class ProcessTest extends \PHPUnit_Framework_TestCase array('Stdin'), array('Options') ); - + return $defaults; } } diff --git a/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalid.xml b/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalid.xml index 1414e7e460..a9b72f3929 100644 --- a/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalid.xml +++ b/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalid.xml @@ -6,7 +6,7 @@ MyBundle:Blog:show - GET - - + GET + + diff --git a/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalid.yml b/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalid.yml index 1910281566..257cc5642c 100644 --- a/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalid.yml +++ b/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalid.yml @@ -1 +1 @@ -foo \ No newline at end of file +foo diff --git a/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalidnode.xml b/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalidnode.xml index a7c80932f2..863ef03b90 100644 --- a/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalidnode.xml +++ b/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalidnode.xml @@ -4,5 +4,5 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd"> - bar + bar diff --git a/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalidroute.xml b/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalidroute.xml index a6ef587ac8..7be82e53c3 100644 --- a/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalidroute.xml +++ b/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalidroute.xml @@ -6,8 +6,8 @@ MyBundle:Blog:show - GET - - baz + GET + + baz diff --git a/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.xml b/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.xml index a1620415f8..2437ef97b5 100644 --- a/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.xml +++ b/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.xml @@ -6,7 +6,7 @@ MyBundle:Blog:show - GET - + GET + diff --git a/tests/Symfony/Tests/Component/Security/Acl/Dbal/AclProviderTest.php b/tests/Symfony/Tests/Component/Security/Acl/Dbal/AclProviderTest.php index b07ad14862..28b0127e86 100644 --- a/tests/Symfony/Tests/Component/Security/Acl/Dbal/AclProviderTest.php +++ b/tests/Symfony/Tests/Component/Security/Acl/Dbal/AclProviderTest.php @@ -260,4 +260,4 @@ class AclProviderTest extends \PHPUnit_Framework_TestCase { return new AclProvider($this->con, $this->getStrategy(), $this->getOptions()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Acl/Domain/AclTest.php b/tests/Symfony/Tests/Component/Security/Acl/Domain/AclTest.php index b70e920b0e..a53810d4fe 100644 --- a/tests/Symfony/Tests/Component/Security/Acl/Domain/AclTest.php +++ b/tests/Symfony/Tests/Component/Security/Acl/Domain/AclTest.php @@ -515,4 +515,4 @@ class AclTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('The Doctrine2 DBAL is required for this test'); } } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Acl/Domain/DoctrineAclCacheTest.php b/tests/Symfony/Tests/Component/Security/Acl/Domain/DoctrineAclCacheTest.php index 65c3bd95a5..1600f4f9c1 100644 --- a/tests/Symfony/Tests/Component/Security/Acl/Domain/DoctrineAclCacheTest.php +++ b/tests/Symfony/Tests/Component/Security/Acl/Domain/DoctrineAclCacheTest.php @@ -105,4 +105,4 @@ class DoctrineAclCacheTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('The Doctrine2 DBAL is required for this test'); } } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Acl/Domain/EntryTest.php b/tests/Symfony/Tests/Component/Security/Acl/Domain/EntryTest.php index 0916462296..b645153e9b 100644 --- a/tests/Symfony/Tests/Component/Security/Acl/Domain/EntryTest.php +++ b/tests/Symfony/Tests/Component/Security/Acl/Domain/EntryTest.php @@ -116,4 +116,4 @@ class EntryTest extends \PHPUnit_Framework_TestCase { return $this->getMock('Symfony\Component\Security\Acl\Model\SecurityIdentityInterface'); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Acl/Domain/FieldEntryTest.php b/tests/Symfony/Tests/Component/Security/Acl/Domain/FieldEntryTest.php index c8dc733826..ce555e1cc0 100644 --- a/tests/Symfony/Tests/Component/Security/Acl/Domain/FieldEntryTest.php +++ b/tests/Symfony/Tests/Component/Security/Acl/Domain/FieldEntryTest.php @@ -71,4 +71,4 @@ class FieldEntryTest extends \PHPUnit_Framework_TestCase { return $this->getMock('Symfony\Component\Security\Acl\Model\SecurityIdentityInterface'); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Acl/Domain/ObjectIdentityRetrievalStrategyTest.php b/tests/Symfony/Tests/Component/Security/Acl/Domain/ObjectIdentityRetrievalStrategyTest.php index b6cd36445f..81fe0154e3 100644 --- a/tests/Symfony/Tests/Component/Security/Acl/Domain/ObjectIdentityRetrievalStrategyTest.php +++ b/tests/Symfony/Tests/Component/Security/Acl/Domain/ObjectIdentityRetrievalStrategyTest.php @@ -39,4 +39,4 @@ class DomainObject { return 'foo'; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Acl/Domain/PermissionGrantingStrategyTest.php b/tests/Symfony/Tests/Component/Security/Acl/Domain/PermissionGrantingStrategyTest.php index a7356e3a44..4122726871 100644 --- a/tests/Symfony/Tests/Component/Security/Acl/Domain/PermissionGrantingStrategyTest.php +++ b/tests/Symfony/Tests/Component/Security/Acl/Domain/PermissionGrantingStrategyTest.php @@ -180,6 +180,7 @@ class PermissionGrantingStrategyTest extends \PHPUnit_Framework_TestCase protected function getAcl($strategy) { static $id = 1; + return new Acl($id++, new ObjectIdentity(1, 'Foo'), $strategy, array(), true); } @@ -189,4 +190,4 @@ class PermissionGrantingStrategyTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('The Doctrine2 DBAL is required for this test'); } } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Acl/Domain/SecurityIdentityRetrievalStrategyTest.php b/tests/Symfony/Tests/Component/Security/Acl/Domain/SecurityIdentityRetrievalStrategyTest.php index 1621bfa68f..a8dd652e7c 100644 --- a/tests/Symfony/Tests/Component/Security/Acl/Domain/SecurityIdentityRetrievalStrategyTest.php +++ b/tests/Symfony/Tests/Component/Security/Acl/Domain/SecurityIdentityRetrievalStrategyTest.php @@ -195,4 +195,4 @@ class CustomUserImpl { return $this->name; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Acl/Permission/BasicPermissionMapTest.php b/tests/Symfony/Tests/Component/Security/Acl/Permission/BasicPermissionMapTest.php index 8d991ec813..874e388f7a 100644 --- a/tests/Symfony/Tests/Component/Security/Acl/Permission/BasicPermissionMapTest.php +++ b/tests/Symfony/Tests/Component/Security/Acl/Permission/BasicPermissionMapTest.php @@ -20,4 +20,4 @@ class BasicPermissionMapTest extends \PHPUnit_Framework_TestCase $map = new BasicPermissionMap(); $this->assertNull($map->getMasks('IS_AUTHENTICATED_REMEBERED', null)); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Acl/Permission/MaskBuilderTest.php b/tests/Symfony/Tests/Component/Security/Acl/Permission/MaskBuilderTest.php index 2a5b5ed92d..fb8535941f 100644 --- a/tests/Symfony/Tests/Component/Security/Acl/Permission/MaskBuilderTest.php +++ b/tests/Symfony/Tests/Component/Security/Acl/Permission/MaskBuilderTest.php @@ -100,4 +100,4 @@ class MaskBuilderTest extends \PHPUnit_Framework_TestCase $builder->reset(); $this->assertEquals(0, $builder->get()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Acl/Voter/AclVoterTest.php b/tests/Symfony/Tests/Component/Security/Acl/Voter/AclVoterTest.php index a8bd1e6281..a3e9d3ae4d 100644 --- a/tests/Symfony/Tests/Component/Security/Acl/Voter/AclVoterTest.php +++ b/tests/Symfony/Tests/Component/Security/Acl/Voter/AclVoterTest.php @@ -402,4 +402,4 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase $sidStrategy, ); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Core/Authentication/AuthenticationTrustResolverTest.php b/tests/Symfony/Tests/Component/Security/Core/Authentication/AuthenticationTrustResolverTest.php index bb6437dc27..1daaabbcd7 100644 --- a/tests/Symfony/Tests/Component/Security/Core/Authentication/AuthenticationTrustResolverTest.php +++ b/tests/Symfony/Tests/Component/Security/Core/Authentication/AuthenticationTrustResolverTest.php @@ -69,4 +69,4 @@ class AuthenticationTrustResolverTest extends \PHPUnit_Framework_TestCase 'Symfony\\Component\\Security\\Core\\Authentication\\Token\\RememberMeToken' ); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProviderTest.php b/tests/Symfony/Tests/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProviderTest.php index c8d0614945..36448b1667 100644 --- a/tests/Symfony/Tests/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProviderTest.php +++ b/tests/Symfony/Tests/Component/Security/Core/Authentication/Provider/RememberMeAuthenticationProviderTest.php @@ -108,4 +108,4 @@ class RememberMeAuthenticationProviderTest extends \PHPUnit_Framework_TestCase return new RememberMeAuthenticationProvider($userChecker, $key, 'foo'); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProviderTest.php b/tests/Symfony/Tests/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProviderTest.php index d6d5551119..76a4f11062 100644 --- a/tests/Symfony/Tests/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProviderTest.php +++ b/tests/Symfony/Tests/Component/Security/Core/Authentication/RememberMe/InMemoryTokenProviderTest.php @@ -60,4 +60,4 @@ class InMemoryTokenProviderTest extends \PHPUnit_Framework_TestCase $provider->deleteTokenBySeries('foo'); $provider->loadTokenBySeries('foo'); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Core/Authentication/RememberMe/PersistentTokenTest.php b/tests/Symfony/Tests/Component/Security/Core/Authentication/RememberMe/PersistentTokenTest.php index 082321c6da..1b16ed5f6c 100644 --- a/tests/Symfony/Tests/Component/Security/Core/Authentication/RememberMe/PersistentTokenTest.php +++ b/tests/Symfony/Tests/Component/Security/Core/Authentication/RememberMe/PersistentTokenTest.php @@ -26,4 +26,4 @@ class PersistentTokenTest extends \PHPUnit_Framework_TestCase $this->assertEquals('footokenvalue', $token->getTokenValue()); $this->assertSame($lastUsed, $token->getLastUsed()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Core/Authentication/Token/RememerMeTokenTest.php b/tests/Symfony/Tests/Component/Security/Core/Authentication/Token/RememerMeTokenTest.php index a1e274b435..013cbf2efc 100644 --- a/tests/Symfony/Tests/Component/Security/Core/Authentication/Token/RememerMeTokenTest.php +++ b/tests/Symfony/Tests/Component/Security/Core/Authentication/Token/RememerMeTokenTest.php @@ -80,4 +80,4 @@ class RememberMeTokenTest extends \PHPUnit_Framework_TestCase return $user; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Core/Encoder/EncoderFactoryTest.php b/tests/Symfony/Tests/Component/Security/Core/Encoder/EncoderFactoryTest.php index 5393a98586..4ea332349d 100644 --- a/tests/Symfony/Tests/Component/Security/Core/Encoder/EncoderFactoryTest.php +++ b/tests/Symfony/Tests/Component/Security/Core/Encoder/EncoderFactoryTest.php @@ -40,4 +40,4 @@ class EncoderFactoryTest extends \PHPUnit_Framework_TestCase $this->assertEquals($expectedEncoder->encodePassword('foo', ''), $encoder->encodePassword('foo', '')); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Core/User/ChainUserProviderTest.php b/tests/Symfony/Tests/Component/Security/Core/User/ChainUserProviderTest.php index ff7dde4523..4d974cef07 100644 --- a/tests/Symfony/Tests/Component/Security/Core/User/ChainUserProviderTest.php +++ b/tests/Symfony/Tests/Component/Security/Core/User/ChainUserProviderTest.php @@ -162,4 +162,4 @@ class ChainUserProviderTest extends \PHPUnit_Framework_TestCase { return $this->getMock('Symfony\Component\Security\Core\User\UserProviderInterface'); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Http/Firewall/RememberMeListenerTest.php b/tests/Symfony/Tests/Component/Security/Http/Firewall/RememberMeListenerTest.php index 60ac6c7b52..4c24753665 100644 --- a/tests/Symfony/Tests/Component/Security/Http/Firewall/RememberMeListenerTest.php +++ b/tests/Symfony/Tests/Component/Security/Http/Firewall/RememberMeListenerTest.php @@ -185,4 +185,4 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Security/Http/Logout/SessionLogoutHandlerTest.php b/tests/Symfony/Tests/Component/Security/Http/Logout/SessionLogoutHandlerTest.php index 02a4875219..05df6cf8f5 100644 --- a/tests/Symfony/Tests/Component/Security/Http/Logout/SessionLogoutHandlerTest.php +++ b/tests/Symfony/Tests/Component/Security/Http/Logout/SessionLogoutHandlerTest.php @@ -37,4 +37,4 @@ class SessionLogoutHandlerTest extends \PHPUnit_Framework_TestCase $handler->logout($request, $response, $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Serializer/Encoder/XmlEncoderTest.php b/tests/Symfony/Tests/Component/Serializer/Encoder/XmlEncoderTest.php index 20197b854d..3f591ad969 100644 --- a/tests/Symfony/Tests/Component/Serializer/Encoder/XmlEncoderTest.php +++ b/tests/Symfony/Tests/Component/Serializer/Encoder/XmlEncoderTest.php @@ -111,30 +111,30 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase $this->assertEquals($expected, $this->encoder->encode($array, 'xml')); } - + public function testEncodeScalarRootAttributes() { $array = array( '#' => 'Paul', - '@gender' => 'm' + '@gender' => 'm' ); - + $expected = ''."\n". ''."\n"; - + $this->assertEquals($expected, $this->encoder->encode($array, 'xml')); } - + public function testEncodeRootAttributes() { $array = array( 'firstname' => 'Paul', - '@gender' => 'm' + '@gender' => 'm' ); - + $expected = ''."\n". ''."\n"; - + $this->assertEquals($expected, $this->encoder->encode($array, 'xml')); } @@ -185,31 +185,31 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); } - + public function testDecodeScalarRootAttributes() { $source = ''."\n". 'Peter'."\n"; - + $expected = array( '#' => 'Peter', '@gender' => 'M' ); - + $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); } - + public function testDecodeRootAttributes() { $source = ''."\n". 'PeterMac Calloway'."\n"; - + $expected = array( 'firstname' => 'Peter', 'lastname' => 'Mac Calloway', '@gender' => 'M' ); - + $this->assertEquals($expected, $this->encoder->decode($source, 'xml')); } @@ -252,6 +252,7 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase $obj->bar = array('a', 'b'); $obj->baz = array('key' => 'val', 'key2' => 'val', 'A B' => 'bar', "Barry" => array('FooBar' => array("Baz"=>"Ed", "@id"=>1))); $obj->qux = "1"; + return $obj; } } diff --git a/tests/Symfony/Tests/Component/Serializer/Fixtures/Dummy.php b/tests/Symfony/Tests/Component/Serializer/Fixtures/Dummy.php index 0a324fb113..1b3762e3eb 100644 --- a/tests/Symfony/Tests/Component/Serializer/Fixtures/Dummy.php +++ b/tests/Symfony/Tests/Component/Serializer/Fixtures/Dummy.php @@ -29,4 +29,4 @@ class Dummy implements NormalizableInterface $this->baz = $data['baz']; $this->qux = $data['qux']; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Serializer/Fixtures/ScalarDummy.php b/tests/Symfony/Tests/Component/Serializer/Fixtures/ScalarDummy.php index 47d23a0ee7..b412638cdd 100644 --- a/tests/Symfony/Tests/Component/Serializer/Fixtures/ScalarDummy.php +++ b/tests/Symfony/Tests/Component/Serializer/Fixtures/ScalarDummy.php @@ -23,4 +23,4 @@ class ScalarDummy implements NormalizableInterface $this->foo = $data; } } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Serializer/Normalizer/GetSetMethodNormalizerTest.php b/tests/Symfony/Tests/Component/Serializer/Normalizer/GetSetMethodNormalizerTest.php index eac6dd9635..207093be82 100644 --- a/tests/Symfony/Tests/Component/Serializer/Normalizer/GetSetMethodNormalizerTest.php +++ b/tests/Symfony/Tests/Component/Serializer/Normalizer/GetSetMethodNormalizerTest.php @@ -115,4 +115,4 @@ class GetConstructorDummy { throw new \RuntimeException("Dummy::otherMethod() should not be called"); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Templating/Fixtures/templates/foo.php b/tests/Symfony/Tests/Component/Templating/Fixtures/templates/foo.php index dbdaa21b52..7561c34f1a 100644 --- a/tests/Symfony/Tests/Component/Templating/Fixtures/templates/foo.php +++ b/tests/Symfony/Tests/Component/Templating/Fixtures/templates/foo.php @@ -1 +1 @@ - \ No newline at end of file + diff --git a/tests/Symfony/Tests/Component/Templating/Storage/FileStorageTest.php b/tests/Symfony/Tests/Component/Templating/Storage/FileStorageTest.php index 96f960adeb..98ca62a911 100644 --- a/tests/Symfony/Tests/Component/Templating/Storage/FileStorageTest.php +++ b/tests/Symfony/Tests/Component/Templating/Storage/FileStorageTest.php @@ -21,6 +21,6 @@ class FileStorageTest extends \PHPUnit_Framework_TestCase $storage = new FileStorage('foo'); $this->assertInstanceOf('Symfony\Component\Templating\Storage\Storage', $storage, 'FileStorage is an instance of Storage'); $storage = new FileStorage(__DIR__.'/../Fixtures/templates/foo.php'); - $this->assertEquals('', $storage->getContent(), '->getContent() returns the content of the template'); + $this->assertEquals(''."\n", $storage->getContent(), '->getContent() returns the content of the template'); } } diff --git a/tests/Symfony/Tests/Component/Translation/fixtures/non-valid.yml b/tests/Symfony/Tests/Component/Translation/fixtures/non-valid.yml index 1910281566..257cc5642c 100644 --- a/tests/Symfony/Tests/Component/Translation/fixtures/non-valid.yml +++ b/tests/Symfony/Tests/Component/Translation/fixtures/non-valid.yml @@ -1 +1 @@ -foo \ No newline at end of file +foo diff --git a/tests/Symfony/Tests/Component/Validator/ConstraintTest.php b/tests/Symfony/Tests/Component/Validator/ConstraintTest.php index 0c2bece8b2..f1b92a8137 100644 --- a/tests/Symfony/Tests/Component/Validator/ConstraintTest.php +++ b/tests/Symfony/Tests/Component/Validator/ConstraintTest.php @@ -123,4 +123,4 @@ class ConstraintTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array('property', 'class'), $constraint->getTargets()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/AllValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/AllValidatorTest.php index 7406c909a9..a01d27fd37 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/AllValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/AllValidatorTest.php @@ -95,4 +95,4 @@ class AllValidatorTest extends \PHPUnit_Framework_TestCase array(new \ArrayObject(array(1))), ); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/AssertFalseValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/AssertFalseValidatorTest.php index d6a7dcfa9e..5ebae0f567 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/AssertFalseValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/AssertFalseValidatorTest.php @@ -43,4 +43,4 @@ class FalseValidatorTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->validator->getMessageTemplate(), 'myMessage'); $this->assertEquals($this->validator->getMessageParameters(), array()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/AssertTrueValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/AssertTrueValidatorTest.php index 61d3a889dc..37f6dd8422 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/AssertTrueValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/AssertTrueValidatorTest.php @@ -43,4 +43,4 @@ class TrueValidatorTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->validator->getMessageTemplate(), 'myMessage'); $this->assertEquals($this->validator->getMessageParameters(), array()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/AssertTypeValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/AssertTypeValidatorTest.php index c565d0d1d5..3cc15c9c57 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/AssertTypeValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/AssertTypeValidatorTest.php @@ -84,12 +84,12 @@ class TypeValidatorTest extends \PHPUnit_Framework_TestCase $this->assertFalse($this->validator->isValid($value, $constraint)); } - + public function testConstraintViolationCanHandleArrayValue() { $constraint = new Type(array('type' => 'string')); $this->validator->isValid(array(0 => "Test"), $constraint); - + $violation = new ConstraintViolation( '{{ value }}', $this->validator->getMessageParameters(), @@ -97,7 +97,7 @@ class TypeValidatorTest extends \PHPUnit_Framework_TestCase '', '' ); - + $this->assertEquals('Array', $violation->getMessage()); } @@ -157,4 +157,4 @@ class TypeValidatorTest extends \PHPUnit_Framework_TestCase fclose(self::$file); } } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/BlankValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/BlankValidatorTest.php index 921126fc8c..0f71d15a66 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/BlankValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/BlankValidatorTest.php @@ -63,4 +63,4 @@ class BlankValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 'foobar', )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/CallbackValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/CallbackValidatorTest.php index 7b554ba8b8..50fc28c0b7 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/CallbackValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/CallbackValidatorTest.php @@ -178,4 +178,4 @@ class CallbackValidatorTest extends \PHPUnit_Framework_TestCase $this->validator->isValid($object, new Callback(array(array('foo', 'bar')))); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/ChoiceValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/ChoiceValidatorTest.php index 40d426fa78..436b651add 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/ChoiceValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/ChoiceValidatorTest.php @@ -177,4 +177,4 @@ class ChoiceValidatorTest extends \PHPUnit_Framework_TestCase '{{ limit }}' => 2, )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/CollectionValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/CollectionValidatorTest.php index d29bbbf545..0e421db377 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/CollectionValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/CollectionValidatorTest.php @@ -192,4 +192,4 @@ class CollectionValidatorTest extends \PHPUnit_Framework_TestCase 'foo' => 3 ), (array) $value); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/CountryValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/CountryValidatorTest.php index e1260f733e..2b95772e5b 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/CountryValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/CountryValidatorTest.php @@ -85,4 +85,4 @@ class CountryValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 'foobar', )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/DateTimeValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/DateTimeValidatorTest.php index b0a40d5c5a..ec7225e2b2 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/DateTimeValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/DateTimeValidatorTest.php @@ -93,4 +93,4 @@ class DateTimeValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 'foobar', )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/DateValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/DateValidatorTest.php index 7e77c35412..a53ed25d11 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/DateValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/DateValidatorTest.php @@ -87,4 +87,4 @@ class DateValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 'foobar', )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/EmailValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/EmailValidatorTest.php index 830c4aec3a..22322a3550 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/EmailValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/EmailValidatorTest.php @@ -87,4 +87,4 @@ class EmailValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 'foobar', )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/FileValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/FileValidatorTest.php index c5d129e151..5540daac9a 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/FileValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/FileValidatorTest.php @@ -172,4 +172,4 @@ class FileValidatorTest extends \PHPUnit_Framework_TestCase '{{ file }}' => $this->path, )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/IpValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/IpValidatorTest.php index 2b31cde76b..00516311b4 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/IpValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/IpValidatorTest.php @@ -335,4 +335,4 @@ class IpValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 'foobar', )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/LanguageValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/LanguageValidatorTest.php index 247a4d8b30..644f55076b 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/LanguageValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/LanguageValidatorTest.php @@ -85,4 +85,4 @@ class LanguageValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 'foobar', )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/LocaleValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/LocaleValidatorTest.php index 528f7105c5..965cd23983 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/LocaleValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/LocaleValidatorTest.php @@ -86,4 +86,4 @@ class LocaleValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 'foobar', )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/MaxLengthValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/MaxLengthValidatorTest.php index 72866e2e63..a38840a1ee 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/MaxLengthValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/MaxLengthValidatorTest.php @@ -96,4 +96,4 @@ class MaxLengthValidatorTest extends \PHPUnit_Framework_TestCase '{{ limit }}' => 5, )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/MaxValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/MaxValidatorTest.php index 116a462c33..b73cfaea54 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/MaxValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/MaxValidatorTest.php @@ -85,4 +85,4 @@ class MaxValidatorTest extends \PHPUnit_Framework_TestCase '{{ limit }}' => 10, )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/MinLengthValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/MinLengthValidatorTest.php index 5781be5760..3941ca7828 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/MinLengthValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/MinLengthValidatorTest.php @@ -96,4 +96,4 @@ class MinLengthValidatorTest extends \PHPUnit_Framework_TestCase '{{ limit }}' => 5, )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/MinValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/MinValidatorTest.php index 7d4544eb9c..489c98f236 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/MinValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/MinValidatorTest.php @@ -85,4 +85,4 @@ class MinValidatorTest extends \PHPUnit_Framework_TestCase '{{ limit }}' => 10, )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/NotBlankValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/NotBlankValidatorTest.php index f6b3d74500..504db9ad72 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/NotBlankValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/NotBlankValidatorTest.php @@ -61,4 +61,4 @@ class NotBlankValidatorTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->validator->getMessageTemplate(), 'myMessage'); $this->assertEquals($this->validator->getMessageParameters(), array()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/NotNullValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/NotNullValidatorTest.php index 8ce23e5db2..10bdba0e32 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/NotNullValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/NotNullValidatorTest.php @@ -51,4 +51,4 @@ class NotNullValidatorTest extends \PHPUnit_Framework_TestCase $this->assertEquals($this->validator->getMessageTemplate(), 'myMessage'); $this->assertEquals($this->validator->getMessageParameters(), array()); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/NullValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/NullValidatorTest.php index 86c7cf5085..ee218bd49a 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/NullValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/NullValidatorTest.php @@ -58,4 +58,4 @@ class NullValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 1, )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/RegexValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/RegexValidatorTest.php index 72f7a572eb..109a5040f0 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/RegexValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/RegexValidatorTest.php @@ -89,4 +89,4 @@ class RegexValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 'foobar', )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/TimeValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/TimeValidatorTest.php index 934d2a8624..536007cc37 100644 --- a/tests/Symfony/Tests/Component/Validator/Constraints/TimeValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/TimeValidatorTest.php @@ -88,4 +88,4 @@ class TimeValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 'foobar', )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Constraints/UrlValidatorTest.php b/tests/Symfony/Tests/Component/Validator/Constraints/UrlValidatorTest.php index 3ff5ccb35a..dc6ab265c5 100755 --- a/tests/Symfony/Tests/Component/Validator/Constraints/UrlValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/Constraints/UrlValidatorTest.php @@ -91,4 +91,4 @@ class UrlValidatorTest extends \PHPUnit_Framework_TestCase '{{ value }}' => 'foobar', )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/ExecutionContextTest.php b/tests/Symfony/Tests/Component/Validator/ExecutionContextTest.php index b2ab95660e..2d5dc85280 100644 --- a/tests/Symfony/Tests/Component/Validator/ExecutionContextTest.php +++ b/tests/Symfony/Tests/Component/Validator/ExecutionContextTest.php @@ -99,4 +99,4 @@ class ExecutionContextTest extends \PHPUnit_Framework_TestCase $this->context->getMetadataFactory() ); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/ClassConstraint.php b/tests/Symfony/Tests/Component/Validator/Fixtures/ClassConstraint.php index 2bc30b51ad..5e5a3609a1 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/ClassConstraint.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/ClassConstraint.php @@ -10,4 +10,4 @@ class ClassConstraint extends Constraint { return self::CLASS_CONSTRAINT; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/ConstraintAValidator.php b/tests/Symfony/Tests/Component/Validator/Fixtures/ConstraintAValidator.php index 4d2e67815a..e1c15d3b52 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/ConstraintAValidator.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/ConstraintAValidator.php @@ -11,9 +11,10 @@ class ConstraintAValidator extends ConstraintValidator { if ('VALID' != $value) { $this->setMessage('message', array('param' => 'value')); + return false; } return true; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/ConstraintB.php b/tests/Symfony/Tests/Component/Validator/Fixtures/ConstraintB.php index 9caa89e1b4..c4351f373c 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/ConstraintB.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/ConstraintB.php @@ -11,4 +11,4 @@ class ConstraintB extends Constraint { return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/ConstraintC.php b/tests/Symfony/Tests/Component/Validator/Fixtures/ConstraintC.php index 9f4cb2bc27..8f45728e95 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/ConstraintC.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/ConstraintC.php @@ -17,4 +17,4 @@ class ConstraintC extends Constraint { return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/EntityInterface.php b/tests/Symfony/Tests/Component/Validator/Fixtures/EntityInterface.php index 506eeb991b..f207d4954a 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/EntityInterface.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/EntityInterface.php @@ -4,4 +4,4 @@ namespace Symfony\Tests\Component\Validator\Fixtures; interface EntityInterface { -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/EntityParent.php b/tests/Symfony/Tests/Component/Validator/Fixtures/EntityParent.php index 76a976a89f..0111d8cac0 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/EntityParent.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/EntityParent.php @@ -13,4 +13,4 @@ class EntityParent * @NotNull */ protected $other; -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/FailingConstraint.php b/tests/Symfony/Tests/Component/Validator/Fixtures/FailingConstraint.php index b518174394..ea423625a7 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/FailingConstraint.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/FailingConstraint.php @@ -12,4 +12,4 @@ class FailingConstraint extends Constraint { return array(self::PROPERTY_CONSTRAINT, self::CLASS_CONSTRAINT); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/FailingConstraintValidator.php b/tests/Symfony/Tests/Component/Validator/Fixtures/FailingConstraintValidator.php index cc952bb29b..920ffe177e 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/FailingConstraintValidator.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/FailingConstraintValidator.php @@ -13,4 +13,4 @@ class FailingConstraintValidator extends ConstraintValidator return false; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/FakeClassMetadataFactory.php b/tests/Symfony/Tests/Component/Validator/Fixtures/FakeClassMetadataFactory.php index ad810e366a..a2580edf33 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/FakeClassMetadataFactory.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/FakeClassMetadataFactory.php @@ -22,4 +22,4 @@ class FakeClassMetadataFactory implements ClassMetadataFactoryInterface { $this->metadatas[$metadata->getClassName()] = $metadata; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/FilesLoader.php b/tests/Symfony/Tests/Component/Validator/Fixtures/FilesLoader.php index df23ceae03..a471d86d9f 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/FilesLoader.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/FilesLoader.php @@ -19,6 +19,7 @@ abstract class FilesLoader extends BaseFilesLoader protected function getFileLoaderInstance($file) { $this->timesCalled++; + return $this->loader; } @@ -26,4 +27,4 @@ abstract class FilesLoader extends BaseFilesLoader { return $this->timesCalled; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/InvalidConstraint.php b/tests/Symfony/Tests/Component/Validator/Fixtures/InvalidConstraint.php index c16f93a174..8df571a7e6 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/InvalidConstraint.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/InvalidConstraint.php @@ -4,4 +4,4 @@ namespace Symfony\Tests\Component\Validator\Fixtures; use Symfony\Component\Validator\Constraint; -class InvalidConstraint extends Constraint {} \ No newline at end of file +class InvalidConstraint extends Constraint {} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/InvalidConstraintValidator.php b/tests/Symfony/Tests/Component/Validator/Fixtures/InvalidConstraintValidator.php index 8ccec4b8b9..7b9fa79e9a 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/InvalidConstraintValidator.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/InvalidConstraintValidator.php @@ -2,4 +2,4 @@ namespace Symfony\Tests\Component\Validator\Fixtures; -class InvalidConstraintValidator {} \ No newline at end of file +class InvalidConstraintValidator {} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/PropertyConstraint.php b/tests/Symfony/Tests/Component/Validator/Fixtures/PropertyConstraint.php index 7233b14cf6..f5241ca041 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/PropertyConstraint.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/PropertyConstraint.php @@ -10,4 +10,4 @@ class PropertyConstraint extends Constraint { return self::PROPERTY_CONSTRAINT; } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Fixtures/Reference.php b/tests/Symfony/Tests/Component/Validator/Fixtures/Reference.php index 88c4081528..8dd2c9d428 100644 --- a/tests/Symfony/Tests/Component/Validator/Fixtures/Reference.php +++ b/tests/Symfony/Tests/Component/Validator/Fixtures/Reference.php @@ -4,4 +4,4 @@ namespace Symfony\Tests\Component\Validator\Fixtures; class Reference { -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/GraphWalkerTest.php b/tests/Symfony/Tests/Component/Validator/GraphWalkerTest.php index b8683dc9de..e9da305984 100644 --- a/tests/Symfony/Tests/Component/Validator/GraphWalkerTest.php +++ b/tests/Symfony/Tests/Component/Validator/GraphWalkerTest.php @@ -404,4 +404,4 @@ class GraphWalkerTest extends \PHPUnit_Framework_TestCase $this->assertEquals(0, count($this->walker->getViolations())); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Mapping/Loader/FilesLoaderTest.php b/tests/Symfony/Tests/Component/Validator/Mapping/Loader/FilesLoaderTest.php index 9cba65e739..83cb567924 100644 --- a/tests/Symfony/Tests/Component/Validator/Mapping/Loader/FilesLoaderTest.php +++ b/tests/Symfony/Tests/Component/Validator/Mapping/Loader/FilesLoaderTest.php @@ -48,4 +48,4 @@ class FilesLoaderTest extends \PHPUnit_Framework_TestCase { return $this->getMock('Symfony\Component\Validator\Mapping\Loader\LoaderInterface'); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/Mapping/Loader/constraint-mapping.xml b/tests/Symfony/Tests/Component/Validator/Mapping/Loader/constraint-mapping.xml index 6de99f665d..03c2467951 100644 --- a/tests/Symfony/Tests/Component/Validator/Mapping/Loader/constraint-mapping.xml +++ b/tests/Symfony/Tests/Component/Validator/Mapping/Loader/constraint-mapping.xml @@ -3,7 +3,7 @@ - + Symfony\Tests\Component\Validator\Fixtures\ @@ -19,25 +19,25 @@ - + - + 3 - + A B - + 3 - + - + - + @@ -77,4 +77,4 @@ - \ No newline at end of file + diff --git a/tests/Symfony/Tests/Component/Validator/Mapping/Loader/constraint-mapping.yml b/tests/Symfony/Tests/Component/Validator/Mapping/Loader/constraint-mapping.yml index c304153438..ea1ba6fec9 100644 --- a/tests/Symfony/Tests/Component/Validator/Mapping/Loader/constraint-mapping.yml +++ b/tests/Symfony/Tests/Component/Validator/Mapping/Loader/constraint-mapping.yml @@ -7,7 +7,7 @@ Symfony\Tests\Component\Validator\Fixtures\Entity: - Symfony\Tests\Component\Validator\Fixtures\ConstraintA: ~ # Custom constraint with namespaces prefix - "custom:ConstraintB": ~ - + properties: firstName: # Constraint without value @@ -35,8 +35,7 @@ Symfony\Tests\Component\Validator\Fixtures\Entity: - Min: 5 # Constraint with options - Choice: { choices: [A, B], message: Must be one of %choices% } - + getters: lastName: - NotNull: ~ - \ No newline at end of file diff --git a/tests/Symfony/Tests/Component/Validator/Mapping/Loader/nonvalid-mapping.yml b/tests/Symfony/Tests/Component/Validator/Mapping/Loader/nonvalid-mapping.yml index 1910281566..257cc5642c 100644 --- a/tests/Symfony/Tests/Component/Validator/Mapping/Loader/nonvalid-mapping.yml +++ b/tests/Symfony/Tests/Component/Validator/Mapping/Loader/nonvalid-mapping.yml @@ -1 +1 @@ -foo \ No newline at end of file +foo diff --git a/tests/Symfony/Tests/Component/Validator/ValidatorContextTest.php b/tests/Symfony/Tests/Component/Validator/ValidatorContextTest.php index 39c1870175..96f4feade7 100644 --- a/tests/Symfony/Tests/Component/Validator/ValidatorContextTest.php +++ b/tests/Symfony/Tests/Component/Validator/ValidatorContextTest.php @@ -53,4 +53,4 @@ class ValidatorContextTest extends \PHPUnit_Framework_TestCase $this->assertEquals(new Validator($metadataFactory, $validatorFactory), $validator); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/ValidatorFactoryTest.php b/tests/Symfony/Tests/Component/Validator/ValidatorFactoryTest.php index 309c561772..9e5ede6017 100644 --- a/tests/Symfony/Tests/Component/Validator/ValidatorFactoryTest.php +++ b/tests/Symfony/Tests/Component/Validator/ValidatorFactoryTest.php @@ -184,4 +184,4 @@ class ValidatorFactoryTest extends \PHPUnit_Framework_TestCase __DIR__.'/Mapping/Loader/StaticMethodLoaderTest.php' )); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Validator/ValidatorTest.php b/tests/Symfony/Tests/Component/Validator/ValidatorTest.php index ca30cc9848..4eb3823dc8 100644 --- a/tests/Symfony/Tests/Component/Validator/ValidatorTest.php +++ b/tests/Symfony/Tests/Component/Validator/ValidatorTest.php @@ -154,4 +154,4 @@ class ValidatorTest extends \PHPUnit_Framework_TestCase $this->validator->getMetadataFactory() ); } -} \ No newline at end of file +} diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsBasicTests.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsBasicTests.yml index eafee681d1..5542b0dc63 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsBasicTests.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsBasicTests.yml @@ -1,144 +1,144 @@ --- %YAML:1.0 -test: Simple Sequence -brief: | - You can specify a list in YAML by placing each - member of the list on a new line with an opening - dash. These lists are called sequences. -yaml: | - - apple - - banana - - carrot +test: Simple Sequence +brief: | + You can specify a list in YAML by placing each + member of the list on a new line with an opening + dash. These lists are called sequences. +yaml: | + - apple + - banana + - carrot php: | array('apple', 'banana', 'carrot') ---- -test: Nested Sequences -brief: | - You can include a sequence within another - sequence by giving the sequence an empty - dash, followed by an indented list. -yaml: | - - - - foo - - bar - - baz -php: | +--- +test: Nested Sequences +brief: | + You can include a sequence within another + sequence by giving the sequence an empty + dash, followed by an indented list. +yaml: | + - + - foo + - bar + - baz +php: | array(array('foo', 'bar', 'baz')) ---- -test: Mixed Sequences -brief: | - Sequences can contain any YAML data, - including strings and other sequences. -yaml: | - - apple - - - - foo - - bar - - x123 - - banana - - carrot -php: | +--- +test: Mixed Sequences +brief: | + Sequences can contain any YAML data, + including strings and other sequences. +yaml: | + - apple + - + - foo + - bar + - x123 + - banana + - carrot +php: | array('apple', array('foo', 'bar', 'x123'), 'banana', 'carrot') ---- -test: Deeply Nested Sequences -brief: | - Sequences can be nested even deeper, with each - level of indentation representing a level of - depth. -yaml: | - - - - - - uno - - dos -php: | +--- +test: Deeply Nested Sequences +brief: | + Sequences can be nested even deeper, with each + level of indentation representing a level of + depth. +yaml: | + - + - + - uno + - dos +php: | array(array(array('uno', 'dos'))) ---- -test: Simple Mapping -brief: | - You can add a keyed list (also known as a dictionary or - hash) to your document by placing each member of the - list on a new line, with a colon seperating the key - from its value. In YAML, this type of list is called - a mapping. -yaml: | - foo: whatever - bar: stuff -php: | +--- +test: Simple Mapping +brief: | + You can add a keyed list (also known as a dictionary or + hash) to your document by placing each member of the + list on a new line, with a colon seperating the key + from its value. In YAML, this type of list is called + a mapping. +yaml: | + foo: whatever + bar: stuff +php: | array('foo' => 'whatever', 'bar' => 'stuff') ---- -test: Sequence in a Mapping -brief: | - A value in a mapping can be a sequence. -yaml: | - foo: whatever - bar: - - uno - - dos -php: | +--- +test: Sequence in a Mapping +brief: | + A value in a mapping can be a sequence. +yaml: | + foo: whatever + bar: + - uno + - dos +php: | array('foo' => 'whatever', 'bar' => array('uno', 'dos')) ---- -test: Nested Mappings -brief: | - A value in a mapping can be another mapping. -yaml: | - foo: whatever - bar: - fruit: apple - name: steve - sport: baseball -php: | +--- +test: Nested Mappings +brief: | + A value in a mapping can be another mapping. +yaml: | + foo: whatever + bar: + fruit: apple + name: steve + sport: baseball +php: | array( - 'foo' => 'whatever', + 'foo' => 'whatever', 'bar' => array( - 'fruit' => 'apple', - 'name' => 'steve', - 'sport' => 'baseball' - ) - ) ---- -test: Mixed Mapping -brief: | - A mapping can contain any assortment - of mappings and sequences as values. -yaml: | - foo: whatever - bar: - - - fruit: apple - name: steve - sport: baseball - - more - - - python: rocks - perl: papers - ruby: scissorses -php: | + 'fruit' => 'apple', + 'name' => 'steve', + 'sport' => 'baseball' + ) + ) +--- +test: Mixed Mapping +brief: | + A mapping can contain any assortment + of mappings and sequences as values. +yaml: | + foo: whatever + bar: + - + fruit: apple + name: steve + sport: baseball + - more + - + python: rocks + perl: papers + ruby: scissorses +php: | array( - 'foo' => 'whatever', - 'bar' => array( - array( - 'fruit' => 'apple', - 'name' => 'steve', - 'sport' => 'baseball' - ), - 'more', - array( - 'python' => 'rocks', - 'perl' => 'papers', - 'ruby' => 'scissorses' - ) - ) - ) ---- -test: Mapping-in-Sequence Shortcut + 'foo' => 'whatever', + 'bar' => array( + array( + 'fruit' => 'apple', + 'name' => 'steve', + 'sport' => 'baseball' + ), + 'more', + array( + 'python' => 'rocks', + 'perl' => 'papers', + 'ruby' => 'scissorses' + ) + ) + ) +--- +test: Mapping-in-Sequence Shortcut todo: true -brief: | - If you are adding a mapping to a sequence, you - can place the mapping on the same line as the - dash as a shortcut. -yaml: | - - work on YAML.py: - - work on Store -php: | +brief: | + If you are adding a mapping to a sequence, you + can place the mapping on the same line as the + dash as a shortcut. +yaml: | + - work on YAML.py: + - work on Store +php: | array(array('work on YAML.py' => array('work on Store'))) --- test: Sequence-in-Mapping Shortcut diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsBlockMapping.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsBlockMapping.yml index 3a2d410c9d..f7ca469b40 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsBlockMapping.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsBlockMapping.yml @@ -1,52 +1,51 @@ ---- -test: One Element Mapping -brief: | - A mapping with one key/value pair -yaml: | - foo: bar -php: | +--- +test: One Element Mapping +brief: | + A mapping with one key/value pair +yaml: | + foo: bar +php: | array('foo' => 'bar') ---- -test: Multi Element Mapping -brief: | - More than one key/value pair -yaml: | - red: baron - white: walls - blue: berries -php: | +--- +test: Multi Element Mapping +brief: | + More than one key/value pair +yaml: | + red: baron + white: walls + blue: berries +php: | array( - 'red' => 'baron', - 'white' => 'walls', - 'blue' => 'berries', + 'red' => 'baron', + 'white' => 'walls', + 'blue' => 'berries', ) ---- -test: Values aligned -brief: | - Often times human editors of documents will align the values even - though YAML emitters generally don't. -yaml: | - red: baron - white: walls - blue: berries -php: | +--- +test: Values aligned +brief: | + Often times human editors of documents will align the values even + though YAML emitters generally don't. +yaml: | + red: baron + white: walls + blue: berries +php: | array( - 'red' => 'baron', - 'white' => 'walls', - 'blue' => 'berries', + 'red' => 'baron', + 'white' => 'walls', + 'blue' => 'berries', ) ---- -test: Colons aligned -brief: | - Spaces can come before the ': ' key/value separator. -yaml: | - red : baron - white : walls - blue : berries -php: | +--- +test: Colons aligned +brief: | + Spaces can come before the ': ' key/value separator. +yaml: | + red : baron + white : walls + blue : berries +php: | array( - 'red' => 'baron', - 'white' => 'walls', - 'blue' => 'berries', + 'red' => 'baron', + 'white' => 'walls', + 'blue' => 'berries', ) - \ No newline at end of file diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsDocumentSeparator.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsDocumentSeparator.yml index d0e3877f97..f8501ddc29 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsDocumentSeparator.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsDocumentSeparator.yml @@ -1,9 +1,9 @@ ---- %YAML:1.0 -test: Trailing Document Separator +--- %YAML:1.0 +test: Trailing Document Separator todo: true -brief: > - You can separate YAML documents - with a string of three dashes. +brief: > + You can separate YAML documents + with a string of three dashes. yaml: | - foo: 1 bar: 2 @@ -17,12 +17,12 @@ python: | ruby: | [ { 'foo' => 1, 'bar' => 2 } ] ---- -test: Leading Document Separator +--- +test: Leading Document Separator todo: true brief: > - You can explicity give an opening - document separator to your YAML stream. + You can explicity give an opening + document separator to your YAML stream. yaml: | --- - foo: 1 @@ -30,56 +30,56 @@ yaml: | --- more: stuff python: | - [ - [ {'foo': 1, 'bar': 2}], - {'more': 'stuff'} + [ + [ {'foo': 1, 'bar': 2}], + {'more': 'stuff'} ] ruby: | - [ { 'foo' => 1, 'bar' => 2 } ] + [ { 'foo' => 1, 'bar' => 2 } ] ---- -test: YAML Header +--- +test: YAML Header todo: true -brief: > - The opening separator can contain directives - to the YAML parser, such as the version - number. -yaml: | - --- %YAML:1.0 - foo: 1 - bar: 2 -php: | +brief: > + The opening separator can contain directives + to the YAML parser, such as the version + number. +yaml: | + --- %YAML:1.0 + foo: 1 + bar: 2 +php: | array('foo' => 1, 'bar' => 2) -documents: 1 - ---- -test: Red Herring Document Separator -brief: > - Separators included in blocks or strings - are treated as blocks or strings, as the - document separator should have no indentation - preceding it. -yaml: | +documents: 1 + +--- +test: Red Herring Document Separator +brief: > + Separators included in blocks or strings + are treated as blocks or strings, as the + document separator should have no indentation + preceding it. +yaml: | foo: | --- -php: | +php: | array('foo' => "---\n") - ---- -test: Multiple Document Separators in Block -brief: > - This technique allows you to embed other YAML - documents within literal blocks. -yaml: | - foo: | + +--- +test: Multiple Document Separators in Block +brief: > + This technique allows you to embed other YAML + documents within literal blocks. +yaml: | + foo: | --- foo: bar --- yo: baz - bar: | + bar: | fooness -php: | - array( - 'foo' => "---\nfoo: bar\n---\nyo: baz\n", - 'bar' => "fooness\n" +php: | + array( + 'foo' => "---\nfoo: bar\n---\nyo: baz\n", + 'bar' => "fooness\n" ) diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsErrorTests.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsErrorTests.yml index c0d6d6d3bb..753d82947b 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsErrorTests.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsErrorTests.yml @@ -1,26 +1,26 @@ ---- -test: Missing value for hash item +--- +test: Missing value for hash item todo: true -brief: | - Third item in this hash doesn't have a value -yaml: | - okay: value - also okay: ~ - causes error because no value specified - last key: value okay here too -python-error: causes error because no value specified - ---- -test: Not indenting enough -brief: | - There was a bug in PyYaml where it was off by one - in the indentation check. It was allowing the YAML - below. -# This is actually valid YAML now. Someone should tell showell. -yaml: | - foo: - firstline: 1 - secondline: 2 +brief: | + Third item in this hash doesn't have a value +yaml: | + okay: value + also okay: ~ + causes error because no value specified + last key: value okay here too +python-error: causes error because no value specified + +--- +test: Not indenting enough +brief: | + There was a bug in PyYaml where it was off by one + in the indentation check. It was allowing the YAML + below. +# This is actually valid YAML now. Someone should tell showell. +yaml: | + foo: + firstline: 1 + secondline: 2 php: | array('foo' => null, 'firstline' => 1, 'secondline' => 2) diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsFlowCollections.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsFlowCollections.yml index 56bf6b87f4..03090e4abc 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsFlowCollections.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsFlowCollections.yml @@ -1,60 +1,60 @@ ---- -test: Simple Inline Array -brief: > - Sequences can be contained on a - single line, using the inline syntax. - Separate each entry with commas and - enclose in square brackets. -yaml: | - seq: [ a, b, c ] -php: | +--- +test: Simple Inline Array +brief: > + Sequences can be contained on a + single line, using the inline syntax. + Separate each entry with commas and + enclose in square brackets. +yaml: | + seq: [ a, b, c ] +php: | array('seq' => array('a', 'b', 'c')) ---- -test: Simple Inline Hash -brief: > - Mapping can also be contained on - a single line, using the inline - syntax. Each key-value pair is - separated by a colon, with a comma - between each entry in the mapping. - Enclose with curly braces. -yaml: | - hash: { name: Steve, foo: bar } -php: | +--- +test: Simple Inline Hash +brief: > + Mapping can also be contained on + a single line, using the inline + syntax. Each key-value pair is + separated by a colon, with a comma + between each entry in the mapping. + Enclose with curly braces. +yaml: | + hash: { name: Steve, foo: bar } +php: | array('hash' => array('name' => 'Steve', 'foo' => 'bar')) ---- -test: Multi-line Inline Collections +--- +test: Multi-line Inline Collections todo: true -brief: > - Both inline sequences and inline mappings - can span multiple lines, provided that you - indent the additional lines. -yaml: | - languages: [ Ruby, - Perl, - Python ] - websites: { YAML: yaml.org, - Ruby: ruby-lang.org, - Python: python.org, - Perl: use.perl.org } -php: | +brief: > + Both inline sequences and inline mappings + can span multiple lines, provided that you + indent the additional lines. +yaml: | + languages: [ Ruby, + Perl, + Python ] + websites: { YAML: yaml.org, + Ruby: ruby-lang.org, + Python: python.org, + Perl: use.perl.org } +php: | array( - 'languages' => array('Ruby', 'Perl', 'Python'), + 'languages' => array('Ruby', 'Perl', 'Python'), 'websites' => array( - 'YAML' => 'yaml.org', - 'Ruby' => 'ruby-lang.org', - 'Python' => 'python.org', - 'Perl' => 'use.perl.org' + 'YAML' => 'yaml.org', + 'Ruby' => 'ruby-lang.org', + 'Python' => 'python.org', + 'Perl' => 'use.perl.org' ) ) ---- +--- test: Commas in Values (not in the spec!) todo: true -brief: > - List items in collections are delimited by commas, but - there must be a space after each comma. This allows you - to add numbers without quoting. -yaml: | - attendances: [ 45,123, 70,000, 17,222 ] -php: | +brief: > + List items in collections are delimited by commas, but + there must be a space after each comma. This allows you + to add numbers without quoting. +yaml: | + attendances: [ 45,123, 70,000, 17,222 ] +php: | array('attendances' => array(45123, 70000, 17222)) diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsFoldedScalars.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsFoldedScalars.yml index d1432f63b9..a14735a55a 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsFoldedScalars.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsFoldedScalars.yml @@ -1,23 +1,23 @@ ---- %YAML:1.0 -test: Single ending newline -brief: > +--- %YAML:1.0 +test: Single ending newline +brief: > A pipe character, followed by an indented block of text is treated as a literal block, in which newlines are preserved throughout the block, including the final newline. -yaml: | +yaml: | --- this: | Foo Bar -php: | +php: | array('this' => "Foo\nBar\n") ---- -test: The '+' indicator -brief: > - The '+' indicator says to keep newlines at the end of text - blocks. +--- +test: The '+' indicator +brief: > + The '+' indicator says to keep newlines at the end of text + blocks. yaml: | normal: | extra new lines not kept @@ -27,21 +27,21 @@ yaml: | dummy: value -php: | - array( - 'normal' => "extra new lines not kept\n", - 'preserving' => "extra new lines are kept\n\n\n", - 'dummy' => 'value' - ) ---- -test: Three trailing newlines in literals -brief: > - To give you more control over how space - is preserved in text blocks, YAML has - the keep '+' and chomp '-' indicators. - The keep indicator will preserve all - ending newlines, while the chomp indicator - will strip all ending newlines. +php: | + array( + 'normal' => "extra new lines not kept\n", + 'preserving' => "extra new lines are kept\n\n\n", + 'dummy' => 'value' + ) +--- +test: Three trailing newlines in literals +brief: > + To give you more control over how space + is preserved in text blocks, YAML has + the keep '+' and chomp '-' indicators. + The keep indicator will preserve all + ending newlines, while the chomp indicator + will strip all ending newlines. yaml: | clipped: | This has one newline. @@ -64,48 +64,48 @@ yaml: | same as "kept" above: "This has four newlines.\n\n\n\n" php: | - array( - 'clipped' => "This has one newline.\n", - 'same as "clipped" above' => "This has one newline.\n", - 'stripped' => 'This has no newline.', - 'same as "stripped" above' => 'This has no newline.', - 'kept' => "This has four newlines.\n\n\n\n", - 'same as "kept" above' => "This has four newlines.\n\n\n\n" + array( + 'clipped' => "This has one newline.\n", + 'same as "clipped" above' => "This has one newline.\n", + 'stripped' => 'This has no newline.', + 'same as "stripped" above' => 'This has no newline.', + 'kept' => "This has four newlines.\n\n\n\n", + 'same as "kept" above' => "This has four newlines.\n\n\n\n" ) ---- +--- test: Extra trailing newlines with spaces todo: true brief: > - Normally, only a single newline is kept - from the end of a literal block, unless the - keep '+' character is used in combination - with the pipe. The following example - will preserve all ending whitespace - since the last line of both literal blocks - contains spaces which extend past the indentation - level. + Normally, only a single newline is kept + from the end of a literal block, unless the + keep '+' character is used in combination + with the pipe. The following example + will preserve all ending whitespace + since the last line of both literal blocks + contains spaces which extend past the indentation + level. yaml: | --- this: | Foo - + kept: |+ Foo - -php: | - array('this' => "Foo\n\n \n", + +php: | + array('this' => "Foo\n\n \n", 'kept' => "Foo\n\n \n" ) - ---- -test: Folded Block in a Sequence -brief: > - A greater-then character, followed by an indented - block of text is treated as a folded block, in - which lines of text separated by a single newline - are concatenated as a single line. -yaml: | + +--- +test: Folded Block in a Sequence +brief: > + A greater-then character, followed by an indented + block of text is treated as a folded block, in + which lines of text separated by a single newline + are concatenated as a single line. +yaml: | --- - apple - banana @@ -114,19 +114,19 @@ yaml: | the beauty of yaml? hmm - dog -php: | - array( - 'apple', - 'banana', - "can't you see the beauty of yaml? hmm\n", - 'dog' +php: | + array( + 'apple', + 'banana', + "can't you see the beauty of yaml? hmm\n", + 'dog' ) ---- -test: Folded Block as a Mapping Value -brief: > - Both literal and folded blocks can be - used in collections, as values in a - sequence or a mapping. +--- +test: Folded Block as a Mapping Value +brief: > + Both literal and folded blocks can be + used in collections, as values in a + sequence or a mapping. yaml: | --- quote: > @@ -135,23 +135,23 @@ yaml: | by a knee injury. source: espn php: | - array( - 'quote' => "Mark McGwire's year was crippled by a knee injury.\n", - 'source' => 'espn' - ) ---- -test: Three trailing newlines in folded blocks -brief: > - The keep and chomp indicators can also - be applied to folded blocks. -yaml: | + array( + 'quote' => "Mark McGwire's year was crippled by a knee injury.\n", + 'source' => 'espn' + ) +--- +test: Three trailing newlines in folded blocks +brief: > + The keep and chomp indicators can also + be applied to folded blocks. +yaml: | clipped: > This has one newline. - same as "clipped" above: "This has one newline.\n" - + same as "clipped" above: "This has one newline.\n" + stripped: >- This has no newline. @@ -166,11 +166,11 @@ yaml: | same as "kept" above: "This has four newlines.\n\n\n\n" php: | - array( - 'clipped' => "This has one newline.\n", - 'same as "clipped" above' => "This has one newline.\n", - 'stripped' => 'This has no newline.', - 'same as "stripped" above' => 'This has no newline.', - 'kept' => "This has four newlines.\n\n\n\n", - 'same as "kept" above' => "This has four newlines.\n\n\n\n" + array( + 'clipped' => "This has one newline.\n", + 'same as "clipped" above' => "This has one newline.\n", + 'stripped' => 'This has no newline.', + 'same as "stripped" above' => 'This has no newline.', + 'kept' => "This has four newlines.\n\n\n\n", + 'same as "kept" above' => "This has four newlines.\n\n\n\n" ) diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsNullsAndEmpties.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsNullsAndEmpties.yml index 4e0c8dbf1c..9a5300f2ef 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsNullsAndEmpties.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsNullsAndEmpties.yml @@ -1,45 +1,45 @@ ---- %YAML:1.0 -test: Empty Sequence -brief: > - You can represent the empty sequence - with an empty inline sequence. -yaml: | - empty: [] -php: | +--- %YAML:1.0 +test: Empty Sequence +brief: > + You can represent the empty sequence + with an empty inline sequence. +yaml: | + empty: [] +php: | array('empty' => array()) ---- -test: Empty Mapping -brief: > - You can represent the empty mapping - with an empty inline mapping. -yaml: | - empty: {} -php: | +--- +test: Empty Mapping +brief: > + You can represent the empty mapping + with an empty inline mapping. +yaml: | + empty: {} +php: | array('empty' => array()) ---- -test: Empty Sequence as Entire Document -yaml: | - [] -php: | +--- +test: Empty Sequence as Entire Document +yaml: | + [] +php: | array() ---- -test: Empty Mapping as Entire Document -yaml: | - {} -php: | - array() ---- -test: Null as Document -yaml: | - ~ -php: | +--- +test: Empty Mapping as Entire Document +yaml: | + {} +php: | + array() +--- +test: Null as Document +yaml: | + ~ +php: | null ---- -test: Empty String -brief: > - You can represent an empty string - with a pair of quotes. -yaml: | - '' -php: | - '' +--- +test: Empty String +brief: > + You can represent an empty string + with a pair of quotes. +yaml: | + '' +php: | + '' diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsSpecificationExamples.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsSpecificationExamples.yml index a1d300f00e..37da5234e1 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsSpecificationExamples.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsSpecificationExamples.yml @@ -1,98 +1,98 @@ ---- %YAML:1.0 -test: Sequence of scalars +--- %YAML:1.0 +test: Sequence of scalars spec: 2.1 -yaml: | - - Mark McGwire - - Sammy Sosa - - Ken Griffey -php: | +yaml: | + - Mark McGwire + - Sammy Sosa + - Ken Griffey +php: | array('Mark McGwire', 'Sammy Sosa', 'Ken Griffey') ---- -test: Mapping of scalars to scalars +--- +test: Mapping of scalars to scalars spec: 2.2 -yaml: | - hr: 65 - avg: 0.278 - rbi: 147 -php: | +yaml: | + hr: 65 + avg: 0.278 + rbi: 147 +php: | array('hr' => 65, 'avg' => 0.278, 'rbi' => 147) ---- -test: Mapping of scalars to sequences +--- +test: Mapping of scalars to sequences spec: 2.3 -yaml: | - american: - - Boston Red Sox - - Detroit Tigers - - New York Yankees - national: - - New York Mets - - Chicago Cubs - - Atlanta Braves -php: | - array('american' => - array( 'Boston Red Sox', 'Detroit Tigers', - 'New York Yankees' ), - 'national' => - array( 'New York Mets', 'Chicago Cubs', +yaml: | + american: + - Boston Red Sox + - Detroit Tigers + - New York Yankees + national: + - New York Mets + - Chicago Cubs + - Atlanta Braves +php: | + array('american' => + array( 'Boston Red Sox', 'Detroit Tigers', + 'New York Yankees' ), + 'national' => + array( 'New York Mets', 'Chicago Cubs', 'Atlanta Braves' ) - ) ---- -test: Sequence of mappings -spec: 2.4 -yaml: | - - - name: Mark McGwire - hr: 65 - avg: 0.278 - - - name: Sammy Sosa - hr: 63 - avg: 0.288 -php: | - array( - array('name' => 'Mark McGwire', 'hr' => 65, 'avg' => 0.278), - array('name' => 'Sammy Sosa', 'hr' => 63, 'avg' => 0.288) ) ---- -test: Legacy A5 +--- +test: Sequence of mappings +spec: 2.4 +yaml: | + - + name: Mark McGwire + hr: 65 + avg: 0.278 + - + name: Sammy Sosa + hr: 63 + avg: 0.288 +php: | + array( + array('name' => 'Mark McGwire', 'hr' => 65, 'avg' => 0.278), + array('name' => 'Sammy Sosa', 'hr' => 63, 'avg' => 0.288) + ) +--- +test: Legacy A5 todo: true -spec: legacy_A5 -yaml: | - ? - - New York Yankees - - Atlanta Braves - : - - 2001-07-02 - - 2001-08-12 - - 2001-08-14 - ? - - Detroit Tigers - - Chicago Cubs - : - - 2001-07-23 -perl-busted: > - YAML.pm will be able to emulate this behavior soon. In this regard - it may be somewhat more correct than Python's native behaviour which - can only use tuples as mapping keys. PyYAML will also need to figure +spec: legacy_A5 +yaml: | + ? + - New York Yankees + - Atlanta Braves + : + - 2001-07-02 + - 2001-08-12 + - 2001-08-14 + ? + - Detroit Tigers + - Chicago Cubs + : + - 2001-07-23 +perl-busted: > + YAML.pm will be able to emulate this behavior soon. In this regard + it may be somewhat more correct than Python's native behaviour which + can only use tuples as mapping keys. PyYAML will also need to figure out some clever way to roundtrip structured keys. -python: | - [ - { - ('New York Yankees', 'Atlanta Braves'): - [yaml.timestamp('2001-07-02'), - yaml.timestamp('2001-08-12'), - yaml.timestamp('2001-08-14')], - ('Detroit Tigers', 'Chicago Cubs'): - [yaml.timestamp('2001-07-23')] - } - ] -ruby: | - { - [ 'New York Yankees', 'Atlanta Braves' ] => - [ Date.new( 2001, 7, 2 ), Date.new( 2001, 8, 12 ), Date.new( 2001, 8, 14 ) ], - [ 'Detroit Tigers', 'Chicago Cubs' ] => - [ Date.new( 2001, 7, 23 ) ] - } +python: | + [ + { + ('New York Yankees', 'Atlanta Braves'): + [yaml.timestamp('2001-07-02'), + yaml.timestamp('2001-08-12'), + yaml.timestamp('2001-08-14')], + ('Detroit Tigers', 'Chicago Cubs'): + [yaml.timestamp('2001-07-23')] + } + ] +ruby: | + { + [ 'New York Yankees', 'Atlanta Braves' ] => + [ Date.new( 2001, 7, 2 ), Date.new( 2001, 8, 12 ), Date.new( 2001, 8, 14 ) ], + [ 'Detroit Tigers', 'Chicago Cubs' ] => + [ Date.new( 2001, 7, 23 ) ] + } syck: | struct test_node seq1[] = { { T_STR, 0, "New York Yankees" }, @@ -125,63 +125,63 @@ syck: | { T_MAP, 0, 0, map }, end_node }; - ---- -test: Sequence of sequences + +--- +test: Sequence of sequences spec: 2.5 -yaml: | - - [ name , hr , avg ] - - [ Mark McGwire , 65 , 0.278 ] - - [ Sammy Sosa , 63 , 0.288 ] -php: | - array( - array( 'name', 'hr', 'avg' ), - array( 'Mark McGwire', 65, 0.278 ), - array( 'Sammy Sosa', 63, 0.288 ) +yaml: | + - [ name , hr , avg ] + - [ Mark McGwire , 65 , 0.278 ] + - [ Sammy Sosa , 63 , 0.288 ] +php: | + array( + array( 'name', 'hr', 'avg' ), + array( 'Mark McGwire', 65, 0.278 ), + array( 'Sammy Sosa', 63, 0.288 ) ) ---- -test: Mapping of mappings +--- +test: Mapping of mappings todo: true spec: 2.6 -yaml: | +yaml: | Mark McGwire: {hr: 65, avg: 0.278} Sammy Sosa: { hr: 63, avg: 0.288 } -php: | - array( - 'Mark McGwire' => - array( 'hr' => 65, 'avg' => 0.278 ), - 'Sammy Sosa' => - array( 'hr' => 63, 'avg' => 0.288 ) +php: | + array( + 'Mark McGwire' => + array( 'hr' => 65, 'avg' => 0.278 ), + 'Sammy Sosa' => + array( 'hr' => 63, 'avg' => 0.288 ) ) ---- +--- test: Two documents in a stream each with a leading comment todo: true -spec: 2.7 -yaml: | +spec: 2.7 +yaml: | # Ranking of 1998 home runs --- - Mark McGwire - Sammy Sosa - Ken Griffey - + # Team ranking --- - Chicago Cubs - St Louis Cardinals -ruby: | - y = YAML::Stream.new - y.add( [ 'Mark McGwire', 'Sammy Sosa', 'Ken Griffey' ] ) - y.add( [ 'Chicago Cubs', 'St Louis Cardinals' ] ) -documents: 2 - ---- +ruby: | + y = YAML::Stream.new + y.add( [ 'Mark McGwire', 'Sammy Sosa', 'Ken Griffey' ] ) + y.add( [ 'Chicago Cubs', 'St Louis Cardinals' ] ) +documents: 2 + +--- test: Play by play feed from a game todo: true spec: 2.8 -yaml: | +yaml: | --- time: 20:03:20 player: Sammy Sosa @@ -192,65 +192,65 @@ yaml: | player: Sammy Sosa action: grand slam ... -perl: | - [ 'Mark McGwire', 'Sammy Sosa', 'Ken Griffey' ] -documents: 2 - ---- -test: Single document with two comments +perl: | + [ 'Mark McGwire', 'Sammy Sosa', 'Ken Griffey' ] +documents: 2 + +--- +test: Single document with two comments spec: 2.9 -yaml: | - hr: # 1998 hr ranking - - Mark McGwire - - Sammy Sosa - rbi: - # 1998 rbi ranking - - Sammy Sosa - - Ken Griffey -php: | - array( - 'hr' => array( 'Mark McGwire', 'Sammy Sosa' ), - 'rbi' => array( 'Sammy Sosa', 'Ken Griffey' ) +yaml: | + hr: # 1998 hr ranking + - Mark McGwire + - Sammy Sosa + rbi: + # 1998 rbi ranking + - Sammy Sosa + - Ken Griffey +php: | + array( + 'hr' => array( 'Mark McGwire', 'Sammy Sosa' ), + 'rbi' => array( 'Sammy Sosa', 'Ken Griffey' ) ) ---- -test: Node for Sammy Sosa appears twice in this document -spec: 2.10 -yaml: | +--- +test: Node for Sammy Sosa appears twice in this document +spec: 2.10 +yaml: | --- - hr: - - Mark McGwire - # Following node labeled SS - - &SS Sammy Sosa - rbi: - - *SS # Subsequent occurance - - Ken Griffey -php: | + hr: + - Mark McGwire + # Following node labeled SS + - &SS Sammy Sosa + rbi: + - *SS # Subsequent occurance + - Ken Griffey +php: | array( 'hr' => array('Mark McGwire', 'Sammy Sosa'), 'rbi' => array('Sammy Sosa', 'Ken Griffey') ) ---- -test: Mapping between sequences +--- +test: Mapping between sequences todo: true spec: 2.11 -yaml: | - ? # PLAY SCHEDULE - - Detroit Tigers - - Chicago Cubs - : - - 2001-07-23 - - ? [ New York Yankees, - Atlanta Braves ] - : [ 2001-07-02, 2001-08-12, - 2001-08-14 ] -ruby: | - { - [ 'Detroit Tigers', 'Chicago Cubs' ] => [ Date.new( 2001, 7, 23 ) ], - [ 'New York Yankees', 'Atlanta Braves' ] => [ Date.new( 2001, 7, 2 ), Date.new( 2001, 8, 12 ), Date.new( 2001, 8, 14 ) ] - } +yaml: | + ? # PLAY SCHEDULE + - Detroit Tigers + - Chicago Cubs + : + - 2001-07-23 + + ? [ New York Yankees, + Atlanta Braves ] + : [ 2001-07-02, 2001-08-12, + 2001-08-14 ] +ruby: | + { + [ 'Detroit Tigers', 'Chicago Cubs' ] => [ Date.new( 2001, 7, 23 ) ], + [ 'New York Yankees', 'Atlanta Braves' ] => [ Date.new( 2001, 7, 2 ), Date.new( 2001, 8, 12 ), Date.new( 2001, 8, 14 ) ] + } syck: | struct test_node seq1[] = { { T_STR, 0, "New York Yankees" }, @@ -283,11 +283,11 @@ syck: | { T_MAP, 0, 0, map }, end_node }; - ---- -test: Sequence key shortcut + +--- +test: Sequence key shortcut spec: 2.12 -yaml: | +yaml: | --- # products purchased - item : Super Hoop @@ -296,7 +296,7 @@ yaml: | quantity: 4 - item : Big Shoes quantity: 1 -php: | +php: | array ( array ( 'item' => 'Super Hoop', @@ -311,25 +311,25 @@ php: | 'quantity' => 1, ) ) -perl: | - [ - { item => 'Super Hoop', quantity => 1 }, - { item => 'Basketball', quantity => 4 }, - { item => 'Big Shoes', quantity => 1 } - ] - -ruby: | - [ - { 'item' => 'Super Hoop', 'quantity' => 1 }, - { 'item' => 'Basketball', 'quantity' => 4 }, - { 'item' => 'Big Shoes', 'quantity' => 1 } - ] -python: | - [ - { 'item': 'Super Hoop', 'quantity': 1 }, - { 'item': 'Basketball', 'quantity': 4 }, - { 'item': 'Big Shoes', 'quantity': 1 } - ] +perl: | + [ + { item => 'Super Hoop', quantity => 1 }, + { item => 'Basketball', quantity => 4 }, + { item => 'Big Shoes', quantity => 1 } + ] + +ruby: | + [ + { 'item' => 'Super Hoop', 'quantity' => 1 }, + { 'item' => 'Basketball', 'quantity' => 4 }, + { 'item' => 'Big Shoes', 'quantity' => 1 } + ] +python: | + [ + { 'item': 'Super Hoop', 'quantity': 1 }, + { 'item': 'Basketball', 'quantity': 4 }, + { 'item': 'Big Shoes', 'quantity': 1 } + ] syck: | struct test_node map1[] = { { T_STR, 0, "item" }, @@ -362,196 +362,196 @@ syck: | { T_SEQ, 0, 0, seq }, end_node }; - - ---- -test: Literal perserves newlines + + +--- +test: Literal perserves newlines todo: true spec: 2.13 -yaml: | +yaml: | # ASCII Art - --- | + --- | \//||\/|| // || ||_ -perl: | - "\\//||\\/||\n// || ||_\n" -ruby: | - "\\//||\\/||\n// || ||_\n" -python: | - [ - flushLeft( - """ +perl: | + "\\//||\\/||\n// || ||_\n" +ruby: | + "\\//||\\/||\n// || ||_\n" +python: | + [ + flushLeft( + """ \//||\/|| // || ||_ - """ - ) - ] + """ + ) + ] syck: | struct test_node stream[] = { { T_STR, 0, "\\//||\\/||\n// || ||_\n" }, end_node }; - ---- -test: Folded treats newlines as a space + +--- +test: Folded treats newlines as a space todo: true spec: 2.14 -yaml: | +yaml: | --- Mark McGwire's year was crippled by a knee injury. -perl: | - "Mark McGwire's year was crippled by a knee injury." -ruby: | +perl: | "Mark McGwire's year was crippled by a knee injury." -python: | - [ "Mark McGwire's year was crippled by a knee injury." ] +ruby: | + "Mark McGwire's year was crippled by a knee injury." +python: | + [ "Mark McGwire's year was crippled by a knee injury." ] syck: | struct test_node stream[] = { { T_STR, 0, "Mark McGwire's year was crippled by a knee injury." }, end_node }; - ---- -test: Newlines preserved for indented and blank lines + +--- +test: Newlines preserved for indented and blank lines todo: true spec: 2.15 -yaml: | - --- > +yaml: | + --- > Sammy Sosa completed another fine season with great stats. - + 63 Home Runs 0.288 Batting Average - + What a year! -perl: | - "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n" -ruby: | - "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n" -python: | - [ - flushLeft( - """ - Sammy Sosa completed another fine season with great stats. - - 63 Home Runs - 0.288 Batting Average - - What a year! - """ - ) - ] +perl: | + "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n" +ruby: | + "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n" +python: | + [ + flushLeft( + """ + Sammy Sosa completed another fine season with great stats. + + 63 Home Runs + 0.288 Batting Average + + What a year! + """ + ) + ] syck: | struct test_node stream[] = { { T_STR, 0, "Sammy Sosa completed another fine season with great stats.\n\n 63 Home Runs\n 0.288 Batting Average\n\nWhat a year!\n" }, end_node }; - - ---- -test: Indentation determines scope + + +--- +test: Indentation determines scope spec: 2.16 -yaml: | - name: Mark McGwire - accomplishment: > +yaml: | + name: Mark McGwire + accomplishment: > Mark set a major league home run record in 1998. - stats: | + stats: | 65 Home Runs 0.278 Batting Average -php: | - array( - 'name' => 'Mark McGwire', - 'accomplishment' => "Mark set a major league home run record in 1998.\n", - 'stats' => "65 Home Runs\n0.278 Batting Average\n" - ) ---- -test: Quoted scalars +php: | + array( + 'name' => 'Mark McGwire', + 'accomplishment' => "Mark set a major league home run record in 1998.\n", + 'stats' => "65 Home Runs\n0.278 Batting Average\n" + ) +--- +test: Quoted scalars todo: true spec: 2.17 -yaml: | - unicode: "Sosa did fine.\u263A" - control: "\b1998\t1999\t2000\n" - hexesc: "\x0D\x0A is \r\n" +yaml: | + unicode: "Sosa did fine.\u263A" + control: "\b1998\t1999\t2000\n" + hexesc: "\x0D\x0A is \r\n" - single: '"Howdy!" he cried.' - quoted: ' # not a ''comment''.' - tie-fighter: '|\-*-/|' -ruby: | - { - "tie-fighter" => "|\\-*-/|", - "control"=>"\0101998\t1999\t2000\n", - "unicode"=>"Sosa did fine." + ["263A".hex ].pack('U*'), - "quoted"=>" # not a 'comment'.", - "single"=>"\"Howdy!\" he cried.", - "hexesc"=>"\r\n is \r\n" - } ---- -test: Multiline flow scalars + single: '"Howdy!" he cried.' + quoted: ' # not a ''comment''.' + tie-fighter: '|\-*-/|' +ruby: | + { + "tie-fighter" => "|\\-*-/|", + "control"=>"\0101998\t1999\t2000\n", + "unicode"=>"Sosa did fine." + ["263A".hex ].pack('U*'), + "quoted"=>" # not a 'comment'.", + "single"=>"\"Howdy!\" he cried.", + "hexesc"=>"\r\n is \r\n" + } +--- +test: Multiline flow scalars todo: true -spec: 2.18 +spec: 2.18 yaml: | plain: This unquoted scalar spans many lines. - + quoted: "So does this quoted scalar.\n" -ruby: | - { - 'plain' => 'This unquoted scalar spans many lines.', - 'quoted' => "So does this quoted scalar.\n" - } ---- -test: Integers +ruby: | + { + 'plain' => 'This unquoted scalar spans many lines.', + 'quoted' => "So does this quoted scalar.\n" + } +--- +test: Integers spec: 2.19 -yaml: | - canonical: 12345 - decimal: +12,345 - octal: 014 - hexadecimal: 0xC -php: | - array( - 'canonical' => 12345, - 'decimal' => 12345, - 'octal' => 014, +yaml: | + canonical: 12345 + decimal: +12,345 + octal: 014 + hexadecimal: 0xC +php: | + array( + 'canonical' => 12345, + 'decimal' => 12345, + 'octal' => 014, 'hexadecimal' => 0xC ) ---- +--- # FIX: spec shows parens around -inf and NaN -test: Floating point +test: Floating point spec: 2.20 -yaml: | - canonical: 1.23015e+3 - exponential: 12.3015e+02 - fixed: 1,230.15 +yaml: | + canonical: 1.23015e+3 + exponential: 12.3015e+02 + fixed: 1,230.15 negative infinity: -.inf - not a number: .NaN -php: | - array( - 'canonical' => 1230.15, - 'exponential' => 1230.15, - 'fixed' => 1230.15, - 'negative infinity' => log(0), - 'not a number' => -log(0), + not a number: .NaN +php: | + array( + 'canonical' => 1230.15, + 'exponential' => 1230.15, + 'fixed' => 1230.15, + 'negative infinity' => log(0), + 'not a number' => -log(0), ) ---- -test: Miscellaneous +--- +test: Miscellaneous spec: 2.21 -yaml: | - null: ~ +yaml: | + null: ~ true: y - false: n - string: '12345' -php: | - array( - '' => null, - 1 => true, - 0 => false, - 'string' => '12345' - ) + false: n + string: '12345' +php: | + array( + '' => null, + 1 => true, + 0 => false, + 'string' => '12345' + ) --- test: Timestamps todo: true @@ -734,12 +734,12 @@ yaml: | postal : 48046 ship-to: *id001 product: - - + - sku : BL394D quantity : 4 description : Basketball price : 450.00 - - + - sku : BL4438H quantity : 1 description : Super Hoop @@ -753,9 +753,9 @@ yaml: | php: | array( 'invoice' => 34843, 'date' => mktime(0, 0, 0, 1, 23, 2001), - 'bill-to' => + 'bill-to' => array( 'given' => 'Chris', 'family' => 'Dumars', 'address' => array( 'lines' => "458 Walkman Dr.\nSuite #292\n", 'city' => 'Royal Oak', 'state' => 'MI', 'postal' => 48046 ) ) - , 'ship-to' => + , 'ship-to' => array( 'given' => 'Chris', 'family' => 'Dumars', 'address' => array( 'lines' => "458 Walkman Dr.\nSuite #292\n", 'city' => 'Royal Oak', 'state' => 'MI', 'postal' => 48046 ) ) , 'product' => array( @@ -798,270 +798,270 @@ yaml: | foo = bar ruby: | y = YAML::Stream.new - y.add( { 'Time' => YAML::mktime( 2001, 11, 23, 15, 01, 42, 00, "-05:00" ), - 'User' => 'ed', 'Warning' => "This is an error message for the log file\n" } ) - y.add( { 'Time' => YAML::mktime( 2001, 11, 23, 15, 02, 31, 00, "-05:00" ), - 'User' => 'ed', 'Warning' => "A slightly different error message.\n" } ) - y.add( { 'Date' => YAML::mktime( 2001, 11, 23, 15, 03, 17, 00, "-05:00" ), - 'User' => 'ed', 'Fatal' => "Unknown variable \"bar\"\n", - 'Stack' => [ - { 'file' => 'TopClass.py', 'line' => 23, 'code' => "x = MoreObject(\"345\\n\")\n" }, - { 'file' => 'MoreClass.py', 'line' => 58, 'code' => "foo = bar" } ] } ) -documents: 3 - ---- -test: Throwaway comments -yaml: | - ### These are four throwaway comment ### - - ### lines (the second line is empty). ### + y.add( { 'Time' => YAML::mktime( 2001, 11, 23, 15, 01, 42, 00, "-05:00" ), + 'User' => 'ed', 'Warning' => "This is an error message for the log file\n" } ) + y.add( { 'Time' => YAML::mktime( 2001, 11, 23, 15, 02, 31, 00, "-05:00" ), + 'User' => 'ed', 'Warning' => "A slightly different error message.\n" } ) + y.add( { 'Date' => YAML::mktime( 2001, 11, 23, 15, 03, 17, 00, "-05:00" ), + 'User' => 'ed', 'Fatal' => "Unknown variable \"bar\"\n", + 'Stack' => [ + { 'file' => 'TopClass.py', 'line' => 23, 'code' => "x = MoreObject(\"345\\n\")\n" }, + { 'file' => 'MoreClass.py', 'line' => 58, 'code' => "foo = bar" } ] } ) +documents: 3 + +--- +test: Throwaway comments +yaml: | + ### These are four throwaway comment ### + + ### lines (the second line is empty). ### this: | # Comments may trail lines. contains three lines of text. The third one starts with a # character. This isn't a comment. - + # These are three throwaway comment # lines (the first line is empty). -php: | - array( - 'this' => "contains three lines of text.\nThe third one starts with a\n# character. This isn't a comment.\n" +php: | + array( + 'this' => "contains three lines of text.\nThe third one starts with a\n# character. This isn't a comment.\n" ) ---- -test: Document with a single value +--- +test: Document with a single value todo: true -yaml: | - --- > +yaml: | + --- > This YAML stream contains a single text value. The next stream is a log file - a sequence of log entries. Adding an entry to the log is a simple matter of appending it at the end. -ruby: | - "This YAML stream contains a single text value. The next stream is a log file - a sequence of log entries. Adding an entry to the log is a simple matter of appending it at the end.\n" ---- -test: Document stream +ruby: | + "This YAML stream contains a single text value. The next stream is a log file - a sequence of log entries. Adding an entry to the log is a simple matter of appending it at the end.\n" +--- +test: Document stream todo: true -yaml: | - --- - at: 2001-08-12 09:25:00.00 Z - type: GET - HTTP: '1.0' - url: '/index.html' - --- - at: 2001-08-12 09:25:10.00 Z - type: GET - HTTP: '1.0' - url: '/toc.html' -ruby: | - y = YAML::Stream.new - y.add( { - 'at' => Time::utc( 2001, 8, 12, 9, 25, 00 ), - 'type' => 'GET', - 'HTTP' => '1.0', - 'url' => '/index.html' - } ) - y.add( { - 'at' => Time::utc( 2001, 8, 12, 9, 25, 10 ), - 'type' => 'GET', - 'HTTP' => '1.0', - 'url' => '/toc.html' - } ) -documents: 2 - ---- -test: Top level mapping -yaml: | - # This stream is an example of a top-level mapping. - invoice : 34843 - date : 2001-01-23 - total : 4443.52 -php: | - array( +yaml: | + --- + at: 2001-08-12 09:25:00.00 Z + type: GET + HTTP: '1.0' + url: '/index.html' + --- + at: 2001-08-12 09:25:10.00 Z + type: GET + HTTP: '1.0' + url: '/toc.html' +ruby: | + y = YAML::Stream.new + y.add( { + 'at' => Time::utc( 2001, 8, 12, 9, 25, 00 ), + 'type' => 'GET', + 'HTTP' => '1.0', + 'url' => '/index.html' + } ) + y.add( { + 'at' => Time::utc( 2001, 8, 12, 9, 25, 10 ), + 'type' => 'GET', + 'HTTP' => '1.0', + 'url' => '/toc.html' + } ) +documents: 2 + +--- +test: Top level mapping +yaml: | + # This stream is an example of a top-level mapping. + invoice : 34843 + date : 2001-01-23 + total : 4443.52 +php: | + array( 'invoice' => 34843, - 'date' => mktime(0, 0, 0, 1, 23, 2001), - 'total' => 4443.52 + 'date' => mktime(0, 0, 0, 1, 23, 2001), + 'total' => 4443.52 ) ---- -test: Single-line documents +--- +test: Single-line documents todo: true -yaml: | - # The following is a sequence of three documents. - # The first contains an empty mapping, the second - # an empty sequence, and the last an empty string. - --- {} - --- [ ] - --- '' -ruby: | - y = YAML::Stream.new - y.add( {} ) - y.add( [] ) - y.add( '' ) -documents: 3 - ---- -test: Document with pause +yaml: | + # The following is a sequence of three documents. + # The first contains an empty mapping, the second + # an empty sequence, and the last an empty string. + --- {} + --- [ ] + --- '' +ruby: | + y = YAML::Stream.new + y.add( {} ) + y.add( [] ) + y.add( '' ) +documents: 3 + +--- +test: Document with pause todo: true -yaml: | - # A communication channel based on a YAML stream. - --- - sent at: 2002-06-06 11:46:25.10 Z - payload: Whatever - # Receiver can process this as soon as the following is sent: - ... - # Even if the next message is sent long after: - --- - sent at: 2002-06-06 12:05:53.47 Z - payload: Whatever - ... -ruby: | - y = YAML::Stream.new - y.add( - { 'sent at' => YAML::mktime( 2002, 6, 6, 11, 46, 25, 0.10 ), - 'payload' => 'Whatever' } - ) - y.add( - { "payload" => "Whatever", "sent at" => YAML::mktime( 2002, 6, 6, 12, 5, 53, 0.47 ) } - ) -documents: 2 - ---- -test: Explicit typing -yaml: | - integer: 12 - also int: ! "12" - string: !str 12 -php: | +yaml: | + # A communication channel based on a YAML stream. + --- + sent at: 2002-06-06 11:46:25.10 Z + payload: Whatever + # Receiver can process this as soon as the following is sent: + ... + # Even if the next message is sent long after: + --- + sent at: 2002-06-06 12:05:53.47 Z + payload: Whatever + ... +ruby: | + y = YAML::Stream.new + y.add( + { 'sent at' => YAML::mktime( 2002, 6, 6, 11, 46, 25, 0.10 ), + 'payload' => 'Whatever' } + ) + y.add( + { "payload" => "Whatever", "sent at" => YAML::mktime( 2002, 6, 6, 12, 5, 53, 0.47 ) } + ) +documents: 2 + +--- +test: Explicit typing +yaml: | + integer: 12 + also int: ! "12" + string: !str 12 +php: | array( 'integer' => 12, 'also int' => 12, 'string' => '12' ) ---- -test: Private types +--- +test: Private types todo: true -yaml: | - # Both examples below make use of the 'x-private:ball' - # type family URI, but with different semantics. - --- - pool: !!ball - number: 8 - color: black - --- - bearing: !!ball - material: steel -ruby: | - y = YAML::Stream.new - y.add( { 'pool' => - YAML::PrivateType.new( 'ball', - { 'number' => 8, 'color' => 'black' } ) } - ) - y.add( { 'bearing' => - YAML::PrivateType.new( 'ball', - { 'material' => 'steel' } ) } - ) -documents: 2 - ---- -test: Type family under yaml.org -yaml: | - # The URI is 'tag:yaml.org,2002:str' - - !str a Unicode string -php: | +yaml: | + # Both examples below make use of the 'x-private:ball' + # type family URI, but with different semantics. + --- + pool: !!ball + number: 8 + color: black + --- + bearing: !!ball + material: steel +ruby: | + y = YAML::Stream.new + y.add( { 'pool' => + YAML::PrivateType.new( 'ball', + { 'number' => 8, 'color' => 'black' } ) } + ) + y.add( { 'bearing' => + YAML::PrivateType.new( 'ball', + { 'material' => 'steel' } ) } + ) +documents: 2 + +--- +test: Type family under yaml.org +yaml: | + # The URI is 'tag:yaml.org,2002:str' + - !str a Unicode string +php: | array( 'a Unicode string' ) ---- -test: Type family under perl.yaml.org +--- +test: Type family under perl.yaml.org todo: true -yaml: | - # The URI is 'tag:perl.yaml.org,2002:Text::Tabs' - - !perl/Text::Tabs {} -ruby: | +yaml: | + # The URI is 'tag:perl.yaml.org,2002:Text::Tabs' + - !perl/Text::Tabs {} +ruby: | [ YAML::DomainType.new( 'perl.yaml.org,2002', 'Text::Tabs', {} ) ] ---- -test: Type family under clarkevans.com +--- +test: Type family under clarkevans.com todo: true -yaml: | - # The URI is 'tag:clarkevans.com,2003-02:timesheet' +yaml: | + # The URI is 'tag:clarkevans.com,2003-02:timesheet' - !clarkevans.com,2003-02/timesheet {} -ruby: | +ruby: | [ YAML::DomainType.new( 'clarkevans.com,2003-02', 'timesheet', {} ) ] ---- -test: URI Escaping +--- +test: URI Escaping todo: true -yaml: | - same: +yaml: | + same: - !domain.tld,2002/type\x30 value - !domain.tld,2002/type0 value - different: # As far as the YAML parser is concerned + different: # As far as the YAML parser is concerned - !domain.tld,2002/type%30 value - !domain.tld,2002/type0 value -ruby-setup: | - YAML.add_domain_type( "domain.tld,2002", "type0" ) { |type, val| - "ONE: #{val}" - } - YAML.add_domain_type( "domain.tld,2002", "type%30" ) { |type, val| - "TWO: #{val}" - } -ruby: | - { 'same' => [ 'ONE: value', 'ONE: value' ], 'different' => [ 'TWO: value', 'ONE: value' ] } ---- -test: URI Prefixing +ruby-setup: | + YAML.add_domain_type( "domain.tld,2002", "type0" ) { |type, val| + "ONE: #{val}" + } + YAML.add_domain_type( "domain.tld,2002", "type%30" ) { |type, val| + "TWO: #{val}" + } +ruby: | + { 'same' => [ 'ONE: value', 'ONE: value' ], 'different' => [ 'TWO: value', 'ONE: value' ] } +--- +test: URI Prefixing todo: true -yaml: | - # 'tag:domain.tld,2002:invoice' is some type family. - invoice: !domain.tld,2002/^invoice - # 'seq' is shorthand for 'tag:yaml.org,2002:seq'. - # This does not effect '^customer' below - # because it is does not specify a prefix. - customers: !seq - # '^customer' is shorthand for the full - # notation 'tag:domain.tld,2002:customer'. - - !^customer - given : Chris - family : Dumars -ruby-setup: | - YAML.add_domain_type( "domain.tld,2002", /(invoice|customer)/ ) { |type, val| - if val.is_a? ::Hash +yaml: | + # 'tag:domain.tld,2002:invoice' is some type family. + invoice: !domain.tld,2002/^invoice + # 'seq' is shorthand for 'tag:yaml.org,2002:seq'. + # This does not effect '^customer' below + # because it is does not specify a prefix. + customers: !seq + # '^customer' is shorthand for the full + # notation 'tag:domain.tld,2002:customer'. + - !^customer + given : Chris + family : Dumars +ruby-setup: | + YAML.add_domain_type( "domain.tld,2002", /(invoice|customer)/ ) { |type, val| + if val.is_a? ::Hash scheme, domain, type = type.split( /:/, 3 ) - val['type'] = "domain #{type}" - val - else - raise YAML::Error, "Not a Hash in domain.tld/invoice: " + val.inspect - end - } -ruby: | - { "invoice"=> { "customers"=> [ { "given"=>"Chris", "type"=>"domain customer", "family"=>"Dumars" } ], "type"=>"domain invoice" } } - ---- -test: Overriding anchors -yaml: | - anchor : &A001 This scalar has an anchor. + val['type'] = "domain #{type}" + val + else + raise YAML::Error, "Not a Hash in domain.tld/invoice: " + val.inspect + end + } +ruby: | + { "invoice"=> { "customers"=> [ { "given"=>"Chris", "type"=>"domain customer", "family"=>"Dumars" } ], "type"=>"domain invoice" } } + +--- +test: Overriding anchors +yaml: | + anchor : &A001 This scalar has an anchor. override : &A001 > The alias node below is a repeated use of this value. alias : *A001 -php: | +php: | array( 'anchor' => 'This scalar has an anchor.', 'override' => "The alias node below is a repeated use of this value.\n", 'alias' => "The alias node below is a repeated use of this value.\n" ) ---- -test: Flow and block formatting -todo: true -yaml: | - empty: [] - flow: [ one, two, three # May span lines, - , four, # indentation is - five ] # mostly ignored. - block: - - First item in top sequence - - - - Subordinate sequence entry - - > - A folded sequence entry - - Sixth item in top sequence -ruby: | - { 'empty' => [], 'flow' => [ 'one', 'two', 'three', 'four', 'five' ], - 'block' => [ 'First item in top sequence', [ 'Subordinate sequence entry' ], - "A folded sequence entry\n", 'Sixth item in top sequence' ] } ---- -test: Complete mapping test +--- +test: Flow and block formatting todo: true yaml: | - empty: {} + empty: [] + flow: [ one, two, three # May span lines, + , four, # indentation is + five ] # mostly ignored. + block: + - First item in top sequence + - + - Subordinate sequence entry + - > + A folded sequence entry + - Sixth item in top sequence +ruby: | + { 'empty' => [], 'flow' => [ 'one', 'two', 'three', 'four', 'five' ], + 'block' => [ 'First item in top sequence', [ 'Subordinate sequence entry' ], + "A folded sequence entry\n", 'Sixth item in top sequence' ] } +--- +test: Complete mapping test +todo: true +yaml: | + empty: {} flow: { one: 1, two: 2 } spanning: { one: 1, two: 2 } @@ -1103,156 +1103,156 @@ yaml: | : with a: mapping value. ruby: | - { 'empty' => {}, 'flow' => { 'one' => 1, 'two' => 2 }, - 'spanning' => { 'one' => 1, 'two' => 2 }, - 'block' => { 'first' => 'First entry', 'second' => - { 'key' => 'Subordinate mapping' }, 'third' => - [ 'Subordinate sequence', {}, 'Previous mapping is empty.', - { 'A key' => 'value pair in a sequence.', 'A second' => 'key:value pair.' }, - 'The previous entry is equal to the following one.', - { 'A key' => 'value pair in a sequence.', 'A second' => 'key:value pair.' } ], - 12.0 => 'This key is a float.', "?\n" => 'This key had to be protected.', - "\a" => 'This key had to be escaped.', - "This is a multi-line folded key\n" => "Whose value is also multi-line.", - 'this also works as a key' => 'with a value at the next line.', - [ 'This key', 'is a sequence' ] => [ 'With a sequence value.' ] } } - # Couldn't recreate map exactly, so we'll do a detailed check to be sure it's entact - obj_y['block'].keys.each { |k| + { 'empty' => {}, 'flow' => { 'one' => 1, 'two' => 2 }, + 'spanning' => { 'one' => 1, 'two' => 2 }, + 'block' => { 'first' => 'First entry', 'second' => + { 'key' => 'Subordinate mapping' }, 'third' => + [ 'Subordinate sequence', {}, 'Previous mapping is empty.', + { 'A key' => 'value pair in a sequence.', 'A second' => 'key:value pair.' }, + 'The previous entry is equal to the following one.', + { 'A key' => 'value pair in a sequence.', 'A second' => 'key:value pair.' } ], + 12.0 => 'This key is a float.', "?\n" => 'This key had to be protected.', + "\a" => 'This key had to be escaped.', + "This is a multi-line folded key\n" => "Whose value is also multi-line.", + 'this also works as a key' => 'with a value at the next line.', + [ 'This key', 'is a sequence' ] => [ 'With a sequence value.' ] } } + # Couldn't recreate map exactly, so we'll do a detailed check to be sure it's entact + obj_y['block'].keys.each { |k| if Hash === k - v = obj_y['block'][k] - if k['This'] == 'key' and k['is a'] == 'mapping' and v['with a'] == 'mapping value.' - obj_r['block'][k] = v - end - end - } ---- + v = obj_y['block'][k] + if k['This'] == 'key' and k['is a'] == 'mapping' and v['with a'] == 'mapping value.' + obj_r['block'][k] = v + end + end + } +--- test: Literal explicit indentation yaml: | - # Explicit indentation must - # be given in all the three - # following cases. + # Explicit indentation must + # be given in all the three + # following cases. leading spaces: |2 This value starts with four spaces. - + leading line break: |2 - + This value starts with a line break. - + leading comment indicator: |2 # first line starts with a # character. - + # Explicit indentation may # also be given when it is # not required. redundant: |2 This value is indented 2 spaces. php: | - array( - 'leading spaces' => " This value starts with four spaces.\n", - 'leading line break' => "\nThis value starts with a line break.\n", - 'leading comment indicator' => "# first line starts with a\n# character.\n", - 'redundant' => "This value is indented 2 spaces.\n" + array( + 'leading spaces' => " This value starts with four spaces.\n", + 'leading line break' => "\nThis value starts with a line break.\n", + 'leading comment indicator' => "# first line starts with a\n# character.\n", + 'redundant' => "This value is indented 2 spaces.\n" ) --- test: Chomping and keep modifiers yaml: | clipped: | This has one newline. - + same as "clipped" above: "This has one newline.\n" - + stripped: |- This has no newline. - + same as "stripped" above: "This has no newline." - + kept: |+ This has two newlines. - + same as "kept" above: "This has two newlines.\n\n" -php: | - array( - 'clipped' => "This has one newline.\n", - 'same as "clipped" above' => "This has one newline.\n", - 'stripped' => 'This has no newline.', - 'same as "stripped" above' => 'This has no newline.', - 'kept' => "This has two newlines.\n\n", - 'same as "kept" above' => "This has two newlines.\n\n" +php: | + array( + 'clipped' => "This has one newline.\n", + 'same as "clipped" above' => "This has one newline.\n", + 'stripped' => 'This has no newline.', + 'same as "stripped" above' => 'This has no newline.', + 'kept' => "This has two newlines.\n\n", + 'same as "kept" above' => "This has two newlines.\n\n" ) ---- -test: Literal combinations +--- +test: Literal combinations todo: true -yaml: | +yaml: | empty: | - + literal: | The \ ' " characters may be freely used. Leading white space is significant. - + Line breaks are significant. Thus this value contains one empty line and ends with a single line break, but does not start with one. - + is equal to: "The \\ ' \" characters may \ be\nfreely used. Leading white\n space \ is significant.\n\nLine breaks are \ significant.\nThus this value contains \ one\nempty line and ends with a\nsingle \ line break, but does\nnot start with one.\n" - - # Comments may follow a block - # scalar value. They must be - # less indented. - + + # Comments may follow a block + # scalar value. They must be + # less indented. + # Modifiers may be combined in any order. indented and chomped: |2- This has no newline. - + also written as: |-2 This has no newline. - + both are equal to: " This has no newline." -php: | - array( - 'empty' => '', - 'literal' => "The \\ ' \" characters may be\nfreely used. Leading white\n space " + - "is significant.\n\nLine breaks are significant.\nThus this value contains one\n" + - "empty line and ends with a\nsingle line break, but does\nnot start with one.\n", - 'is equal to' => "The \\ ' \" characters may be\nfreely used. Leading white\n space " + - "is significant.\n\nLine breaks are significant.\nThus this value contains one\n" + - "empty line and ends with a\nsingle line break, but does\nnot start with one.\n", - 'indented and chomped' => ' This has no newline.', - 'also written as' => ' This has no newline.', - 'both are equal to' => ' This has no newline.' +php: | + array( + 'empty' => '', + 'literal' => "The \\ ' \" characters may be\nfreely used. Leading white\n space " + + "is significant.\n\nLine breaks are significant.\nThus this value contains one\n" + + "empty line and ends with a\nsingle line break, but does\nnot start with one.\n", + 'is equal to' => "The \\ ' \" characters may be\nfreely used. Leading white\n space " + + "is significant.\n\nLine breaks are significant.\nThus this value contains one\n" + + "empty line and ends with a\nsingle line break, but does\nnot start with one.\n", + 'indented and chomped' => ' This has no newline.', + 'also written as' => ' This has no newline.', + 'both are equal to' => ' This has no newline.' ) ---- -test: Folded combinations +--- +test: Folded combinations todo: true -yaml: | - empty: > - - one paragraph: > +yaml: | + empty: > + + one paragraph: > Line feeds are converted to spaces, so this value contains no line breaks except for the final one. - - multiple paragraphs: >2 - + + multiple paragraphs: >2 + An empty line, either at the start or in the value: - + Is interpreted as a line break. Thus this value contains three line breaks. - - indented text: > + + indented text: > This is a folded paragraph followed by a list: @@ -1261,64 +1261,64 @@ yaml: | Followed by another folded paragraph, another list: - + * first entry - + * second entry - + And a final folded paragraph. - - above is equal to: | + + above is equal to: | This is a folded paragraph followed by a list: * first entry * second entry Followed by another folded paragraph, another list: - + * first entry - + * second entry - + And a final folded paragraph. - - # Explicit comments may follow - # but must be less indented. -php: | - array( - 'empty' => '', + + # Explicit comments may follow + # but must be less indented. +php: | + array( + 'empty' => '', 'one paragraph' => 'Line feeds are converted to spaces, so this value'. - " contains no line breaks except for the final one.\n", + " contains no line breaks except for the final one.\n", 'multiple paragraphs' => "\nAn empty line, either at the start or in the value:\n". - "Is interpreted as a line break. Thus this value contains three line breaks.\n", + "Is interpreted as a line break. Thus this value contains three line breaks.\n", 'indented text' => "This is a folded paragraph followed by a list:\n". " * first entry\n * second entry\nFollowed by another folded paragraph, ". - "another list:\n\n * first entry\n\n * second entry\n\nAnd a final folded paragraph.\n", + "another list:\n\n * first entry\n\n * second entry\n\nAnd a final folded paragraph.\n", 'above is equal to' => "This is a folded paragraph followed by a list:\n". " * first entry\n * second entry\nFollowed by another folded paragraph, ". - "another list:\n\n * first entry\n\n * second entry\n\nAnd a final folded paragraph.\n" + "another list:\n\n * first entry\n\n * second entry\n\nAnd a final folded paragraph.\n" ) ---- -test: Single quotes +--- +test: Single quotes todo: true -yaml: | +yaml: | empty: '' second: '! : \ etc. can be used freely.' third: 'a single quote '' must be escaped.' span: 'this contains six spaces - + and one line break' - is same as: "this contains six spaces\nand one line break" -php: | - array( - 'empty' => '', - 'second' => '! : \\ etc. can be used freely.', - 'third' => "a single quote ' must be escaped.", - 'span' => "this contains six spaces\nand one line break", - 'is same as' => "this contains six spaces\nand one line break" + is same as: "this contains six spaces\nand one line break" +php: | + array( + 'empty' => '', + 'second' => '! : \\ etc. can be used freely.', + 'third' => "a single quote ' must be escaped.", + 'span' => "this contains six spaces\nand one line break", + 'is same as' => "this contains six spaces\nand one line break" ) ---- +--- test: Double quotes todo: true yaml: | @@ -1328,30 +1328,30 @@ yaml: | fourth: "this value ends with an LF.\n" span: "this contains four \ - spaces" + spaces" is equal to: "this contains four spaces" -php: | - array( - 'empty' => '', - 'second' => '! : etc. can be used freely.', - 'third' => 'a " or a \\ must be escaped.', - 'fourth' => "this value ends with an LF.\n", - 'span' => "this contains four spaces", - 'is equal to' => "this contains four spaces" +php: | + array( + 'empty' => '', + 'second' => '! : etc. can be used freely.', + 'third' => 'a " or a \\ must be escaped.', + 'fourth' => "this value ends with an LF.\n", + 'span' => "this contains four spaces", + 'is equal to' => "this contains four spaces" ) ---- -test: Unquoted strings +--- +test: Unquoted strings todo: true -yaml: | +yaml: | first: There is no unquoted empty string. - - second: 12 ## This is an integer. - third: !str 12 ## This is a string. + second: 12 ## This is an integer. + + third: !str 12 ## This is a string. span: this contains six spaces - + and one line break @@ -1364,58 +1364,58 @@ yaml: | like this ] - note: { one-line keys: but multi-line values } + note: { one-line keys: but multi-line values } -php: | - array( - 'first' => 'There is no unquoted empty string.', - 'second' => 12, - 'third' => '12', - 'span' => "this contains six spaces\nand one line break", - 'indicators' => "this has no comments. #:foo and bar# are both text.", - 'flow' => [ 'can span lines', 'like this' ], - 'note' => { 'one-line keys' => 'but multi-line values' } +php: | + array( + 'first' => 'There is no unquoted empty string.', + 'second' => 12, + 'third' => '12', + 'span' => "this contains six spaces\nand one line break", + 'indicators' => "this has no comments. #:foo and bar# are both text.", + 'flow' => [ 'can span lines', 'like this' ], + 'note' => { 'one-line keys' => 'but multi-line values' } ) ---- -test: Spanning sequences +--- +test: Spanning sequences todo: true -yaml: | - # The following are equal seqs - # with different identities. - flow: [ one, two ] - spanning: [ one, - two ] - block: - - one - - two -php: | - array( - 'flow' => [ 'one', 'two' ], - 'spanning' => [ 'one', 'two' ], - 'block' => [ 'one', 'two' ] +yaml: | + # The following are equal seqs + # with different identities. + flow: [ one, two ] + spanning: [ one, + two ] + block: + - one + - two +php: | + array( + 'flow' => [ 'one', 'two' ], + 'spanning' => [ 'one', 'two' ], + 'block' => [ 'one', 'two' ] ) ---- -test: Flow mappings -yaml: | - # The following are equal maps - # with different identities. - flow: { one: 1, two: 2 } - block: - one: 1 - two: 2 -php: | - array( - 'flow' => array( 'one' => 1, 'two' => 2 ), +--- +test: Flow mappings +yaml: | + # The following are equal maps + # with different identities. + flow: { one: 1, two: 2 } + block: + one: 1 + two: 2 +php: | + array( + 'flow' => array( 'one' => 1, 'two' => 2 ), 'block' => array( 'one' => 1, 'two' => 2 ) ) --- test: Representations of 12 todo: true yaml: | - - 12 # An integer - # The following scalars - # are loaded to the - # string value '1' '2'. + - 12 # An integer + # The following scalars + # are loaded to the + # string value '1' '2'. - !str 12 - '12' - "12" @@ -1438,8 +1438,8 @@ yaml: | english: null - # This sequence has five - # entries, two with values. + # This sequence has five + # entries, two with values. sparse: - ~ - 2nd entry @@ -1452,11 +1452,11 @@ yaml: | php: | array ( - 'canonical' => null, - 'english' => null, - 'sparse' => array( null, '2nd entry', null, '4th entry', null ]), + 'canonical' => null, + 'english' => null, + 'sparse' => array( null, '2nd entry', null, '4th entry', null ]), 'four' => 'This mapping has five keys, only two with values.' - ) + ) --- test: Omap todo: true @@ -1518,63 +1518,63 @@ ruby: | test: Boolean yaml: | false: used as key - logical: true - answer: no -php: | - array( - false => 'used as key', - 'logical' => true, - 'answer' => false + logical: true + answer: no +php: | + array( + false => 'used as key', + 'logical' => true, + 'answer' => false ) ---- -test: Integer -yaml: | - canonical: 12345 - decimal: +12,345 - octal: 014 - hexadecimal: 0xC -php: | - array( - 'canonical' => 12345, - 'decimal' => 12345, - 'octal' => 12, - 'hexadecimal' => 12 +--- +test: Integer +yaml: | + canonical: 12345 + decimal: +12,345 + octal: 014 + hexadecimal: 0xC +php: | + array( + 'canonical' => 12345, + 'decimal' => 12345, + 'octal' => 12, + 'hexadecimal' => 12 ) ---- -test: Float -yaml: | - canonical: 1.23015e+3 - exponential: 12.3015e+02 - fixed: 1,230.15 +--- +test: Float +yaml: | + canonical: 1.23015e+3 + exponential: 12.3015e+02 + fixed: 1,230.15 negative infinity: -.inf - not a number: .NaN -php: | - array( - 'canonical' => 1230.15, - 'exponential' => 1230.15, - 'fixed' => 1230.15, - 'negative infinity' => log(0), - 'not a number' => -log(0) + not a number: .NaN +php: | + array( + 'canonical' => 1230.15, + 'exponential' => 1230.15, + 'fixed' => 1230.15, + 'negative infinity' => log(0), + 'not a number' => -log(0) ) ---- -test: Timestamp +--- +test: Timestamp todo: true -yaml: | - canonical: 2001-12-15T02:59:43.1Z - valid iso8601: 2001-12-14t21:59:43.10-05:00 - space separated: 2001-12-14 21:59:43.10 -05:00 - date (noon UTC): 2002-12-14 -ruby: | - array( - 'canonical' => YAML::mktime( 2001, 12, 15, 2, 59, 43, 0.10 ), - 'valid iso8601' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), - 'space separated' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), - 'date (noon UTC)' => Date.new( 2002, 12, 14 ) +yaml: | + canonical: 2001-12-15T02:59:43.1Z + valid iso8601: 2001-12-14t21:59:43.10-05:00 + space separated: 2001-12-14 21:59:43.10 -05:00 + date (noon UTC): 2002-12-14 +ruby: | + array( + 'canonical' => YAML::mktime( 2001, 12, 15, 2, 59, 43, 0.10 ), + 'valid iso8601' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), + 'space separated' => YAML::mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), + 'date (noon UTC)' => Date.new( 2002, 12, 14 ) ) ---- -test: Binary +--- +test: Binary todo: true -yaml: | +yaml: | canonical: !binary "\ R0lGODlhDAAMAIQAAP//9/X17unp5WZmZgAAAOfn515eXvPz7Y6OjuDg4J+fn5\ OTk6enp56enmlpaWNjY6Ojo4SEhP/++f/++f/++f/++f/++f/++f/++f/++f/+\ @@ -1588,15 +1588,15 @@ yaml: | description: > The binary value above is a tiny arrow encoded as a gif image. -ruby-setup: | - arrow_gif = "GIF89a\f\000\f\000\204\000\000\377\377\367\365\365\356\351\351\345fff\000\000\000\347\347\347^^^\363\363\355\216\216\216\340\340\340\237\237\237\223\223\223\247\247\247\236\236\236iiiccc\243\243\243\204\204\204\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371!\376\016Made with GIMP\000,\000\000\000\000\f\000\f\000\000\005, \216\2010\236\343@\024\350i\020\304\321\212\010\034\317\200M$z\357\3770\205p\270\2601f\r\e\316\001\303\001\036\020' \202\n\001\000;" -ruby: | - { - 'canonical' => arrow_gif, - 'base64' => arrow_gif, - 'description' => "The binary value above is a tiny arrow encoded as a gif image.\n" - } - +ruby-setup: | + arrow_gif = "GIF89a\f\000\f\000\204\000\000\377\377\367\365\365\356\351\351\345fff\000\000\000\347\347\347^^^\363\363\355\216\216\216\340\340\340\237\237\237\223\223\223\247\247\247\236\236\236iiiccc\243\243\243\204\204\204\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371\377\376\371!\376\016Made with GIMP\000,\000\000\000\000\f\000\f\000\000\005, \216\2010\236\343@\024\350i\020\304\321\212\010\034\317\200M$z\357\3770\205p\270\2601f\r\e\316\001\303\001\036\020' \202\n\001\000;" +ruby: | + { + 'canonical' => arrow_gif, + 'base64' => arrow_gif, + 'description' => "The binary value above is a tiny arrow encoded as a gif image.\n" + } + --- test: Merge key todo: true @@ -1604,14 +1604,14 @@ yaml: | --- - &CENTER { x: 1, y: 2 } - &LEFT { x: 0, y: 2 } - - &BIG { r: 10 } + - &BIG { r: 10 } - &SMALL { r: 1 } # All the following maps are equal: - # Explicit keys x: 1 - y: 2 + y: 2 r: 10 label: center/big @@ -1632,7 +1632,7 @@ yaml: | ruby-setup: | center = { 'x' => 1, 'y' => 2 } left = { 'x' => 0, 'y' => 2 } - big = { 'r' => 10 } + big = { 'r' => 10 } small = { 'r' => 1 } node1 = { 'x' => 1, 'y' => 2, 'r' => 10, 'label' => 'center/big' } node2 = center.dup @@ -1650,44 +1650,44 @@ ruby: | center, left, big, small, node1, node2, node3, node4 ] ---- -test: Default key +--- +test: Default key todo: true -yaml: | - --- # Old schema - link with: - - library1.dll - - library2.dll - --- # New schema - link with: - - = : library1.dll - version: 1.2 - - = : library2.dll - version: 2.3 -ruby: | - y = YAML::Stream.new - y.add( { 'link with' => [ 'library1.dll', 'library2.dll' ] } ) - obj_h = Hash[ 'version' => 1.2 ] - obj_h.default = 'library1.dll' - obj_h2 = Hash[ 'version' => 2.3 ] - obj_h2.default = 'library2.dll' - y.add( { 'link with' => [ obj_h, obj_h2 ] } ) -documents: 2 - ---- -test: Special keys +yaml: | + --- # Old schema + link with: + - library1.dll + - library2.dll + --- # New schema + link with: + - = : library1.dll + version: 1.2 + - = : library2.dll + version: 2.3 +ruby: | + y = YAML::Stream.new + y.add( { 'link with' => [ 'library1.dll', 'library2.dll' ] } ) + obj_h = Hash[ 'version' => 1.2 ] + obj_h.default = 'library1.dll' + obj_h2 = Hash[ 'version' => 2.3 ] + obj_h2.default = 'library2.dll' + y.add( { 'link with' => [ obj_h, obj_h2 ] } ) +documents: 2 + +--- +test: Special keys todo: true -yaml: | - "!": These three keys - "&": had to be quoted - "=": and are normal strings. - # NOTE: the following node should NOT be serialized this way. - encoded node : - !special '!' : '!type' - !special|canonical '&' : 12 - = : value - # The proper way to serialize the above node is as follows: - node : !!type &12 value +yaml: | + "!": These three keys + "&": had to be quoted + "=": and are normal strings. + # NOTE: the following node should NOT be serialized this way. + encoded node : + !special '!' : '!type' + !special|canonical '&' : 12 + = : value + # The proper way to serialize the above node is as follows: + node : !!type &12 value ruby: | { '!' => 'These three keys', '&' => 'had to be quoted', '=' => 'and are normal strings.', diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsTypeTransfers.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsTypeTransfers.yml index baba0057ee..9972c1f0d9 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsTypeTransfers.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/YtsTypeTransfers.yml @@ -1,116 +1,116 @@ ---- %YAML:1.0 -test: Strings -brief: > - Any group of characters beginning with an - alphabetic or numeric character is a string, - unless it belongs to one of the groups below - (such as an Integer or Time). -yaml: | +--- %YAML:1.0 +test: Strings +brief: > + Any group of characters beginning with an + alphabetic or numeric character is a string, + unless it belongs to one of the groups below + (such as an Integer or Time). +yaml: | String -php: | - 'String' ---- -test: String characters -brief: > - A string can contain any alphabetic or - numeric character, along with many - punctuation characters, including the - period, dash, space, quotes, exclamation, and - question mark. -yaml: | - - What's Yaml? - - It's for writing data structures in plain text. - - And? - - And what? That's not good enough for you? - - No, I mean, "And what about Yaml?" - - Oh, oh yeah. Uh.. Yaml for Ruby. -php: | +php: | + 'String' +--- +test: String characters +brief: > + A string can contain any alphabetic or + numeric character, along with many + punctuation characters, including the + period, dash, space, quotes, exclamation, and + question mark. +yaml: | + - What's Yaml? + - It's for writing data structures in plain text. + - And? + - And what? That's not good enough for you? + - No, I mean, "And what about Yaml?" + - Oh, oh yeah. Uh.. Yaml for Ruby. +php: | array( - "What's Yaml?", - "It's for writing data structures in plain text.", - "And?", - "And what? That's not good enough for you?", - "No, I mean, \"And what about Yaml?\"", - "Oh, oh yeah. Uh.. Yaml for Ruby." + "What's Yaml?", + "It's for writing data structures in plain text.", + "And?", + "And what? That's not good enough for you?", + "No, I mean, \"And what about Yaml?\"", + "Oh, oh yeah. Uh.. Yaml for Ruby." ) ---- -test: Indicators in Strings -brief: > - Be careful using indicators in strings. In particular, - the comma, colon, and pound sign must be used carefully. -yaml: | - the colon followed by space is an indicator: but is a string:right here - same for the pound sign: here we have it#in a string - the comma can, honestly, be used in most cases: [ but not in, inline collections ] -php: | +--- +test: Indicators in Strings +brief: > + Be careful using indicators in strings. In particular, + the comma, colon, and pound sign must be used carefully. +yaml: | + the colon followed by space is an indicator: but is a string:right here + same for the pound sign: here we have it#in a string + the comma can, honestly, be used in most cases: [ but not in, inline collections ] +php: | array( - 'the colon followed by space is an indicator' => 'but is a string:right here', - 'same for the pound sign' => 'here we have it#in a string', + 'the colon followed by space is an indicator' => 'but is a string:right here', + 'same for the pound sign' => 'here we have it#in a string', 'the comma can, honestly, be used in most cases' => array('but not in', 'inline collections') ) ---- -test: Forcing Strings -brief: > - Any YAML type can be forced into a string using the - explicit !str method. -yaml: | - date string: !str 2001-08-01 - number string: !str 192 -php: | +--- +test: Forcing Strings +brief: > + Any YAML type can be forced into a string using the + explicit !str method. +yaml: | + date string: !str 2001-08-01 + number string: !str 192 +php: | array( - 'date string' => '2001-08-01', - 'number string' => '192' + 'date string' => '2001-08-01', + 'number string' => '192' ) ---- -test: Single-quoted Strings -brief: > - You can also enclose your strings within single quotes, - which allows use of slashes, colons, and other indicators - freely. Inside single quotes, you can represent a single - quote in your string by using two single quotes next to - each other. -yaml: | - all my favorite symbols: '#:!/%.)' - a few i hate: '&(*' - why do i hate them?: 'it''s very hard to explain' +--- +test: Single-quoted Strings +brief: > + You can also enclose your strings within single quotes, + which allows use of slashes, colons, and other indicators + freely. Inside single quotes, you can represent a single + quote in your string by using two single quotes next to + each other. +yaml: | + all my favorite symbols: '#:!/%.)' + a few i hate: '&(*' + why do i hate them?: 'it''s very hard to explain' entities: '£ me' -php: | +php: | array( - 'all my favorite symbols' => '#:!/%.)', - 'a few i hate' => '&(*', - 'why do i hate them?' => 'it\'s very hard to explain', + 'all my favorite symbols' => '#:!/%.)', + 'a few i hate' => '&(*', + 'why do i hate them?' => 'it\'s very hard to explain', 'entities' => '£ me' ) ---- -test: Double-quoted Strings -brief: > - Enclosing strings in double quotes allows you - to use escapings to represent ASCII and - Unicode characters. -yaml: | - i know where i want my line breaks: "one here\nand another here\n" -php: | +--- +test: Double-quoted Strings +brief: > + Enclosing strings in double quotes allows you + to use escapings to represent ASCII and + Unicode characters. +yaml: | + i know where i want my line breaks: "one here\nand another here\n" +php: | array( - 'i know where i want my line breaks' => "one here\nand another here\n" + 'i know where i want my line breaks' => "one here\nand another here\n" ) ---- -test: Multi-line Quoted Strings +--- +test: Multi-line Quoted Strings todo: true -brief: > +brief: > Both single- and double-quoted strings may be carried on to new lines in your YAML document. They must be indented a step and indentation is interpreted as a single space. -yaml: | +yaml: | i want a long string: "so i'm going to let it go on and on to other lines until i end it with a quote." -php: | +php: | array('i want a long string' => "so i'm going to ". "let it go on and on to other lines ". "until i end it with a quote." ) - + --- test: Plain scalars todo: true @@ -129,116 +129,116 @@ yaml: | duration, as can be imagined. php: | array( - "My little toe is broken in two places;", - "I'm crazy to have skied this way;", + "My little toe is broken in two places;", + "I'm crazy to have skied this way;", "I'm not the craziest he's seen, since there was always ". "the German guy who skied for 3 hours on a broken shin ". - "bone (just below the kneecap);", + "bone (just below the kneecap);", "Nevertheless, second place is respectable, and he doesn't ". - "recommend going for the record;", - "He's going to put my foot in plaster for a month;", + "recommend going for the record;", + "He's going to put my foot in plaster for a month;", "This would impair my skiing ability somewhat for the duration, ". "as can be imagined." ) ---- -test: 'Null' -brief: > - You can use the tilde '~' character for a null value. -yaml: | - name: Mr. Show - hosted by: Bob and David - date of next season: ~ -php: | - array( - 'name' => 'Mr. Show', - 'hosted by' => 'Bob and David', - 'date of next season' => null +--- +test: 'Null' +brief: > + You can use the tilde '~' character for a null value. +yaml: | + name: Mr. Show + hosted by: Bob and David + date of next season: ~ +php: | + array( + 'name' => 'Mr. Show', + 'hosted by' => 'Bob and David', + 'date of next season' => null ) ---- -test: Boolean -brief: > +--- +test: Boolean +brief: > You can use 'true' and 'false' for Boolean values. -yaml: | +yaml: | Is Gus a Liar?: true Do I rely on Gus for Sustenance?: false -php: | - array( - 'Is Gus a Liar?' => true, - 'Do I rely on Gus for Sustenance?' => false - ) ---- -test: Integers -dump_skip: true -brief: > - An integer is a series of numbers, optionally - starting with a positive or negative sign. Integers - may also contain commas for readability. -yaml: | - zero: 0 - simple: 12 - one-thousand: 1,000 - negative one-thousand: -1,000 -php: | +php: | array( - 'zero' => 0, - 'simple' => 12, - 'one-thousand' => 1000, - 'negative one-thousand' => -1000 + 'Is Gus a Liar?' => true, + 'Do I rely on Gus for Sustenance?' => false ) ---- -test: Integers as Map Keys -brief: > - An integer can be used a dictionary key. -yaml: | - 1: one - 2: two - 3: three -php: | - array( - 1 => 'one', - 2 => 'two', - 3 => 'three' - ) ---- -test: Floats +--- +test: Integers dump_skip: true -brief: > - Floats are represented by numbers with decimals, - allowing for scientific notation, as well as - positive and negative infinity and "not a number." -yaml: | - a simple float: 2.00 - larger float: 1,000.09 - scientific notation: 1.00009e+3 -php: | +brief: > + An integer is a series of numbers, optionally + starting with a positive or negative sign. Integers + may also contain commas for readability. +yaml: | + zero: 0 + simple: 12 + one-thousand: 1,000 + negative one-thousand: -1,000 +php: | + array( + 'zero' => 0, + 'simple' => 12, + 'one-thousand' => 1000, + 'negative one-thousand' => -1000 + ) +--- +test: Integers as Map Keys +brief: > + An integer can be used a dictionary key. +yaml: | + 1: one + 2: two + 3: three +php: | + array( + 1 => 'one', + 2 => 'two', + 3 => 'three' + ) +--- +test: Floats +dump_skip: true +brief: > + Floats are represented by numbers with decimals, + allowing for scientific notation, as well as + positive and negative infinity and "not a number." +yaml: | + a simple float: 2.00 + larger float: 1,000.09 + scientific notation: 1.00009e+3 +php: | array( - 'a simple float' => 2.0, - 'larger float' => 1000.09, - 'scientific notation' => 1000.09 + 'a simple float' => 2.0, + 'larger float' => 1000.09, + 'scientific notation' => 1000.09 ) --- -test: Time +test: Time todo: true -brief: > - You can represent timestamps by using - ISO8601 format, or a variation which - allows spaces between the date, time and - time zone. -yaml: | - iso8601: 2001-12-14t21:59:43.10-05:00 - space seperated: 2001-12-14 21:59:43.10 -05:00 -php: | +brief: > + You can represent timestamps by using + ISO8601 format, or a variation which + allows spaces between the date, time and + time zone. +yaml: | + iso8601: 2001-12-14t21:59:43.10-05:00 + space seperated: 2001-12-14 21:59:43.10 -05:00 +php: | array( - 'iso8601' => mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), - 'space seperated' => mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ) + 'iso8601' => mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ), + 'space seperated' => mktime( 2001, 12, 14, 21, 59, 43, 0.10, "-05:00" ) ) ---- -test: Date +--- +test: Date todo: true -brief: > - A date can be represented by its year, - month and day in ISO8601 order. +brief: > + A date can be represented by its year, + month and day in ISO8601 order. yaml: | 1976-07-31 -php: | - date( 1976, 7, 31 ) +php: | + date( 1976, 7, 31 ) diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/sfComments.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/sfComments.yml index c02940a588..34225e11e0 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/sfComments.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/sfComments.yml @@ -1,13 +1,13 @@ ---- %YAML:1.0 +--- %YAML:1.0 test: Comments at the end of a line -brief: > +brief: > Comments at the end of a line -yaml: | +yaml: | ex1: "foo # bar" ex2: "foo # bar" # comment ex3: 'foo # bar' # comment ex4: foo # comment -php: | +php: | array('ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo') --- test: Comments in the middle @@ -31,13 +31,13 @@ yaml: | foo: bar # a comment php: | array('foo' => array('foo' => 'bar')) ---- -test: 'Value starting with a #' -brief: > - 'Value starting with a #' -yaml: | - foo: '#bar' -php: | +--- +test: 'Value starting with a #' +brief: > + 'Value starting with a #' +yaml: | + foo: '#bar' +php: | array('foo' => '#bar') --- test: Document starting with a comment and a separator diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/sfCompact.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/sfCompact.yml index c49f31aaf3..1339d23a63 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/sfCompact.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/sfCompact.yml @@ -2,17 +2,17 @@ test: Compact notation brief: | Compact notation for sets of mappings with single element -yaml: | +yaml: | --- # products purchased - item : Super Hoop - item : Basketball quantity: 1 - - item: + - item: name: Big Shoes nick: Biggies quantity: 1 -php: | +php: | array ( array ( 'item' => 'Super Hoop', @@ -55,17 +55,17 @@ php: | test: Compact notation brief: | Compact notation for sets of mappings with single element -yaml: | +yaml: | --- # products purchased - item : Super Hoop - item : Basketball quantity: 1 - - item: + - item: name: Big Shoes nick: Biggies quantity: 1 -php: | +php: | array ( array ( 'item' => 'Super Hoop', @@ -108,17 +108,17 @@ php: | test: Compact notation brief: | Compact notation for sets of mappings with single element -yaml: | +yaml: | --- # products purchased - item : Super Hoop - item : Basketball quantity: 1 - - item: + - item: name: Big Shoes nick: Biggies quantity: 1 -php: | +php: | array ( array ( 'item' => 'Super Hoop', diff --git a/tests/Symfony/Tests/Component/Yaml/Fixtures/sfObjects.yml b/tests/Symfony/Tests/Component/Yaml/Fixtures/sfObjects.yml index 454ceae69b..ee124b2446 100644 --- a/tests/Symfony/Tests/Component/Yaml/Fixtures/sfObjects.yml +++ b/tests/Symfony/Tests/Component/Yaml/Fixtures/sfObjects.yml @@ -1,11 +1,11 @@ ---- %YAML:1.0 +--- %YAML:1.0 test: Objects -brief: > +brief: > Comments at the end of a line -yaml: | +yaml: | ex1: "foo # bar" ex2: "foo # bar" # comment ex3: 'foo # bar' # comment ex4: foo # comment -php: | +php: | array('ex1' => 'foo # bar', 'ex2' => 'foo # bar', 'ex3' => 'foo # bar', 'ex4' => 'foo')