From c75e6960a740ea9c47176c5a50241680129bc3fc Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Fri, 20 Dec 2019 11:55:55 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B02651=20Remove=20lib=20test=20files=20fro?= =?UTF-8?q?m=20index?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 + .../tests/PEAR/ExceptionTest.php | 78 - .../log/Psr/Log/Test/LoggerInterfaceTest.php | 146 - lib/psr/log/Psr/Log/Test/TestLogger.php | 147 - .../Adapter/AbstractRedisAdapterTest.php | 46 - .../cache/Tests/Adapter/AdapterTestCase.php | 175 -- .../cache/Tests/Adapter/ApcuAdapterTest.php | 124 - .../cache/Tests/Adapter/ArrayAdapterTest.php | 56 - .../cache/Tests/Adapter/ChainAdapterTest.php | 115 - .../Tests/Adapter/DoctrineAdapterTest.php | 32 - .../Tests/Adapter/FilesystemAdapterTest.php | 61 - .../Tests/Adapter/MaxIdLengthAdapterTest.php | 87 - .../Tests/Adapter/MemcachedAdapterTest.php | 198 -- .../Adapter/NamespacedProxyAdapterTest.php | 26 - .../cache/Tests/Adapter/NullAdapterTest.php | 128 - .../cache/Tests/Adapter/PdoAdapterTest.php | 73 - .../Tests/Adapter/PdoDbalAdapterTest.php | 48 - .../Tests/Adapter/PhpArrayAdapterTest.php | 133 - .../PhpArrayAdapterWithFallbackTest.php | 49 - .../Tests/Adapter/PhpFilesAdapterTest.php | 47 - .../cache/Tests/Adapter/PredisAdapterTest.php | 53 - .../Adapter/PredisClusterAdapterTest.php | 26 - .../Adapter/PredisRedisClusterAdapterTest.php | 28 - .../cache/Tests/Adapter/ProxyAdapterTest.php | 69 - .../cache/Tests/Adapter/RedisAdapterTest.php | 92 - .../Tests/Adapter/RedisArrayAdapterTest.php | 24 - .../Tests/Adapter/RedisClusterAdapterTest.php | 27 - .../Tests/Adapter/SimpleCacheAdapterTest.php | 41 - .../Tests/Adapter/TagAwareAdapterTest.php | 318 -- ...TagAwareAndProxyAdapterIntegrationTest.php | 38 - .../Tests/Adapter/TraceableAdapterTest.php | 191 -- .../Adapter/TraceableTagAwareAdapterTest.php | 37 - lib/symfony/cache/Tests/CacheItemTest.php | 77 - .../cache/Tests/DoctrineProviderTest.php | 45 - .../cache/Tests/Fixtures/ArrayCache.php | 52 - .../cache/Tests/Fixtures/ExternalAdapter.php | 76 - .../Tests/Simple/AbstractRedisCacheTest.php | 46 - .../cache/Tests/Simple/ApcuCacheTest.php | 35 - .../cache/Tests/Simple/ArrayCacheTest.php | 25 - .../cache/Tests/Simple/CacheTestCase.php | 150 - .../cache/Tests/Simple/ChainCacheTest.php | 113 - .../cache/Tests/Simple/DoctrineCacheTest.php | 31 - .../Tests/Simple/FilesystemCacheTest.php | 34 - .../cache/Tests/Simple/MemcachedCacheTest.php | 172 -- .../Simple/MemcachedCacheTextModeTest.php | 25 - .../cache/Tests/Simple/NullCacheTest.php | 96 - .../cache/Tests/Simple/PdoCacheTest.php | 47 - .../cache/Tests/Simple/PdoDbalCacheTest.php | 48 - .../cache/Tests/Simple/PhpArrayCacheTest.php | 143 - .../Simple/PhpArrayCacheWithFallbackTest.php | 55 - .../cache/Tests/Simple/PhpFilesCacheTest.php | 42 - .../cache/Tests/Simple/Psr6CacheTest.php | 30 - .../Tests/Simple/RedisArrayCacheTest.php | 24 - .../cache/Tests/Simple/RedisCacheTest.php | 82 - .../Tests/Simple/RedisClusterCacheTest.php | 27 - .../cache/Tests/Simple/TraceableCacheTest.php | 171 -- .../cache/Tests/Traits/PdoPruneableTrait.php | 34 - .../class-loader/Tests/ApcClassLoaderTest.php | 200 -- .../Tests/ClassCollectionLoaderTest.php | 317 -- .../class-loader/Tests/ClassLoaderTest.php | 238 -- .../Tests/ClassMapGeneratorTest.php | 151 - .../Tests/Fixtures/Apc/Namespaced/Bar.php | 17 - .../Tests/Fixtures/Apc/Namespaced/Baz.php | 17 - .../Tests/Fixtures/Apc/Namespaced/Foo.php | 17 - .../Tests/Fixtures/Apc/Namespaced/FooBar.php | 17 - .../Tests/Fixtures/Apc/Pearlike/Bar.php | 6 - .../Tests/Fixtures/Apc/Pearlike/Baz.php | 6 - .../Tests/Fixtures/Apc/Pearlike/Foo.php | 6 - .../alpha/Apc/ApcPrefixCollision/A/Bar.php | 6 - .../alpha/Apc/ApcPrefixCollision/A/Foo.php | 6 - .../alpha/Apc/NamespaceCollision/A/Bar.php | 17 - .../alpha/Apc/NamespaceCollision/A/Foo.php | 17 - .../beta/Apc/ApcPrefixCollision/A/B/Bar.php | 6 - .../beta/Apc/ApcPrefixCollision/A/B/Foo.php | 6 - .../beta/Apc/NamespaceCollision/A/B/Bar.php | 17 - .../beta/Apc/NamespaceCollision/A/B/Foo.php | 17 - .../Apc/fallback/Apc/Pearlike/FooBar.php | 6 - .../Apc/fallback/Namespaced/FooBar.php | 17 - .../Tests/Fixtures/ClassesWithParents/A.php | 7 - .../Fixtures/ClassesWithParents/ATrait.php | 7 - .../Tests/Fixtures/ClassesWithParents/B.php | 7 - .../Fixtures/ClassesWithParents/BTrait.php | 8 - .../ClassesWithParents/CInterface.php | 7 - .../Fixtures/ClassesWithParents/CTrait.php | 7 - .../Tests/Fixtures/ClassesWithParents/D.php | 8 - .../Tests/Fixtures/ClassesWithParents/E.php | 8 - .../Tests/Fixtures/ClassesWithParents/F.php | 8 - .../Tests/Fixtures/ClassesWithParents/G.php | 8 - .../ClassesWithParents/GInterface.php | 7 - .../Tests/Fixtures/DeclaredClass.php | 7 - .../Tests/Fixtures/DeclaredInterface.php | 7 - .../Tests/Fixtures/Namespaced/Bar.php | 17 - .../Tests/Fixtures/Namespaced/Baz.php | 17 - .../Tests/Fixtures/Namespaced/Foo.php | 17 - .../Fixtures/Namespaced/WithComments.php | 37 - .../Fixtures/Namespaced/WithDirMagic.php | 15 - .../Fixtures/Namespaced/WithFileMagic.php | 15 - .../Fixtures/Namespaced/WithHaltCompiler.php | 18 - .../Fixtures/Namespaced/WithStrictTypes.php | 13 - .../Tests/Fixtures/Namespaced2/Bar.php | 8 - .../Tests/Fixtures/Namespaced2/Baz.php | 8 - .../Tests/Fixtures/Namespaced2/Foo.php | 8 - .../Tests/Fixtures/Pearlike/Bar.php | 6 - .../Tests/Fixtures/Pearlike/Baz.php | 6 - .../Tests/Fixtures/Pearlike/Foo.php | 6 - .../Tests/Fixtures/Pearlike/WithComments.php | 16 - .../Tests/Fixtures/Pearlike2/Bar.php | 6 - .../Tests/Fixtures/Pearlike2/Baz.php | 6 - .../Tests/Fixtures/Pearlike2/Foo.php | 6 - .../Tests/Fixtures/WarmedClass.php | 7 - .../Tests/Fixtures/WarmedInterface.php | 7 - .../alpha/NamespaceCollision/A/Bar.php | 17 - .../alpha/NamespaceCollision/A/Foo.php | 17 - .../alpha/NamespaceCollision/C/Bar.php | 8 - .../alpha/NamespaceCollision/C/Foo.php | 8 - .../Fixtures/alpha/PrefixCollision/A/Bar.php | 6 - .../Fixtures/alpha/PrefixCollision/A/Foo.php | 6 - .../Fixtures/alpha/PrefixCollision/C/Bar.php | 6 - .../Fixtures/alpha/PrefixCollision/C/Foo.php | 6 - .../beta/NamespaceCollision/A/B/Bar.php | 17 - .../beta/NamespaceCollision/A/B/Foo.php | 17 - .../beta/NamespaceCollision/C/B/Bar.php | 8 - .../beta/NamespaceCollision/C/B/Foo.php | 8 - .../Fixtures/beta/PrefixCollision/A/B/Bar.php | 6 - .../Fixtures/beta/PrefixCollision/A/B/Foo.php | 6 - .../Fixtures/beta/PrefixCollision/C/B/Bar.php | 6 - .../Fixtures/beta/PrefixCollision/C/B/Foo.php | 6 - .../Tests/Fixtures/classmap/SomeClass.php | 16 - .../Tests/Fixtures/classmap/SomeInterface.php | 16 - .../Tests/Fixtures/classmap/SomeParent.php | 16 - .../Tests/Fixtures/classmap/multipleNs.php | 25 - .../Tests/Fixtures/classmap/notAClass.php | 3 - .../Tests/Fixtures/classmap/notPhpFile.md | 1 - .../classmap/sameNsMultipleClasses.php | 19 - .../Tests/Fixtures/deps/traits.php | 37 - .../Fixtures/fallback/Namespaced/FooBar.php | 17 - .../Fixtures/fallback/Namespaced2/FooBar.php | 8 - .../Fixtures/fallback/Pearlike/FooBar.php | 6 - .../Fixtures/fallback/Pearlike2/FooBar.php | 6 - .../Tests/Fixtures/includepath/Foo.php | 5 - .../Tests/Fixtures/php5.4/traits.php | 32 - .../Tests/Fixtures/php5.5/class_cons.php | 11 - .../Fixtures/psr-4/Class_With_Underscores.php | 7 - .../class-loader/Tests/Fixtures/psr-4/Foo.php | 7 - .../Lets/Go/Deeper/Class_With_Underscores.php | 7 - .../Fixtures/psr-4/Lets/Go/Deeper/Foo.php | 7 - .../Tests/Psr4ClassLoaderTest.php | 75 - .../config/Tests/ConfigCacheFactoryTest.php | 27 - lib/symfony/config/Tests/ConfigCacheTest.php | 99 - .../config/Tests/Definition/ArrayNodeTest.php | 237 -- .../Tests/Definition/BooleanNodeTest.php | 74 - .../Builder/ArrayNodeDefinitionTest.php | 362 --- .../Builder/BooleanNodeDefinitionTest.php | 37 - .../Builder/EnumNodeDefinitionTest.php | 73 - .../Definition/Builder/ExprBuilderTest.php | 264 -- .../Definition/Builder/NodeBuilderTest.php | 91 - .../Builder/NumericNodeDefinitionTest.php | 89 - .../Definition/Builder/TreeBuilderTest.php | 134 - .../Dumper/XmlReferenceDumperTest.php | 114 - .../Dumper/YamlReferenceDumperTest.php | 143 - .../config/Tests/Definition/EnumNodeTest.php | 51 - .../Tests/Definition/FinalizationTest.php | 74 - .../config/Tests/Definition/FloatNodeTest.php | 78 - .../Tests/Definition/IntegerNodeTest.php | 75 - .../config/Tests/Definition/MergeTest.php | 192 -- .../Tests/Definition/NormalizationTest.php | 228 -- .../Definition/PrototypedArrayNodeTest.php | 341 --- .../Tests/Definition/ScalarNodeTest.php | 161 -- .../ConfigCachePassTest.php | 59 - .../Exception/FileLoaderLoadExceptionTest.php | 98 - lib/symfony/config/Tests/FileLocatorTest.php | 114 - .../config/Tests/Fixtures/Again/foo.xml | 0 .../config/Tests/Fixtures/BadParent.php | 7 - lib/symfony/config/Tests/Fixtures/BarNode.php | 18 - .../Fixtures/Builder/BarNodeDefinition.php | 23 - .../Tests/Fixtures/Builder/NodeBuilder.php | 34 - .../Builder/VariableNodeDefinition.php | 18 - .../Configuration/ExampleConfiguration.php | 102 - .../Tests/Fixtures/Resource/.hiddenFile | 0 .../Fixtures/Resource/ConditionalClass.php | 9 - .../Tests/Fixtures/Util/document_type.xml | 3 - .../config/Tests/Fixtures/Util/invalid.xml | 2 - .../Tests/Fixtures/Util/invalid_schema.xml | 2 - .../config/Tests/Fixtures/Util/schema.xsd | 9 - .../config/Tests/Fixtures/Util/valid.xml | 3 - lib/symfony/config/Tests/Fixtures/foo.xml | 0 .../Tests/Loader/DelegatingLoaderTest.php | 69 - .../config/Tests/Loader/FileLoaderTest.php | 128 - .../Tests/Loader/LoaderResolverTest.php | 47 - .../config/Tests/Loader/LoaderTest.php | 116 - .../Resource/ClassExistenceResourceTest.php | 99 - .../Tests/Resource/ComposerResourceTest.php | 47 - .../Tests/Resource/DirectoryResourceTest.php | 181 -- .../Resource/FileExistenceResourceTest.php | 71 - .../Tests/Resource/FileResourceTest.php | 83 - .../Tests/Resource/GlobResourceTest.php | 114 - .../Resource/ReflectionClassResourceTest.php | 223 -- .../config/Tests/Resource/ResourceStub.php | 34 - .../Tests/ResourceCheckerConfigCacheTest.php | 150 - .../config/Tests/Util/XmlUtilsTest.php | 211 -- lib/symfony/console/Tests/ApplicationTest.php | 1744 ----------- .../console/Tests/Command/CommandTest.php | 430 --- .../console/Tests/Command/HelpCommandTest.php | 71 - .../console/Tests/Command/ListCommandTest.php | 113 - .../Tests/Command/LockableTraitTest.php | 67 - .../ContainerCommandLoaderTest.php | 59 - .../FactoryCommandLoaderTest.php | 58 - .../AddConsoleCommandPassTest.php | 256 -- .../Descriptor/AbstractDescriptorTest.php | 107 - .../Descriptor/ApplicationDescriptionTest.php | 53 - .../Tests/Descriptor/JsonDescriptorTest.php | 35 - .../Descriptor/MarkdownDescriptorTest.php | 45 - .../Tests/Descriptor/ObjectsProvider.php | 82 - .../Tests/Descriptor/TextDescriptorTest.php | 53 - .../Tests/Descriptor/XmlDescriptorTest.php | 27 - .../Tests/EventListener/ErrorListenerTest.php | 156 - .../console/Tests/Fixtures/BarBucCommand.php | 11 - .../Tests/Fixtures/DescriptorApplication1.php | 18 - .../Tests/Fixtures/DescriptorApplication2.php | 26 - .../DescriptorApplicationMbString.php | 24 - .../Tests/Fixtures/DescriptorCommand1.php | 27 - .../Tests/Fixtures/DescriptorCommand2.php | 32 - .../Tests/Fixtures/DescriptorCommand3.php | 27 - .../Tests/Fixtures/DescriptorCommand4.php | 25 - .../Fixtures/DescriptorCommandMbString.php | 32 - .../console/Tests/Fixtures/DummyOutput.php | 36 - .../console/Tests/Fixtures/Foo1Command.php | 26 - .../console/Tests/Fixtures/Foo2Command.php | 21 - .../console/Tests/Fixtures/Foo3Command.php | 29 - .../console/Tests/Fixtures/Foo4Command.php | 11 - .../console/Tests/Fixtures/Foo5Command.php | 10 - .../console/Tests/Fixtures/Foo6Command.php | 11 - .../console/Tests/Fixtures/FooCommand.php | 33 - .../Tests/Fixtures/FooHiddenCommand.php | 21 - .../Tests/Fixtures/FooLock2Command.php | 28 - .../console/Tests/Fixtures/FooLockCommand.php | 27 - .../console/Tests/Fixtures/FooOptCommand.php | 36 - .../Fixtures/FooSameCaseLowercaseCommand.php | 11 - .../Fixtures/FooSameCaseUppercaseCommand.php | 11 - .../Fixtures/FooSubnamespaced1Command.php | 26 - .../Fixtures/FooSubnamespaced2Command.php | 26 - .../console/Tests/Fixtures/FoobarCommand.php | 25 - .../Style/SymfonyStyle/command/command_0.php | 11 - .../Style/SymfonyStyle/command/command_1.php | 13 - .../Style/SymfonyStyle/command/command_10.php | 17 - .../Style/SymfonyStyle/command/command_11.php | 12 - .../Style/SymfonyStyle/command/command_12.php | 13 - .../Style/SymfonyStyle/command/command_13.php | 14 - .../Style/SymfonyStyle/command/command_14.php | 17 - .../Style/SymfonyStyle/command/command_15.php | 14 - .../Style/SymfonyStyle/command/command_16.php | 15 - .../Style/SymfonyStyle/command/command_17.php | 13 - .../Style/SymfonyStyle/command/command_2.php | 16 - .../Style/SymfonyStyle/command/command_3.php | 12 - .../Style/SymfonyStyle/command/command_4.php | 34 - .../Style/SymfonyStyle/command/command_5.php | 37 - .../Style/SymfonyStyle/command/command_6.php | 16 - .../Style/SymfonyStyle/command/command_7.php | 15 - .../Style/SymfonyStyle/command/command_8.php | 26 - .../Style/SymfonyStyle/command/command_9.php | 11 - .../command/interactive_command_1.php | 19 - .../output/interactive_output_1.txt | 7 - .../Style/SymfonyStyle/output/output_0.txt | 3 - .../Style/SymfonyStyle/output/output_1.txt | 9 - .../Style/SymfonyStyle/output/output_10.txt | 7 - .../Style/SymfonyStyle/output/output_11.txt | 4 - .../Style/SymfonyStyle/output/output_12.txt | 6 - .../Style/SymfonyStyle/output/output_13.txt | 7 - .../Style/SymfonyStyle/output/output_14.txt | 6 - .../Style/SymfonyStyle/output/output_15.txt | 7 - .../Style/SymfonyStyle/output/output_16.txt | 8 - .../Style/SymfonyStyle/output/output_17.txt | 7 - .../Style/SymfonyStyle/output/output_2.txt | 13 - .../Style/SymfonyStyle/output/output_3.txt | 7 - .../Style/SymfonyStyle/output/output_4.txt | 32 - .../Style/SymfonyStyle/output/output_5.txt | 18 - .../Style/SymfonyStyle/output/output_6.txt | 6 - .../Style/SymfonyStyle/output/output_7.txt | 5 - .../Style/SymfonyStyle/output/output_8.txt | 9 - .../Style/SymfonyStyle/output/output_9.txt | 5 - .../TestAmbiguousCommandRegistering.php | 22 - .../TestAmbiguousCommandRegistering2.php | 21 - .../console/Tests/Fixtures/TestCommand.php | 28 - .../console/Tests/Fixtures/application_1.json | 156 - .../console/Tests/Fixtures/application_1.md | 172 -- .../console/Tests/Fixtures/application_1.txt | 17 - .../console/Tests/Fixtures/application_1.xml | 104 - .../console/Tests/Fixtures/application_2.json | 509 ---- .../console/Tests/Fixtures/application_2.md | 431 --- .../console/Tests/Fixtures/application_2.txt | 21 - .../console/Tests/Fixtures/application_2.xml | 254 -- .../application_filtered_namespace.txt | 16 - .../Tests/Fixtures/application_gethelp.txt | 1 - .../Tests/Fixtures/application_mbstring.md | 269 -- .../Tests/Fixtures/application_mbstring.txt | 19 - .../Fixtures/application_renderexception1.txt | 5 - .../Fixtures/application_renderexception2.txt | 7 - .../Fixtures/application_renderexception3.txt | 18 - .../application_renderexception3decorated.txt | 18 - .../Fixtures/application_renderexception4.txt | 6 - ...plication_renderexception_doublewidth1.txt | 8 - ..._renderexception_doublewidth1decorated.txt | 8 - ...plication_renderexception_doublewidth2.txt | 9 - ...plication_renderexception_escapeslines.txt | 9 - ...application_renderexception_linebreaks.txt | 11 - .../Tests/Fixtures/application_run1.txt | 17 - .../Tests/Fixtures/application_run2.txt | 26 - .../Tests/Fixtures/application_run3.txt | 26 - .../Tests/Fixtures/application_run4.txt | 1 - .../console/Tests/Fixtures/command_1.json | 15 - .../console/Tests/Fixtures/command_1.md | 12 - .../console/Tests/Fixtures/command_1.txt | 7 - .../console/Tests/Fixtures/command_1.xml | 12 - .../console/Tests/Fixtures/command_2.json | 33 - .../console/Tests/Fixtures/command_2.md | 29 - .../console/Tests/Fixtures/command_2.txt | 13 - .../console/Tests/Fixtures/command_2.xml | 21 - .../Tests/Fixtures/command_mbstring.md | 29 - .../Tests/Fixtures/command_mbstring.txt | 13 - .../Tests/Fixtures/input_argument_1.json | 7 - .../Tests/Fixtures/input_argument_1.md | 5 - .../Tests/Fixtures/input_argument_1.txt | 1 - .../Tests/Fixtures/input_argument_1.xml | 5 - .../Tests/Fixtures/input_argument_2.json | 7 - .../Tests/Fixtures/input_argument_2.md | 7 - .../Tests/Fixtures/input_argument_2.txt | 1 - .../Tests/Fixtures/input_argument_2.xml | 5 - .../Tests/Fixtures/input_argument_3.json | 7 - .../Tests/Fixtures/input_argument_3.md | 7 - .../Tests/Fixtures/input_argument_3.txt | 1 - .../Tests/Fixtures/input_argument_3.xml | 7 - .../Tests/Fixtures/input_argument_4.json | 7 - .../Tests/Fixtures/input_argument_4.md | 8 - .../Tests/Fixtures/input_argument_4.txt | 2 - .../Tests/Fixtures/input_argument_4.xml | 6 - ...input_argument_with_default_inf_value.json | 7 - .../input_argument_with_default_inf_value.md | 7 - .../input_argument_with_default_inf_value.txt | 1 - .../input_argument_with_default_inf_value.xml | 7 - .../Fixtures/input_argument_with_style.json | 7 - .../Fixtures/input_argument_with_style.md | 7 - .../Fixtures/input_argument_with_style.txt | 1 - .../Fixtures/input_argument_with_style.xml | 7 - .../Tests/Fixtures/input_definition_1.json | 4 - .../Tests/Fixtures/input_definition_1.md | 0 .../Tests/Fixtures/input_definition_1.txt | 0 .../Tests/Fixtures/input_definition_1.xml | 5 - .../Tests/Fixtures/input_definition_2.json | 12 - .../Tests/Fixtures/input_definition_2.md | 7 - .../Tests/Fixtures/input_definition_2.txt | 2 - .../Tests/Fixtures/input_definition_2.xml | 10 - .../Tests/Fixtures/input_definition_3.json | 14 - .../Tests/Fixtures/input_definition_3.md | 8 - .../Tests/Fixtures/input_definition_3.txt | 2 - .../Tests/Fixtures/input_definition_3.xml | 9 - .../Tests/Fixtures/input_definition_4.json | 22 - .../Tests/Fixtures/input_definition_4.md | 16 - .../Tests/Fixtures/input_definition_4.txt | 5 - .../Tests/Fixtures/input_definition_4.xml | 14 - .../Tests/Fixtures/input_option_1.json | 9 - .../console/Tests/Fixtures/input_option_1.md | 6 - .../console/Tests/Fixtures/input_option_1.txt | 1 - .../console/Tests/Fixtures/input_option_1.xml | 4 - .../Tests/Fixtures/input_option_2.json | 9 - .../console/Tests/Fixtures/input_option_2.md | 8 - .../console/Tests/Fixtures/input_option_2.txt | 1 - .../console/Tests/Fixtures/input_option_2.xml | 7 - .../Tests/Fixtures/input_option_3.json | 9 - .../console/Tests/Fixtures/input_option_3.md | 8 - .../console/Tests/Fixtures/input_option_3.txt | 1 - .../console/Tests/Fixtures/input_option_3.xml | 5 - .../Tests/Fixtures/input_option_4.json | 9 - .../console/Tests/Fixtures/input_option_4.md | 8 - .../console/Tests/Fixtures/input_option_4.txt | 1 - .../console/Tests/Fixtures/input_option_4.xml | 5 - .../Tests/Fixtures/input_option_5.json | 9 - .../console/Tests/Fixtures/input_option_5.md | 9 - .../console/Tests/Fixtures/input_option_5.txt | 2 - .../console/Tests/Fixtures/input_option_5.xml | 6 - .../Tests/Fixtures/input_option_6.json | 9 - .../console/Tests/Fixtures/input_option_6.md | 8 - .../console/Tests/Fixtures/input_option_6.txt | 1 - .../console/Tests/Fixtures/input_option_6.xml | 5 - .../input_option_with_default_inf_value.json | 9 - .../input_option_with_default_inf_value.md | 8 - .../input_option_with_default_inf_value.txt | 1 - .../input_option_with_default_inf_value.xml | 7 - .../Fixtures/input_option_with_style.json | 9 - .../Tests/Fixtures/input_option_with_style.md | 8 - .../Fixtures/input_option_with_style.txt | 1 - .../Fixtures/input_option_with_style.xml | 7 - .../input_option_with_style_array.json | 12 - .../Fixtures/input_option_with_style_array.md | 8 - .../input_option_with_style_array.txt | 1 - .../input_option_with_style_array.xml | 8 - .../OutputFormatterStyleStackTest.php | 69 - .../Formatter/OutputFormatterStyleTest.php | 100 - .../Tests/Formatter/OutputFormatterTest.php | 344 --- .../Helper/AbstractQuestionHelperTest.php | 34 - .../Tests/Helper/FormatterHelperTest.php | 129 - .../console/Tests/Helper/HelperSetTest.php | 127 - .../console/Tests/Helper/HelperTest.php | 55 - .../Tests/Helper/ProcessHelperTest.php | 118 - .../console/Tests/Helper/ProgressBarTest.php | 805 ------ .../Tests/Helper/ProgressIndicatorTest.php | 175 -- .../Tests/Helper/QuestionHelperTest.php | 1085 ------- .../Helper/SymfonyQuestionHelperTest.php | 166 -- .../console/Tests/Helper/TableStyleTest.php | 26 - .../console/Tests/Helper/TableTest.php | 868 ------ .../console/Tests/Input/ArgvInputTest.php | 462 --- .../console/Tests/Input/ArrayInputTest.php | 173 -- .../console/Tests/Input/InputArgumentTest.php | 109 - .../Tests/Input/InputDefinitionTest.php | 389 --- .../console/Tests/Input/InputOptionTest.php | 194 -- lib/symfony/console/Tests/Input/InputTest.php | 137 - .../console/Tests/Input/StringInputTest.php | 87 - .../Tests/Logger/ConsoleLoggerTest.php | 213 -- .../Tests/Output/ConsoleOutputTest.php | 42 - .../console/Tests/Output/NullOutputTest.php | 88 - .../console/Tests/Output/OutputTest.php | 176 -- .../console/Tests/Output/StreamOutputTest.php | 59 - .../Tests/Question/ChoiceQuestionTest.php | 64 - .../Question/ConfirmationQuestionTest.php | 62 - .../console/Tests/Style/SymfonyStyleTest.php | 118 - lib/symfony/console/Tests/TerminalTest.php | 97 - .../Tests/Tester/ApplicationTesterTest.php | 70 - .../Tests/Tester/CommandTesterTest.php | 212 -- .../Tests/CssSelectorConverterTest.php | 74 - .../Tests/Node/AbstractNodeTest.php | 34 - .../Tests/Node/AttributeNodeTest.php | 37 - .../css-selector/Tests/Node/ClassNodeTest.php | 33 - .../Tests/Node/CombinedSelectorNodeTest.php | 35 - .../Tests/Node/ElementNodeTest.php | 35 - .../Tests/Node/FunctionNodeTest.php | 47 - .../css-selector/Tests/Node/HashNodeTest.php | 33 - .../Tests/Node/NegationNodeTest.php | 33 - .../Tests/Node/PseudoNodeTest.php | 32 - .../Tests/Node/SelectorNodeTest.php | 34 - .../Tests/Node/SpecificityTest.php | 63 - .../Parser/Handler/AbstractHandlerTest.php | 70 - .../Parser/Handler/CommentHandlerTest.php | 55 - .../Tests/Parser/Handler/HashHandlerTest.php | 49 - .../Parser/Handler/IdentifierHandlerTest.php | 49 - .../Parser/Handler/NumberHandlerTest.php | 50 - .../Parser/Handler/StringHandlerTest.php | 50 - .../Parser/Handler/WhitespaceHandlerTest.php | 44 - .../css-selector/Tests/Parser/ParserTest.php | 253 -- .../css-selector/Tests/Parser/ReaderTest.php | 102 - .../Tests/Parser/Shortcut/ClassParserTest.php | 45 - .../Parser/Shortcut/ElementParserTest.php | 44 - .../Parser/Shortcut/EmptyStringParserTest.php | 36 - .../Tests/Parser/Shortcut/HashParserTest.php | 45 - .../Tests/Parser/TokenStreamTest.php | 96 - .../Tests/XPath/Fixtures/ids.html | 48 - .../Tests/XPath/Fixtures/lang.xml | 11 - .../Tests/XPath/Fixtures/shakespear.html | 308 -- .../Tests/XPath/TranslatorTest.php | 413 --- .../debug/Resources/ext/tests/001.phpt | 155 - .../debug/Resources/ext/tests/002.phpt | 65 - .../debug/Resources/ext/tests/002_1.phpt | 48 - .../debug/Resources/ext/tests/003.phpt | 87 - .../debug/Tests/DebugClassLoaderTest.php | 445 --- lib/symfony/debug/Tests/ErrorHandlerTest.php | 646 ----- .../Tests/Exception/FlattenExceptionTest.php | 302 -- .../debug/Tests/ExceptionHandlerTest.php | 163 -- .../ClassNotFoundFatalErrorHandlerTest.php | 180 -- ...UndefinedFunctionFatalErrorHandlerTest.php | 81 - .../UndefinedMethodFatalErrorHandlerTest.php | 76 - .../debug/Tests/Fixtures/AnnotatedClass.php | 13 - .../debug/Tests/Fixtures/ClassAlias.php | 3 - .../Fixtures/DefinitionInEvaluatedCode.php | 11 - .../debug/Tests/Fixtures/DeprecatedClass.php | 12 - .../Tests/Fixtures/DeprecatedInterface.php | 12 - .../ErrorHandlerThatUsesThePreviousOne.php | 22 - .../Tests/Fixtures/ExtendedFinalMethod.php | 19 - .../debug/Tests/Fixtures/FinalClasses.php | 85 - .../debug/Tests/Fixtures/FinalMethod.php | 26 - .../Tests/Fixtures/FinalMethod2Trait.php | 10 - .../debug/Tests/Fixtures/InternalClass.php | 15 - .../Tests/Fixtures/InternalInterface.php | 10 - .../debug/Tests/Fixtures/InternalTrait.php | 10 - .../debug/Tests/Fixtures/InternalTrait2.php | 23 - .../Fixtures/LoggerThatSetAnErrorHandler.php | 15 - .../Tests/Fixtures/NonDeprecatedInterface.php | 7 - .../debug/Tests/Fixtures/PEARClass.php | 5 - lib/symfony/debug/Tests/Fixtures/Throwing.php | 3 - .../debug/Tests/Fixtures/ToStringThrower.php | 24 - .../Fixtures/TraitWithInternalMethod.php | 13 - .../debug/Tests/Fixtures/casemismatch.php | 7 - .../debug/Tests/Fixtures/notPsr0Bis.php | 7 - .../Tests/Fixtures/psr4/Psr4CaseMismatch.php | 7 - .../debug/Tests/Fixtures/reallyNotPsr0.php | 7 - .../debug/Tests/Fixtures2/RequiredTwice.php | 7 - lib/symfony/debug/Tests/HeaderMock.php | 38 - .../debug/Tests/phpt/debug_class_loader.phpt | 27 - .../Tests/phpt/decorate_exception_hander.phpt | 47 - .../debug/Tests/phpt/exception_rethrown.phpt | 35 - .../phpt/fatal_with_nested_handlers.phpt | 42 - .../Argument/RewindableGeneratorTest.php | 53 - .../Tests/ChildDefinitionTest.php | 149 - .../AnalyzeServiceReferencesPassTest.php | 215 -- .../Compiler/AutoAliasServicePassTest.php | 108 - .../Compiler/AutowireExceptionPassTest.php | 145 - .../Tests/Compiler/AutowirePassTest.php | 916 ------ .../AutowireRequiredMethodsPassTest.php | 80 - .../CheckArgumentsValidityPassTest.php | 78 - .../CheckCircularReferencesPassTest.php | 146 - .../CheckDefinitionValidityPassTest.php | 110 - ...tionOnInvalidReferenceBehaviorPassTest.php | 86 - .../CheckReferenceValidityPassTest.php | 48 - .../Compiler/DecoratorServicePassTest.php | 199 -- .../DefinitionErrorExceptionPassTest.php | 51 - .../Compiler/ExtensionCompilerPassTest.php | 81 - .../Compiler/FactoryReturnTypePassTest.php | 123 - .../InlineServiceDefinitionsPassTest.php | 358 --- .../Tests/Compiler/IntegrationTest.php | 252 -- .../MergeExtensionConfigurationPassTest.php | 197 -- .../Tests/Compiler/OptionalServiceClass.php | 18 - .../Tests/Compiler/PassConfigTest.php | 38 - .../PriorityTaggedServiceTraitTest.php | 91 - .../RegisterEnvVarProcessorsPassTest.php | 86 - .../RegisterServiceSubscribersPassTest.php | 133 - .../RemoveUnusedDefinitionsPassTest.php | 137 - ...ReplaceAliasByActualDefinitionPassTest.php | 69 - .../Compiler/ResolveBindingsPassTest.php | 152 - .../ResolveChildDefinitionsPassTest.php | 449 --- .../Tests/Compiler/ResolveClassPassTest.php | 95 - .../ResolveDefinitionTemplatesPassTest.php | 407 --- .../Compiler/ResolveFactoryClassPassTest.php | 86 - .../Tests/Compiler/ResolveHotPathPassTest.php | 57 - .../ResolveInstanceofConditionalsPassTest.php | 262 -- .../ResolveInvalidReferencesPassTest.php | 135 - .../ResolveNamedArgumentsPassTest.php | 173 -- .../ResolveParameterPlaceHoldersPassTest.php | 100 - .../Compiler/ResolvePrivatesPassTest.php | 39 - .../ResolveReferencesToAliasesPassTest.php | 89 - .../ResolveTaggedIteratorArgumentPassTest.php | 40 - .../Compiler/ServiceLocatorTagPassTest.php | 145 - .../Config/AutowireServiceResourceTest.php | 124 - ...ContainerParametersResourceCheckerTest.php | 78 - .../ContainerParametersResourceTest.php | 43 - .../Tests/ContainerBuilderTest.php | 1536 ---------- .../Tests/ContainerTest.php | 692 ----- .../Tests/CrossCheckTest.php | 95 - .../Tests/DefinitionDecoratorTest.php | 128 - .../Tests/DefinitionTest.php | 387 --- .../Tests/Dumper/GraphvizDumperTest.php | 88 - .../Tests/Dumper/PhpDumperTest.php | 1184 -------- .../Tests/Dumper/XmlDumperTest.php | 210 -- .../Tests/Dumper/YamlDumperTest.php | 104 - .../Tests/EnvVarProcessorTest.php | 300 -- .../Tests/Extension/ExtensionTest.php | 57 - .../Tests/Fixtures/Bar.php | 26 - .../Tests/Fixtures/BarInterface.php | 16 - .../Tests/Fixtures/CaseSensitiveClass.php | 22 - ...tructorWithMandatoryArgumentsContainer.php | 10 - ...structorWithOptionalArgumentsContainer.php | 10 - .../ConstructorWithoutArgumentsContainer.php | 10 - .../Container/NoConstructorContainer.php | 9 - .../Tests/Fixtures/CustomDefinition.php | 18 - .../Tests/Fixtures/DeprecatedClass.php | 18 - .../Tests/Fixtures/FactoryDummy.php | 44 - .../FactoryDummyWithoutReturnTypes.php | 19 - .../Fixtures/FooForCircularWithAddCalls.php | 19 - .../Tests/Fixtures/NamedArgumentsDummy.php | 21 - .../Tests/Fixtures/ParentNotExists.php | 7 - .../Prototype/BadClasses/MissingParent.php | 7 - .../Tests/Fixtures/Prototype/Foo.php | 14 - .../Tests/Fixtures/Prototype/FooInterface.php | 7 - .../OtherDir/AnotherSub/DeeperBaz.php | 7 - .../Tests/Fixtures/Prototype/OtherDir/Baz.php | 7 - .../OtherDir/Component1/Dir1/Service1.php | 7 - .../OtherDir/Component1/Dir2/Service2.php | 7 - .../OtherDir/Component2/Dir1/Service4.php | 7 - .../OtherDir/Component2/Dir2/Service5.php | 7 - .../Tests/Fixtures/Prototype/Sub/Bar.php | 7 - .../Fixtures/Prototype/Sub/BarInterface.php | 7 - .../Tests/Fixtures/ScalarFactory.php | 14 - .../Tests/Fixtures/SimilarArgumentsDummy.php | 24 - .../Tests/Fixtures/StubbedTranslator.php | 28 - .../Tests/Fixtures/TestDefinition1.php | 18 - .../Tests/Fixtures/TestDefinition2.php | 9 - .../Tests/Fixtures/TestServiceSubscriber.php | 22 - .../Tests/Fixtures/array.json | 1 - .../Tests/Fixtures/config/basic.expected.yml | 10 - .../Tests/Fixtures/config/basic.php | 11 - .../Tests/Fixtures/config/child.expected.yml | 15 - .../Tests/Fixtures/config/child.php | 22 - .../Fixtures/config/defaults.expected.yml | 27 - .../Tests/Fixtures/config/defaults.php | 21 - .../config/factory_short_notation.php | 9 - .../Fixtures/config/instanceof.expected.yml | 21 - .../Tests/Fixtures/config/instanceof.php | 22 - .../Tests/Fixtures/config/php7.expected.yml | 19 - .../Tests/Fixtures/config/php7.php | 19 - .../Fixtures/config/prototype.expected.yml | 25 - .../Tests/Fixtures/config/prototype.php | 22 - .../Tests/Fixtures/config/services9.php | 128 - .../services_autoconfigure_with_parent.php | 9 - .../Fixtures/containers/CustomContainer.php | 17 - .../Tests/Fixtures/containers/container10.php | 15 - .../Tests/Fixtures/containers/container11.php | 13 - .../Tests/Fixtures/containers/container12.php | 13 - .../Tests/Fixtures/containers/container13.php | 18 - .../Tests/Fixtures/containers/container14.php | 17 - .../Tests/Fixtures/containers/container15.php | 12 - .../Tests/Fixtures/containers/container16.php | 12 - .../Tests/Fixtures/containers/container17.php | 11 - .../Tests/Fixtures/containers/container19.php | 27 - .../Tests/Fixtures/containers/container21.php | 21 - .../Tests/Fixtures/containers/container24.php | 13 - .../Tests/Fixtures/containers/container33.php | 12 - .../Tests/Fixtures/containers/container8.php | 25 - .../Tests/Fixtures/containers/container9.php | 176 -- .../containers/container_abstract.php | 13 - .../containers/container_almost_circular.php | 176 -- .../containers/container_env_in_id.php | 22 - .../containers/container_inline_requires.php | 19 - .../container_uninitialized_ref.php | 49 - .../Fixtures/directory/import/import.yml | 2 - .../Fixtures/directory/recurse/simple.ini | 2 - .../Fixtures/directory/recurse/simple.yml | 2 - .../Tests/Fixtures/directory/simple.php | 3 - .../Tests/Fixtures/graphviz/services1.dot | 7 - .../Tests/Fixtures/graphviz/services10-1.dot | 10 - .../Tests/Fixtures/graphviz/services10.dot | 10 - .../Tests/Fixtures/graphviz/services13.dot | 10 - .../Tests/Fixtures/graphviz/services14.dot | 7 - .../Tests/Fixtures/graphviz/services17.dot | 8 - .../Tests/Fixtures/graphviz/services18.dot | 8 - .../Tests/Fixtures/graphviz/services9.dot | 56 - .../Fixtures/graphviz/services_inline.dot | 10 - .../Tests/Fixtures/includes/FooVariadic.php | 16 - .../Tests/Fixtures/includes/HotPath/C1.php | 8 - .../Tests/Fixtures/includes/HotPath/C2.php | 7 - .../Tests/Fixtures/includes/HotPath/C3.php | 7 - .../Tests/Fixtures/includes/HotPath/I1.php | 7 - .../Tests/Fixtures/includes/HotPath/P1.php | 7 - .../Tests/Fixtures/includes/HotPath/T1.php | 7 - .../Fixtures/includes/ProjectExtension.php | 47 - .../includes/ProjectWithXsdExtension.php | 19 - .../ProjectWithXsdExtensionInPhar.phar | Bin 1161 -> 0 bytes .../Fixtures/includes/autowiring_classes.php | 336 --- .../Tests/Fixtures/includes/classes.php | 136 - .../Tests/Fixtures/includes/createphar.php | 47 - .../Tests/Fixtures/includes/foo.php | 43 - .../Fixtures/includes/schema/project-1.0.xsd | 13 - .../Tests/Fixtures/ini/almostvalid.ini | 2 - .../Tests/Fixtures/ini/ini_with_wrong_ext.xml | 2 - .../Tests/Fixtures/ini/nonvalid.ini | 2 - .../Tests/Fixtures/ini/parameters.ini | 3 - .../Tests/Fixtures/ini/parameters1.ini | 3 - .../Tests/Fixtures/ini/parameters2.ini | 2 - .../Tests/Fixtures/ini/types.ini | 28 - ...er_class_constructor_without_arguments.php | 58 - ...s_with_mandatory_constructor_arguments.php | 55 - ...ss_with_optional_constructor_arguments.php | 58 - ...om_container_class_without_constructor.php | 55 - .../Tests/Fixtures/php/php_with_wrong_ext.yml | 3 - .../Tests/Fixtures/php/services1-1.php | 55 - .../Tests/Fixtures/php/services1.php | 53 - .../Tests/Fixtures/php/services10.php | 157 - .../Tests/Fixtures/php/services12.php | 171 -- .../Tests/Fixtures/php/services13.php | 70 - .../Tests/Fixtures/php/services19.php | 181 -- .../Tests/Fixtures/php/services24.php | 66 - .../Tests/Fixtures/php/services26.php | 194 -- .../Tests/Fixtures/php/services33.php | 81 - .../Tests/Fixtures/php/services8.php | 167 -- .../Tests/Fixtures/php/services9.php | 443 --- .../Tests/Fixtures/php/services9_as_files.txt | 508 ---- .../Tests/Fixtures/php/services9_compiled.php | 475 --- .../Tests/Fixtures/php/services_adawson.php | 190 -- .../php/services_almost_circular_private.php | 514 ---- .../php/services_almost_circular_public.php | 640 ----- .../Fixtures/php/services_array_params.php | 176 -- .../Fixtures/php/services_base64_env.php | 151 - .../php/services_dedup_lazy_proxy.php | 88 - .../Fixtures/php/services_deep_graph.php | 93 - .../Tests/Fixtures/php/services_env_in_id.php | 188 -- .../Fixtures/php/services_inline_requires.php | 215 -- .../Fixtures/php/services_inline_self_ref.php | 78 - .../Fixtures/php/services_legacy_privates.php | 193 -- .../Tests/Fixtures/php/services_locator.php | 184 -- .../Fixtures/php/services_non_shared_lazy.php | 92 - .../Fixtures/php/services_private_frozen.php | 92 - .../php/services_private_in_expression.php | 82 - .../Tests/Fixtures/php/services_rot13_env.php | 180 -- .../Fixtures/php/services_subscriber.php | 106 - .../Tests/Fixtures/php/services_tsantos.php | 87 - .../php/services_uninitialized_ref.php | 134 - .../php/services_unsupported_characters.php | 178 -- .../Tests/Fixtures/php/simple.php | 3 - .../Tests/Fixtures/xml/class_from_id.xml | 6 - .../Tests/Fixtures/xml/defaults_bindings.xml | 15 - .../Tests/Fixtures/xml/defaults_bindings2.xml | 10 - .../Fixtures/xml/extension1/services.xml | 14 - .../Fixtures/xml/extension2/services.xml | 14 - .../Fixtures/xml/extensions/services1.xml | 19 - .../Fixtures/xml/extensions/services2.xml | 19 - .../Fixtures/xml/extensions/services3.xml | 19 - .../Fixtures/xml/extensions/services4.xml | 6 - .../Fixtures/xml/extensions/services5.xml | 11 - .../Fixtures/xml/extensions/services6.xml | 11 - .../Fixtures/xml/extensions/services7.xml | 11 - .../xml/legacy_invalid_alias_definition.xml | 11 - .../Tests/Fixtures/xml/namespaces.xml | 17 - .../xml/nested_service_without_id.xml | 10 - .../Tests/Fixtures/xml/nonvalid.xml | 3 - .../Tests/Fixtures/xml/services1.xml | 8 - .../Tests/Fixtures/xml/services10.xml | 16 - .../Tests/Fixtures/xml/services13.xml | 9 - .../Tests/Fixtures/xml/services14.xml | 19 - .../Tests/Fixtures/xml/services2.xml | 31 - .../Tests/Fixtures/xml/services21.xml | 24 - .../Tests/Fixtures/xml/services22.xml | 9 - .../Tests/Fixtures/xml/services23.xml | 6 - .../Tests/Fixtures/xml/services24.xml | 9 - .../Tests/Fixtures/xml/services28.xml | 13 - .../Tests/Fixtures/xml/services3.xml | 13 - .../Tests/Fixtures/xml/services4.xml | 14 - .../Fixtures/xml/services4_bad_import.xml | 9 - .../Tests/Fixtures/xml/services5.xml | 25 - .../Tests/Fixtures/xml/services6.xml | 69 - .../Tests/Fixtures/xml/services7.xml | 9 - .../Tests/Fixtures/xml/services8.xml | 38 - .../Tests/Fixtures/xml/services9.xml | 147 - .../Tests/Fixtures/xml/services_abstract.xml | 9 - .../Fixtures/xml/services_autoconfigure.xml | 9 - .../services_autoconfigure_with_parent.xml | 7 - .../Tests/Fixtures/xml/services_bindings.xml | 21 - .../xml/services_defaults_with_parent.xml | 9 - .../Fixtures/xml/services_deprecated.xml | 11 - .../Tests/Fixtures/xml/services_dump_load.xml | 11 - .../xml/services_inline_not_candidate.xml | 11 - .../Fixtures/xml/services_instanceof.xml | 12 - .../xml/services_instanceof_with_parent.xml | 9 - .../Fixtures/xml/services_named_args.xml | 12 - .../Tests/Fixtures/xml/services_prototype.xml | 6 - .../Tests/Fixtures/xml/services_tsantos.xml | 65 - .../Fixtures/xml/services_without_id.xml | 12 - .../Fixtures/xml/tag_with_empty_name.xml | 11 - .../Tests/Fixtures/xml/tag_without_name.xml | 11 - .../xml/with_key_outside_collection.xml | 9 - .../Tests/Fixtures/xml/withdoctype.xml | 3 - .../Tests/Fixtures/xml/xml_with_wrong_ext.php | 9 - .../Fixtures/yaml/anonymous_services.yml | 14 - .../yaml/anonymous_services_alias.yml | 7 - .../yaml/anonymous_services_in_instanceof.yml | 15 - .../yaml/anonymous_services_in_parameters.yml | 2 - .../Tests/Fixtures/yaml/bad_calls.yml | 4 - .../Tests/Fixtures/yaml/bad_decorates.yml | 7 - .../Fixtures/yaml/bad_empty_defaults.yml | 2 - .../Fixtures/yaml/bad_empty_instanceof.yml | 2 - .../Tests/Fixtures/yaml/bad_format.yml | 2 - .../Tests/Fixtures/yaml/bad_import.yml | 2 - .../Tests/Fixtures/yaml/bad_imports.yml | 2 - .../Tests/Fixtures/yaml/bad_parameters.yml | 2 - .../Tests/Fixtures/yaml/bad_service.yml | 2 - .../Tests/Fixtures/yaml/bad_services.yml | 1 - .../Tests/Fixtures/yaml/bad_types1.yml | 5 - .../Tests/Fixtures/yaml/bad_types2.yml | 5 - .../Tests/Fixtures/yaml/badtag1.yml | 5 - .../Tests/Fixtures/yaml/badtag2.yml | 6 - .../Tests/Fixtures/yaml/badtag3.yml | 6 - .../Tests/Fixtures/yaml/bar/services.yml | 4 - .../Tests/Fixtures/yaml/class_from_id.yml | 3 - .../Tests/Fixtures/yaml/defaults_bindings.yml | 11 - .../Fixtures/yaml/defaults_bindings2.yml | 7 - .../Tests/Fixtures/yaml/foo/services.yml | 4 - .../_child.yml | 4 - .../expected.yml | 10 - .../autoconfigure_child_not_applied/main.yml | 7 - .../autoconfigure_parent_child/_child.yml | 3 - .../autoconfigure_parent_child/expected.yml | 5 - .../autoconfigure_parent_child/main.yml | 7 - .../_child.yml | 3 - .../expected.yml | 6 - .../autoconfigure_parent_child_tags/main.yml | 7 - .../integration/child_parent/expected.yml | 9 - .../yaml/integration/child_parent/main.yml | 13 - .../defaults_child_tags/expected.yml | 8 - .../integration/defaults_child_tags/main.yml | 18 - .../expected.yml | 26 - .../defaults_instanceof_importance/main.yml | 30 - .../defaults_parent_child/_child.yml | 4 - .../defaults_parent_child/expected.yml | 6 - .../defaults_parent_child/main.yml | 9 - .../instanceof_parent_child/_child.yml | 4 - .../instanceof_parent_child/expected.yml | 7 - .../instanceof_parent_child/main.yml | 11 - .../yaml/legacy_invalid_alias_definition.yml | 5 - .../yaml/legacy_invalid_definition.yml | 10 - .../Tests/Fixtures/yaml/nonvalid1.yml | 2 - .../Tests/Fixtures/yaml/nonvalid2.yml | 1 - .../Tests/Fixtures/yaml/null_config.yml | 1 - .../Tests/Fixtures/yaml/services1.yml | 11 - .../Tests/Fixtures/yaml/services10.yml | 9 - .../Tests/Fixtures/yaml/services11.yml | 1 - .../Tests/Fixtures/yaml/services13.yml | 3 - .../Tests/Fixtures/yaml/services14.yml | 3 - .../Tests/Fixtures/yaml/services2.yml | 13 - .../Tests/Fixtures/yaml/services21.yml | 15 - .../Tests/Fixtures/yaml/services22.yml | 8 - .../Tests/Fixtures/yaml/services23.yml | 4 - .../Tests/Fixtures/yaml/services24.yml | 16 - .../Tests/Fixtures/yaml/services26.yml | 22 - .../Tests/Fixtures/yaml/services28.yml | 34 - .../Tests/Fixtures/yaml/services3.yml | 5 - .../Fixtures/yaml/services31_invalid_tags.yml | 6 - .../Tests/Fixtures/yaml/services4.yml | 8 - .../Fixtures/yaml/services4_bad_import.yml | 2 - .../Tests/Fixtures/yaml/services6.yml | 43 - .../Tests/Fixtures/yaml/services7.yml | 2 - .../Tests/Fixtures/yaml/services8.yml | 29 - .../Tests/Fixtures/yaml/services9.yml | 163 -- .../Tests/Fixtures/yaml/services_adawson.yml | 28 - .../Fixtures/yaml/services_autoconfigure.yml | 9 - .../services_autoconfigure_with_parent.yml | 8 - .../Tests/Fixtures/yaml/services_bindings.yml | 16 - .../services_configurator_short_syntax.yml | 8 - .../Fixtures/yaml/services_deep_graph.yml | 24 - .../yaml/services_defaults_with_parent.yml | 10 - .../Fixtures/yaml/services_dump_load.yml | 15 - .../Tests/Fixtures/yaml/services_inline.yml | 16 - .../Fixtures/yaml/services_instanceof.yml | 11 - .../yaml/services_instanceof_with_parent.yml | 11 - .../yaml/services_legacy_privates.yml | 27 - .../Fixtures/yaml/services_named_args.yml | 10 - .../Fixtures/yaml/services_prototype.yml | 4 - .../yaml/services_prototype_namespace.yml | 10 - ...s_prototype_namespace_without_resource.yml | 4 - .../Fixtures/yaml/services_underscore.yml | 3 - .../Fixtures/yaml/tag_name_empty_string.yml | 6 - .../Fixtures/yaml/tag_name_no_string.yml | 6 - .../Tests/Fixtures/yaml/tag_name_only.yml | 5 - .../Fixtures/yaml/yaml_with_wrong_ext.ini | 2 - .../RealServiceInstantiatorTest.php | 36 - .../LazyProxy/PhpDumper/NullDumperTest.php | 34 - .../Tests/Loader/ClosureLoaderTest.php | 38 - .../Tests/Loader/DirectoryLoaderTest.php | 78 - .../Tests/Loader/FileLoaderTest.php | 239 -- .../Tests/Loader/GlobFileLoaderTest.php | 44 - .../Tests/Loader/IniFileLoaderTest.php | 127 - .../Tests/Loader/LoaderResolverTest.php | 62 - .../Tests/Loader/PhpFileLoaderTest.php | 101 - .../Tests/Loader/XmlFileLoaderTest.php | 829 ------ .../Tests/Loader/YamlFileLoaderTest.php | 736 ----- .../EnvPlaceholderParameterBagTest.php | 159 - .../ParameterBag/FrozenParameterBagTest.php | 56 - .../Tests/ParameterBag/ParameterBagTest.php | 264 -- .../Tests/ParameterTest.php | 24 - .../Tests/ReferenceTest.php | 24 - .../Tests/ServiceLocatorTest.php | 148 - lib/symfony/dotenv/Tests/DotenvTest.php | 317 -- .../Tests/AbstractEventDispatcherTest.php | 442 --- .../ContainerAwareEventDispatcherTest.php | 210 -- .../Debug/TraceableEventDispatcherTest.php | 269 -- .../Tests/Debug/WrappedListenerTest.php | 64 - .../RegisterListenersPassTest.php | 143 - .../Tests/EventDispatcherTest.php | 22 - .../event-dispatcher/Tests/EventTest.php | 55 - .../Tests/GenericEventTest.php | 134 - .../Tests/ImmutableEventDispatcherTest.php | 100 - .../filesystem/Tests/ExceptionTest.php | 47 - .../filesystem/Tests/FilesystemTest.php | 1656 ----------- .../filesystem/Tests/FilesystemTestCase.php | 165 -- .../Tests/Fixtures/MockStream/MockStream.php | 46 - .../filesystem/Tests/LockHandlerTest.php | 144 - .../Tests/Comparator/ComparatorTest.php | 65 - .../Tests/Comparator/DateComparatorTest.php | 64 - .../Tests/Comparator/NumberComparatorTest.php | 108 - lib/symfony/finder/Tests/FinderTest.php | 752 ----- lib/symfony/finder/Tests/Fixtures/.dot/a | 0 .../finder/Tests/Fixtures/.dot/b/c.neon | 0 .../finder/Tests/Fixtures/.dot/b/d.neon | 0 .../finder/Tests/Fixtures/A/B/C/abc.dat | 0 lib/symfony/finder/Tests/Fixtures/A/B/ab.dat | 0 lib/symfony/finder/Tests/Fixtures/A/a.dat | 0 .../Tests/Fixtures/copy/A/B/C/abc.dat.copy | 0 .../Tests/Fixtures/copy/A/B/ab.dat.copy | 0 .../finder/Tests/Fixtures/copy/A/a.dat.copy | 0 lib/symfony/finder/Tests/Fixtures/dolor.txt | 2 - lib/symfony/finder/Tests/Fixtures/ipsum.txt | 2 - lib/symfony/finder/Tests/Fixtures/lorem.txt | 2 - lib/symfony/finder/Tests/Fixtures/one/.dot | 1 - lib/symfony/finder/Tests/Fixtures/one/a | 0 .../finder/Tests/Fixtures/one/b/c.neon | 0 .../finder/Tests/Fixtures/one/b/d.neon | 0 .../Fixtures/r+e.gex[c]a(r)s/dir/bar.dat | 0 .../finder/Tests/Fixtures/with space/foo.txt | 0 lib/symfony/finder/Tests/GlobTest.php | 95 - .../Iterator/CustomFilterIteratorTest.php | 44 - .../Iterator/DateRangeFilterIteratorTest.php | 74 - .../Iterator/DepthRangeFilterIteratorTest.php | 83 - .../ExcludeDirectoryFilterIteratorTest.php | 80 - .../Iterator/FileTypeFilterIteratorTest.php | 73 - .../FilecontentFilterIteratorTest.php | 86 - .../Iterator/FilenameFilterIteratorTest.php | 54 - .../Tests/Iterator/FilterIteratorTest.php | 53 - .../finder/Tests/Iterator/Iterator.php | 55 - .../Tests/Iterator/IteratorTestCase.php | 93 - .../Tests/Iterator/MockFileListIterator.php | 21 - .../finder/Tests/Iterator/MockSplFileInfo.php | 132 - .../MultiplePcreFilterIteratorTest.php | 71 - .../Tests/Iterator/PathFilterIteratorTest.php | 82 - .../Tests/Iterator/RealIteratorTestCase.php | 119 - .../RecursiveDirectoryIteratorTest.php | 59 - .../Iterator/SizeRangeFilterIteratorTest.php | 69 - .../Tests/Iterator/SortableIteratorTest.php | 179 -- .../Test/ForwardCompatTestTrait.php | 82 - .../framework-bundle/Test/KernelTestCase.php | 231 -- .../framework-bundle/Test/WebTestCase.php | 49 - .../AnnotationsCacheWarmerTest.php | 152 - .../CacheWarmer/ClassCacheCacheWarmerTest.php | 51 - .../CacheWarmer/SerializerCacheWarmerTest.php | 134 - .../Tests/CacheWarmer/TemplateFinderTest.php | 57 - .../TemplatePathsCacheWarmerTest.php | 102 - .../CacheWarmer/ValidatorCacheWarmerTest.php | 155 - .../framework-bundle/Tests/ClientTest.php | 65 - .../CacheClearCommandTest.php | 92 - .../Fixture/TestAppKernel.php | 43 - .../CacheClearCommand/Fixture/config.yml | 2 - .../Tests/Command/CachePruneCommandTest.php | 110 - .../Tests/Command/RouterDebugCommandTest.php | 123 - .../Tests/Command/RouterMatchCommandTest.php | 123 - .../Command/TranslationDebugCommandTest.php | 256 -- .../Command/TranslationUpdateCommandTest.php | 248 -- .../Tests/Command/YamlLintCommandTest.php | 182 -- .../Tests/Console/ApplicationTest.php | 261 -- .../Descriptor/AbstractDescriptorTest.php | 252 -- .../Console/Descriptor/JsonDescriptorTest.php | 27 - .../Descriptor/MarkdownDescriptorTest.php | 27 - .../Console/Descriptor/ObjectsProvider.php | 204 -- .../Console/Descriptor/TextDescriptorTest.php | 37 - .../Console/Descriptor/XmlDescriptorTest.php | 27 - .../Controller/AbstractControllerTest.php | 63 - .../Controller/ControllerNameParserTest.php | 192 -- .../Controller/ControllerResolverTest.php | 223 -- .../Tests/Controller/ControllerTest.php | 27 - .../Tests/Controller/ControllerTraitTest.php | 551 ---- .../Controller/RedirectControllerTest.php | 321 --- .../Controller/TemplateControllerTest.php | 88 - .../Compiler/AddCacheWarmerPassTest.php | 66 - .../Compiler/AddConsoleCommandPassTest.php | 120 - .../AddConstraintValidatorsPassTest.php | 73 - ...AddExpressionLanguageProvidersPassTest.php | 97 - .../Compiler/CacheCollectorPassTest.php | 49 - .../Compiler/CachePoolClearerPassTest.php | 61 - .../Compiler/CachePoolPassTest.php | 115 - .../Compiler/CachePoolPrunerPassTest.php | 70 - .../Compiler/ConfigCachePassTest.php | 59 - ...ontrollerArgumentValueResolverPassTest.php | 70 - .../DataCollectorTranslatorPassTest.php | 126 - .../Compiler/FormPassTest.php | 213 -- .../Compiler/LoggingTranslatorPassTest.php | 81 - .../Compiler/ProfilerPassTest.php | 57 - .../Compiler/PropertyInfoPassTest.php | 72 - .../Compiler/SerializerPassTest.php | 73 - .../Compiler/TranslatorPassTest.php | 53 - .../Compiler/UnusedTagsPassTest.php | 34 - .../WorkflowGuardListenerPassTest.php | 102 - .../DependencyInjection/ConfigurationTest.php | 496 ---- .../Resources/config/validation.xml | 0 .../Resources/config/validation.yml | 0 .../CustomPathBundle/src/CustomPathBundle.php | 22 - .../Resources/config/serialization.xml | 0 .../Resources/config/serialization.yml | 0 .../config/serializer_mapping/files/foo.xml | 0 .../config/serializer_mapping/files/foo.yml | 0 .../serializer_mapping/serialization.yaml | 0 .../serializer_mapping/serialization.yml | 0 .../Resources/config/validation.xml | 0 .../Resources/config/validation.yml | 0 .../config/validation_mapping/files/foo.xml | 0 .../config/validation_mapping/files/foo.yml | 0 .../config/validation_mapping/validation.yaml | 0 .../config/validation_mapping/validation.yml | 0 .../Fixtures/TestBundle/TestBundle.php | 18 - .../Fixtures/php/assets.php | 32 - .../Fixtures/php/assets_disabled.php | 7 - .../assets_version_strategy_as_service.php | 8 - .../Fixtures/php/cache.php | 29 - .../Fixtures/php/cache_env_var.php | 9 - .../DependencyInjection/Fixtures/php/csrf.php | 9 - .../Fixtures/php/csrf_needs_session.php | 7 - .../Fixtures/php/default_config.php | 3 - .../php/esi_and_ssi_without_fragments.php | 13 - .../Fixtures/php/esi_disabled.php | 7 - .../Fixtures/php/form_no_csrf.php | 9 - .../DependencyInjection/Fixtures/php/full.php | 84 - .../Fixtures/php/php_errors_disabled.php | 8 - .../Fixtures/php/php_errors_enabled.php | 8 - .../Fixtures/php/profiler.php | 7 - .../Fixtures/php/property_accessor.php | 8 - .../Fixtures/php/property_info.php | 7 - .../Fixtures/php/request.php | 7 - .../Fixtures/php/serializer_disabled.php | 7 - .../Fixtures/php/serializer_enabled.php | 7 - .../Fixtures/php/serializer_legacy_cache.php | 8 - .../Fixtures/php/serializer_mapping.php | 15 - .../Fixtures/php/session.php | 7 - .../Fixtures/php/ssi_disabled.php | 7 - .../Fixtures/php/templating_disabled.php | 5 - .../Fixtures/php/templating_no_assets.php | 7 - .../php/templating_php_assets_disabled.php | 8 - .../templating_php_translator_disabled.php | 8 - .../php/templating_php_translator_enabled.php | 8 - .../Fixtures/php/translator_fallbacks.php | 7 - .../Fixtures/php/validation_annotations.php | 9 - .../Fixtures/php/validation_mapping.php | 13 - .../validation_multiple_static_methods.php | 9 - .../php/validation_no_static_method.php | 9 - .../Fixtures/php/validation_strict_email.php | 7 - .../php/validation_translation_domain.php | 7 - .../Fixtures/php/web_link.php | 5 - .../workflow_with_arguments_and_service.php | 31 - .../php/workflow_with_guard_expression.php | 51 - ...th_multiple_transitions_with_same_name.php | 49 - ...flow_with_support_and_support_strategy.php | 31 - .../php/workflow_with_type_and_service.php | 31 - ...w_without_support_and_support_strategy.php | 27 - .../Fixtures/php/workflows.php | 111 - .../Fixtures/php/workflows_enabled.php | 5 - .../php/workflows_explicitly_enabled.php | 19 - ...ows_explicitly_enabled_named_workflows.php | 19 - .../Fixtures/php/workflows_without_type.php | 26 - .../Fixtures/translations/test_paths.en.yml | 2 - .../Fixtures/xml/assets.xml | 27 - .../Fixtures/xml/assets_disabled.xml | 12 - .../assets_version_strategy_as_service.xml | 14 - .../Fixtures/xml/cache.xml | 17 - .../Fixtures/xml/cache_env_var.xml | 17 - .../DependencyInjection/Fixtures/xml/csrf.xml | 14 - .../Fixtures/xml/csrf_disabled.xml | 12 - .../Fixtures/xml/csrf_needs_session.xml | 12 - .../Fixtures/xml/default_config.xml | 9 - .../xml/esi_and_ssi_without_fragments.xml | 13 - .../Fixtures/xml/esi_disabled.xml | 11 - .../xml/form_csrf_sets_field_name.xml | 14 - .../form_csrf_under_form_sets_field_name.xml | 14 - .../Fixtures/xml/form_no_csrf.xml | 14 - .../DependencyInjection/Fixtures/xml/full.xml | 47 - .../DependencyInjection/Fixtures/xml/lock.xml | 11 - .../Fixtures/xml/lock_named.xml | 22 - .../Fixtures/xml/php_errors_disabled.xml | 11 - .../Fixtures/xml/php_errors_enabled.xml | 11 - .../Fixtures/xml/profiler.xml | 12 - .../Fixtures/xml/property_accessor.xml | 12 - .../Fixtures/xml/property_info.xml | 11 - .../Fixtures/xml/request.xml | 11 - .../Fixtures/xml/serializer_disabled.xml | 11 - .../Fixtures/xml/serializer_enabled.xml | 11 - .../Fixtures/xml/serializer_legacy_cache.xml | 11 - .../Fixtures/xml/serializer_mapping.xml | 17 - .../Fixtures/xml/session.xml | 12 - .../Fixtures/xml/ssi_disabled.xml | 11 - .../Fixtures/xml/templating_disabled.xml | 11 - .../Fixtures/xml/templating_no_assets.xml | 14 - .../templating_php_translator_disabled.xml | 14 - .../xml/templating_php_translator_enabled.xml | 14 - .../Fixtures/xml/translator_fallbacks.xml | 15 - .../Fixtures/xml/validation_annotations.xml | 12 - .../Fixtures/xml/validation_mapping.xml | 16 - .../validation_multiple_static_methods.xml | 15 - .../xml/validation_no_static_method.xml | 12 - .../Fixtures/xml/validation_strict_email.xml | 11 - .../xml/validation_translation_domain.xml | 11 - .../Fixtures/xml/web_link.xml | 12 - .../workflow_with_arguments_and_service.xml | 24 - .../xml/workflow_with_guard_expression.xml | 48 - ...th_multiple_transitions_with_same_name.xml | 46 - ...flow_with_support_and_support_strategy.xml | 21 - .../xml/workflow_with_type_and_service.xml | 21 - ...w_without_support_and_support_strategy.xml | 20 - .../Fixtures/xml/workflows.xml | 94 - .../Fixtures/xml/workflows_enabled.xml | 11 - .../xml/workflows_explicitly_enabled.xml | 19 - ...ows_explicitly_enabled_named_workflows.xml | 19 - .../Fixtures/xml/workflows_without_type.xml | 21 - .../Fixtures/yml/assets.yml | 21 - .../Fixtures/yml/assets_disabled.yml | 3 - .../assets_version_strategy_as_service.yml | 4 - .../Fixtures/yml/cache.yml | 19 - .../Fixtures/yml/cache_env_var.yml | 6 - .../DependencyInjection/Fixtures/yml/csrf.yml | 5 - .../Fixtures/yml/csrf_needs_session.yml | 2 - .../Fixtures/yml/default_config.yml | 1 - .../yml/esi_and_ssi_without_fragments.yml | 7 - .../Fixtures/yml/esi_disabled.yml | 3 - .../Fixtures/yml/form_no_csrf.yml | 4 - .../DependencyInjection/Fixtures/yml/full.yml | 63 - .../DependencyInjection/Fixtures/yml/lock.yml | 2 - .../Fixtures/yml/lock_named.yml | 9 - .../Fixtures/yml/php_errors_disabled.yml | 3 - .../Fixtures/yml/php_errors_enabled.yml | 4 - .../Fixtures/yml/profiler.yml | 3 - .../Fixtures/yml/property_accessor.yml | 4 - .../Fixtures/yml/property_info.yml | 3 - .../Fixtures/yml/request.yml | 3 - .../Fixtures/yml/serializer_disabled.yml | 3 - .../Fixtures/yml/serializer_enabled.yml | 3 - .../Fixtures/yml/serializer_legacy_cache.yml | 4 - .../Fixtures/yml/serializer_mapping.yml | 10 - .../Fixtures/yml/session.yml | 3 - .../Fixtures/yml/ssi_disabled.yml | 3 - .../Fixtures/yml/templating_disabled.yml | 2 - .../Fixtures/yml/templating_no_assets.yml | 3 - .../yml/templating_php_assets_disabled.yml | 4 - .../templating_php_translator_disabled.yml | 4 - .../yml/templating_php_translator_enabled.yml | 4 - .../Fixtures/yml/translator_fallbacks.yml | 3 - .../Fixtures/yml/validation_annotations.yml | 5 - .../Fixtures/yml/validation_mapping.yml | 7 - .../validation_multiple_static_methods.yml | 5 - .../yml/validation_no_static_method.yml | 5 - .../Fixtures/yml/validation_strict_email.yml | 3 - .../yml/validation_translation_domain.yml | 3 - .../Fixtures/yml/web_link.yml | 3 - .../workflow_with_arguments_and_service.yml | 19 - .../yml/workflow_with_guard_expression.yml | 35 - ...th_multiple_transitions_with_same_name.yml | 33 - ...flow_with_support_and_support_strategy.yml | 17 - .../yml/workflow_with_type_and_service.yml | 17 - ...w_without_support_and_support_strategy.yml | 14 - .../Fixtures/yml/workflows.yml | 80 - .../Fixtures/yml/workflows_enabled.yml | 2 - .../yml/workflows_explicitly_enabled.yml | 16 - ...ows_explicitly_enabled_named_workflows.yml | 15 - .../Fixtures/yml/workflows_without_type.yml | 7 - .../FrameworkExtensionTest.php | 1263 -------- .../PhpFrameworkExtensionTest.php | 55 - .../XmlFrameworkExtensionTest.php | 30 - .../YamlFrameworkExtensionTest.php | 25 - .../config/serializer/foo.yml | 0 .../config/validator/foo.xml | 0 .../translations/test_default.en.xlf | 0 .../ResolveControllerNameSubscriberTest.php | 63 - .../Tests/Fixtures/BaseBundle/BaseBundle.php | 18 - .../Resources/views/base.format.engine | 0 .../views/controller/base.format.engine | 0 .../views/this.is.a.template.format.engine | 0 .../Tests/Fixtures/DeclaredClass.php | 7 - .../Tests/Fixtures/Descriptor/alias_1.json | 4 - .../Tests/Fixtures/Descriptor/alias_1.md | 2 - .../Tests/Fixtures/Descriptor/alias_1.txt | 3 - .../Tests/Fixtures/Descriptor/alias_1.xml | 2 - .../Tests/Fixtures/Descriptor/alias_2.json | 4 - .../Tests/Fixtures/Descriptor/alias_2.md | 2 - .../Tests/Fixtures/Descriptor/alias_2.txt | 3 - .../Tests/Fixtures/Descriptor/alias_2.xml | 2 - .../Descriptor/alias_with_definition_1.json | 20 - .../Descriptor/alias_with_definition_1.md | 17 - .../Descriptor/alias_with_definition_1.txt | 21 - .../Descriptor/alias_with_definition_1.xml | 5 - .../Descriptor/alias_with_definition_2.json | 41 - .../Descriptor/alias_with_definition_2.md | 25 - .../Descriptor/alias_with_definition_2.txt | 25 - .../Descriptor/alias_with_definition_2.xml | 18 - .../Fixtures/Descriptor/array_parameter.json | 3 - .../Fixtures/Descriptor/array_parameter.md | 4 - .../Fixtures/Descriptor/array_parameter.txt | 5 - .../Fixtures/Descriptor/array_parameter.xml | 2 - .../Descriptor/builder_1_arguments.json | 80 - .../Descriptor/builder_1_arguments.md | 34 - .../Descriptor/builder_1_arguments.txt | 12 - .../Descriptor/builder_1_arguments.xml | 27 - .../Fixtures/Descriptor/builder_1_public.json | 27 - .../Fixtures/Descriptor/builder_1_public.md | 33 - .../Fixtures/Descriptor/builder_1_public.txt | 12 - .../Fixtures/Descriptor/builder_1_public.xml | 8 - .../Descriptor/builder_1_services.json | 66 - .../Fixtures/Descriptor/builder_1_services.md | 59 - .../Descriptor/builder_1_services.txt | 14 - .../Descriptor/builder_1_services.xml | 25 - .../Fixtures/Descriptor/builder_1_tag1.json | 41 - .../Fixtures/Descriptor/builder_1_tag1.md | 26 - .../Fixtures/Descriptor/builder_1_tag1.txt | 11 - .../Fixtures/Descriptor/builder_1_tag1.xml | 19 - .../Fixtures/Descriptor/builder_1_tags.json | 38 - .../Fixtures/Descriptor/builder_1_tags.md | 39 - .../Fixtures/Descriptor/builder_1_tags.txt | 14 - .../Fixtures/Descriptor/builder_1_tags.xml | 19 - .../Tests/Fixtures/Descriptor/callable_1.json | 4 - .../Tests/Fixtures/Descriptor/callable_1.md | 3 - .../Tests/Fixtures/Descriptor/callable_1.txt | 1 - .../Tests/Fixtures/Descriptor/callable_1.xml | 2 - .../Tests/Fixtures/Descriptor/callable_2.json | 6 - .../Tests/Fixtures/Descriptor/callable_2.md | 5 - .../Tests/Fixtures/Descriptor/callable_2.txt | 1 - .../Tests/Fixtures/Descriptor/callable_2.xml | 2 - .../Tests/Fixtures/Descriptor/callable_3.json | 5 - .../Tests/Fixtures/Descriptor/callable_3.md | 4 - .../Tests/Fixtures/Descriptor/callable_3.txt | 1 - .../Tests/Fixtures/Descriptor/callable_3.xml | 2 - .../Tests/Fixtures/Descriptor/callable_4.json | 6 - .../Tests/Fixtures/Descriptor/callable_4.md | 5 - .../Tests/Fixtures/Descriptor/callable_4.txt | 1 - .../Tests/Fixtures/Descriptor/callable_4.xml | 2 - .../Tests/Fixtures/Descriptor/callable_5.json | 7 - .../Tests/Fixtures/Descriptor/callable_5.md | 6 - .../Tests/Fixtures/Descriptor/callable_5.txt | 1 - .../Tests/Fixtures/Descriptor/callable_5.xml | 2 - .../Tests/Fixtures/Descriptor/callable_6.json | 3 - .../Tests/Fixtures/Descriptor/callable_6.md | 2 - .../Tests/Fixtures/Descriptor/callable_6.txt | 1 - .../Tests/Fixtures/Descriptor/callable_6.xml | 2 - .../Tests/Fixtures/Descriptor/callable_7.json | 4 - .../Tests/Fixtures/Descriptor/callable_7.md | 3 - .../Tests/Fixtures/Descriptor/callable_7.txt | 1 - .../Tests/Fixtures/Descriptor/callable_7.xml | 2 - .../Descriptor/callable_from_callable.json | 5 - .../Descriptor/callable_from_callable.md | 4 - .../Descriptor/callable_from_callable.txt | 1 - .../Descriptor/callable_from_callable.xml | 2 - .../Fixtures/Descriptor/definition_1.json | 14 - .../Tests/Fixtures/Descriptor/definition_1.md | 10 - .../Fixtures/Descriptor/definition_1.txt | 17 - .../Fixtures/Descriptor/definition_1.xml | 4 - .../Fixtures/Descriptor/definition_2.json | 35 - .../Tests/Fixtures/Descriptor/definition_2.md | 18 - .../Fixtures/Descriptor/definition_2.txt | 21 - .../Fixtures/Descriptor/definition_2.xml | 17 - .../Descriptor/definition_arguments_1.json | 67 - .../Descriptor/definition_arguments_1.md | 11 - .../Descriptor/definition_arguments_1.txt | 22 - .../Descriptor/definition_arguments_1.xml | 23 - .../Descriptor/definition_arguments_2.json | 36 - .../Descriptor/definition_arguments_2.md | 19 - .../Descriptor/definition_arguments_2.txt | 21 - .../Descriptor/definition_arguments_2.xml | 17 - .../Descriptor/event_dispatcher_1_event1.json | 11 - .../Descriptor/event_dispatcher_1_event1.md | 12 - .../Descriptor/event_dispatcher_1_event1.txt | 11 - .../Descriptor/event_dispatcher_1_event1.xml | 5 - .../Descriptor/event_dispatcher_1_events.json | 20 - .../Descriptor/event_dispatcher_1_events.md | 22 - .../Descriptor/event_dispatcher_1_events.txt | 23 - .../Descriptor/event_dispatcher_1_events.xml | 10 - .../Tests/Fixtures/Descriptor/parameter.json | 3 - .../Tests/Fixtures/Descriptor/parameter.md | 4 - .../Tests/Fixtures/Descriptor/parameter.txt | 6 - .../Tests/Fixtures/Descriptor/parameter.xml | 2 - .../Fixtures/Descriptor/parameters_1.json | 10 - .../Tests/Fixtures/Descriptor/parameters_1.md | 7 - .../Fixtures/Descriptor/parameters_1.txt | 13 - .../Fixtures/Descriptor/parameters_1.xml | 7 - .../Tests/Fixtures/Descriptor/route_1.json | 20 - .../Tests/Fixtures/Descriptor/route_1.md | 15 - .../Tests/Fixtures/Descriptor/route_1.txt | 17 - .../Tests/Fixtures/Descriptor/route_1.xml | 20 - .../Tests/Fixtures/Descriptor/route_2.json | 16 - .../Tests/Fixtures/Descriptor/route_2.md | 13 - .../Tests/Fixtures/Descriptor/route_2.txt | 17 - .../Tests/Fixtures/Descriptor/route_2.xml | 14 - .../Descriptor/route_collection_1.json | 38 - .../Fixtures/Descriptor/route_collection_1.md | 37 - .../Descriptor/route_collection_1.txt | 7 - .../Descriptor/route_collection_1.xml | 35 - .../BaseBundle/views/base.format.engine | 0 .../views/controller/custom.format.engine | 0 .../Resources/translations/messages.fr.yml | 1 - .../Resources/views/resource.format.engine | 0 .../views/this.is.a.template.format.engine | 0 .../Resources/views/translation.html.php | 49 - .../Tests/Fixtures/Serialization/Author.php | 8 - .../Tests/Fixtures/Serialization/Person.php | 8 - .../Serialization/Resources/author.yml | 4 - .../Resources/does_not_exist.yaml | 1 - .../Serialization/Resources/person.xml | 13 - .../TemplatePathsCache/templates-empty.php | 2 - .../Fixtures/TemplatePathsCache/templates.php | 3 - .../Controller/DefaultController.php | 21 - .../Fabpot/FooBundle/FabpotFooBundle.php | 30 - .../Controller/DefaultController.php | 21 - .../Controller/Sub/DefaultController.php | 21 - .../Controller/Test/DefaultController.php | 21 - .../TestBundle/FooBundle/FooBundle.php | 23 - .../Controller/DefaultController.php | 21 - .../Cms/FooBundle/SensioCmsFooBundle.php | 23 - .../Controller/DefaultController.php | 21 - .../Sensio/FooBundle/SensioFooBundle.php | 23 - .../Tests/Fixtures/Validation/Article.php | 8 - .../Tests/Fixtures/Validation/Author.php | 8 - .../Tests/Fixtures/Validation/Category.php | 17 - .../Tests/Fixtures/Validation/Person.php | 8 - .../Fixtures/Validation/Resources/author.yml | 4 - .../Validation/Resources/categories.yml | 9 - .../Validation/Resources/does_not_exist.yaml | 1 - .../Fixtures/Validation/Resources/person.xml | 29 - .../Tests/Fixtures/Validation/SubCategory.php | 13 - .../Tests/Fixtures/WarmedClass.php | 7 - .../Tests/Fixtures/templates.php | 5 - .../Tests/Functional/AbstractWebTestCase.php | 73 - .../Functional/AnnotatedControllerTest.php | 39 - .../Tests/Functional/AutowiringTypesTest.php | 86 - .../AutowiringTypes/AutowiredServices.php | 61 - .../Controller/AnnotatedController.php | 51 - .../Controller/FragmentController.php | 57 - .../Controller/ProfilerController.php | 26 - .../Controller/SessionController.php | 81 - .../Controller/SubRequestController.php | 66 - .../SubRequestServiceResolutionController.php | 38 - .../AnnotationReaderPass.php | 24 - .../Config/CustomConfig.php | 31 - .../DependencyInjection/Configuration.php | 37 - .../DependencyInjection/TestExtension.php | 54 - .../TestBundle/Resources/config/routing.yml | 54 - .../Bundle/TestBundle/TestBundle.php | 33 - .../Functional/CachePoolClearCommandTest.php | 100 - .../Tests/Functional/CachePoolsTest.php | 103 - .../Functional/ConfigDebugCommandTest.php | 78 - .../ConfigDumpReferenceCommandTest.php | 85 - .../Functional/ContainerDebugCommandTest.php | 66 - .../Tests/Functional/ContainerDumpTest.php | 32 - .../Functional/DebugAutowiringCommandTest.php | 63 - .../Tests/Functional/FragmentTest.php | 38 - .../Tests/Functional/ProfilerTest.php | 46 - .../Tests/Functional/PropertyInfoTest.php | 35 - .../Tests/Functional/SerializerTest.php | 52 - .../Tests/Functional/SessionTest.php | 153 - .../Tests/Functional/SubRequestsTest.php | 31 - .../app/AnnotatedController/bundles.php | 18 - .../app/AnnotatedController/config.yml | 2 - .../app/AnnotatedController/routing.yml | 4 - .../Tests/Functional/app/AppKernel.php | 100 - .../app/AutowiringTypes/bundles.php | 18 - .../Functional/app/AutowiringTypes/config.yml | 11 - .../AutowiringTypes/no_annotations_cache.yml | 6 - .../Functional/app/CachePoolClear/bundles.php | 18 - .../Functional/app/CachePoolClear/config.yml | 22 - .../Functional/app/CachePools/bundles.php | 18 - .../Functional/app/CachePools/config.yml | 14 - .../app/CachePools/redis_config.yml | 17 - .../app/CachePools/redis_custom_config.yml | 28 - .../Functional/app/ConfigDump/bundles.php | 18 - .../Functional/app/ConfigDump/config.yml | 10 - .../Functional/app/ContainerDebug/bundles.php | 18 - .../Functional/app/ContainerDebug/config.yml | 10 - .../Functional/app/ContainerDump/bundles.php | 18 - .../Functional/app/ContainerDump/config.yml | 21 - .../ControllerServiceResolution/bundles.php | 18 - .../ControllerServiceResolution/config.yml | 10 - .../ControllerServiceResolution/routing.yml | 4 - .../Tests/Functional/app/Fragment/bundles.php | 18 - .../Tests/Functional/app/Fragment/config.yml | 7 - .../Tests/Functional/app/Fragment/routing.yml | 2 - .../Tests/Functional/app/Profiler/bundles.php | 18 - .../Tests/Functional/app/Profiler/config.yml | 7 - .../Tests/Functional/app/Profiler/routing.yml | 2 - .../app/Resources/views/fragment.html.php | 14 - .../Functional/app/Serializer/bundles.php | 16 - .../Functional/app/Serializer/config.yml | 10 - .../Tests/Functional/app/Session/bundles.php | 18 - .../Tests/Functional/app/Session/config.yml | 7 - .../Tests/Functional/app/Session/routing.yml | 2 - .../Tests/Functional/app/config/default.yml | 2 - .../Tests/Functional/app/config/framework.yml | 13 - .../Tests/Kernel/ConcreteMicroKernel.php | 113 - .../Tests/Kernel/MicroKernelTraitTest.php | 42 - .../Tests/Routing/DelegatingLoaderTest.php | 20 - .../Routing/RedirectableUrlMatcherTest.php | 61 - .../Tests/Routing/RouterTest.php | 275 -- .../Tests/Templating/DelegatingEngineTest.php | 123 - .../Tests/Templating/GlobalVariablesTest.php | 106 - .../Templating/Helper/AssetsHelperTest.php | 45 - .../Fixtures/StubTemplateNameParser.php | 43 - .../Helper/Fixtures/StubTranslator.php | 35 - .../Helper/FormHelperDivLayoutTest.php | 157 - .../Helper/FormHelperTableLayoutTest.php | 132 - .../Templating/Helper/RequestHelperTest.php | 54 - .../Resources/Child/form_label.html.php | 1 - .../Custom/_name_c_entry_label.html.php | 2 - .../Custom/_names_entry_label.html.php | 4 - .../Resources/Custom/_text_id_widget.html.php | 3 - .../Resources/Parent/form_label.html.php | 1 - .../Parent/form_widget_simple.html.php | 2 - .../Templating/Helper/SessionHelperTest.php | 75 - .../Templating/Helper/StopwatchHelperTest.php | 39 - .../Templating/Loader/TemplateLocatorTest.php | 96 - .../Tests/Templating/PhpEngineTest.php | 74 - .../Templating/TemplateFilenameParserTest.php | 56 - .../Templating/TemplateNameParserTest.php | 107 - .../Templating/TemplateReferenceTest.php | 28 - .../Tests/Templating/TemplateTest.php | 36 - .../Tests/Templating/TimedPhpEngineTest.php | 116 - .../framework-bundle/Tests/TestCase.php | 18 - .../Tests/Translation/PhpExtractorTest.php | 98 - .../Tests/Translation/TranslatorTest.php | 492 ---- .../ConstraintValidatorFactoryTest.php | 97 - .../Tests/AcceptHeaderItemTest.php | 113 - .../Tests/AcceptHeaderTest.php | 103 - .../Tests/ApacheRequestTest.php | 93 - .../Tests/BinaryFileResponseTest.php | 364 --- .../http-foundation/Tests/CookieTest.php | 246 -- .../Tests/ExpressionRequestMatcherTest.php | 67 - .../http-foundation/Tests/File/FakeFile.php | 45 - .../http-foundation/Tests/File/FileTest.php | 180 -- .../http-foundation/Tests/File/Fixtures/-test | Bin 35 -> 0 bytes .../Tests/File/Fixtures/.unknownextension | 1 - .../Fixtures/case-sensitive-mime-type.xlsm | Bin 4791 -> 0 bytes .../Tests/File/Fixtures/directory/.empty | 0 .../Tests/File/Fixtures/other-file.example | 0 .../http-foundation/Tests/File/Fixtures/test | Bin 35 -> 0 bytes .../Tests/File/Fixtures/test.gif | Bin 35 -> 0 bytes .../Tests/File/MimeType/MimeTypeTest.php | 99 - .../Tests/File/UploadedFileTest.php | 298 -- .../http-foundation/Tests/FileBagTest.php | 173 -- .../Fixtures/response-functional/common.inc | 43 - .../cookie_max_age.expected | 11 - .../response-functional/cookie_max_age.php | 10 - .../cookie_raw_urlencode.expected | 10 - .../cookie_raw_urlencode.php | 12 - .../cookie_samesite_lax.expected | 9 - .../cookie_samesite_lax.php | 8 - .../cookie_samesite_strict.expected | 9 - .../cookie_samesite_strict.php | 8 - .../cookie_urlencode.expected | 11 - .../response-functional/cookie_urlencode.php | 15 - .../invalid_cookie_name.expected | 6 - .../invalid_cookie_name.php | 11 - .../http-foundation/Tests/HeaderBagTest.php | 213 -- .../http-foundation/Tests/IpUtilsTest.php | 104 - .../Tests/JsonResponseTest.php | 262 -- .../Tests/ParameterBagTest.php | 194 -- .../Tests/RedirectResponseTest.php | 92 - .../Tests/RequestMatcherTest.php | 151 - .../Tests/RequestStackTest.php | 70 - .../http-foundation/Tests/RequestTest.php | 2451 ---------------- .../Tests/ResponseFunctionalTest.php | 58 - .../Tests/ResponseHeaderBagTest.php | 359 --- .../http-foundation/Tests/ResponseTest.php | 1008 ------- .../Tests/ResponseTestCase.php | 89 - .../http-foundation/Tests/ServerBagTest.php | 170 -- .../Session/Attribute/AttributeBagTest.php | 186 -- .../Attribute/NamespacedAttributeBagTest.php | 204 -- .../Session/Flash/AutoExpireFlashBagTest.php | 161 -- .../Tests/Session/Flash/FlashBagTest.php | 157 - .../Tests/Session/SessionTest.php | 288 -- .../Handler/AbstractSessionHandlerTest.php | 61 - .../Storage/Handler/Fixtures/common.inc | 151 - .../Handler/Fixtures/empty_destroys.expected | 17 - .../Handler/Fixtures/empty_destroys.php | 8 - .../Handler/Fixtures/read_only.expected | 14 - .../Storage/Handler/Fixtures/read_only.php | 8 - .../Handler/Fixtures/regenerate.expected | 24 - .../Storage/Handler/Fixtures/regenerate.php | 10 - .../Storage/Handler/Fixtures/storage.expected | 20 - .../Storage/Handler/Fixtures/storage.php | 24 - .../Handler/Fixtures/with_cookie.expected | 15 - .../Storage/Handler/Fixtures/with_cookie.php | 8 - .../Fixtures/with_cookie_and_session.expected | 24 - .../Fixtures/with_cookie_and_session.php | 13 - .../Handler/MemcacheSessionHandlerTest.php | 135 - .../Handler/MemcachedSessionHandlerTest.php | 145 - .../Handler/MongoDbSessionHandlerTest.php | 330 --- .../Handler/NativeFileSessionHandlerTest.php | 75 - .../Handler/NativeSessionHandlerTest.php | 38 - .../Handler/NullSessionHandlerTest.php | 59 - .../Storage/Handler/PdoSessionHandlerTest.php | 405 --- .../Handler/StrictSessionHandlerTest.php | 189 -- .../Handler/WriteCheckSessionHandlerTest.php | 97 - .../Tests/Session/Storage/MetadataBagTest.php | 139 - .../Storage/MockArraySessionStorageTest.php | 129 - .../Storage/MockFileSessionStorageTest.php | 125 - .../Storage/NativeSessionStorageTest.php | 288 -- .../Storage/PhpBridgeSessionStorageTest.php | 96 - .../Storage/Proxy/AbstractProxyTest.php | 113 - .../Session/Storage/Proxy/NativeProxyTest.php | 38 - .../Storage/Proxy/SessionHandlerProxyTest.php | 158 - .../Tests/StreamedResponseTest.php | 140 - .../Tests/schema/http-status-codes.rng | 31 - .../Tests/schema/iana-registry.rng | 198 -- .../http-kernel/Tests/Bundle/BundleTest.php | 105 - .../CacheClearer/ChainCacheClearerTest.php | 61 - .../CacheClearer/Psr6CacheClearerTest.php | 67 - .../CacheWarmer/CacheWarmerAggregateTest.php | 107 - .../Tests/CacheWarmer/CacheWarmerTest.php | 66 - lib/symfony/http-kernel/Tests/ClientTest.php | 179 -- .../Config/EnvParametersResourceTest.php | 110 - .../Tests/Config/FileLocatorTest.php | 48 - .../ServiceValueResolverTest.php | 130 - .../Tests/Controller/ArgumentResolverTest.php | 341 --- .../ContainerControllerResolverTest.php | 298 -- .../Controller/ControllerResolverTest.php | 325 --- .../ArgumentMetadataFactoryTest.php | 148 - .../ArgumentMetadataTest.php | 44 - .../Tests/DataCollector/Compiler.log | 4 - .../DataCollector/ConfigDataCollectorTest.php | 66 - .../Tests/DataCollector/DataCollectorTest.php | 38 - .../DataCollector/DumpDataCollectorTest.php | 135 - .../ExceptionDataCollectorTest.php | 59 - .../DataCollector/LoggerDataCollectorTest.php | 144 - .../DataCollector/MemoryDataCollectorTest.php | 59 - .../RequestDataCollectorTest.php | 334 --- .../DataCollector/TimeDataCollectorTest.php | 57 - .../DataCollector/Util/ValueExporterTest.php | 51 - .../Tests/Debug/FileLinkFormatterTest.php | 66 - .../Debug/TraceableEventDispatcherTest.php | 119 - .../AddAnnotatedClassesToCachePassTest.php | 99 - ...ontrollerArgumentValueResolverPassTest.php | 67 - .../FragmentRendererPassTest.php | 70 - .../LazyLoadingFragmentHandlerTest.php | 66 - .../DependencyInjection/LoggerPassTest.php | 56 - .../MergeExtensionConfigurationPassTest.php | 50 - ...sterControllerArgumentLocatorsPassTest.php | 397 --- ...mptyControllerArgumentLocatorsPassTest.php | 148 - .../ResettableServicePassTest.php | 76 - .../ServicesResetterTest.php | 42 - .../FilterControllerArgumentsEventTest.php | 17 - .../GetResponseForExceptionEventTest.php | 27 - .../AddRequestFormatsListenerTest.php | 84 - .../DebugHandlersListenerTest.php | 155 - .../Tests/EventListener/DumpListenerTest.php | 81 - .../EventListener/ExceptionListenerTest.php | 178 -- .../EventListener/FragmentListenerTest.php | 118 - .../EventListener/LocaleListenerTest.php | 102 - .../EventListener/ProfilerListenerTest.php | 70 - .../EventListener/ResponseListenerTest.php | 95 - .../EventListener/RouterListenerTest.php | 222 -- .../EventListener/SaveSessionListenerTest.php | 49 - .../EventListener/SessionListenerTest.php | 121 - .../EventListener/SurrogateListenerTest.php | 67 - .../EventListener/TestSessionListenerTest.php | 221 -- .../EventListener/TranslatorListenerTest.php | 118 - .../ValidateRequestListenerTest.php | 46 - .../AccessDeniedHttpExceptionTest.php | 13 - .../Exception/BadRequestHttpExceptionTest.php | 13 - .../Exception/ConflictHttpExceptionTest.php | 13 - .../Tests/Exception/GoneHttpExceptionTest.php | 13 - .../Tests/Exception/HttpExceptionTest.php | 53 - .../LengthRequiredHttpExceptionTest.php | 13 - .../MethodNotAllowedHttpExceptionTest.php | 24 - .../NotAcceptableHttpExceptionTest.php | 13 - .../Exception/NotFoundHttpExceptionTest.php | 13 - .../PreconditionFailedHttpExceptionTest.php | 13 - .../PreconditionRequiredHttpExceptionTest.php | 13 - .../ServiceUnavailableHttpExceptionTest.php | 29 - .../TooManyRequestsHttpExceptionTest.php | 29 - .../UnauthorizedHttpExceptionTest.php | 24 - .../UnprocessableEntityHttpExceptionTest.php | 13 - .../UnsupportedMediaTypeHttpExceptionTest.php | 13 - .../Tests/Fixtures/123/Kernel123.php | 37 - .../Fixtures/BaseBundle/Resources/foo.txt | 0 .../Fixtures/BaseBundle/Resources/hide.txt | 0 .../Fixtures/Bundle1Bundle/Resources/foo.txt | 0 .../Tests/Fixtures/Bundle1Bundle/bar.txt | 0 .../Tests/Fixtures/Bundle1Bundle/foo.txt | 0 .../Tests/Fixtures/Bundle2Bundle/foo.txt | 0 .../Fixtures/ChildBundle/Resources/foo.txt | 0 .../Fixtures/ChildBundle/Resources/hide.txt | 0 .../Tests/Fixtures/ClearableService.php | 13 - .../Controller/BasicTypesController.php | 19 - .../Fixtures/Controller/ExtendingRequest.php | 18 - .../Fixtures/Controller/ExtendingSession.php | 18 - .../Controller/NullableController.php | 19 - .../Controller/VariadicController.php | 19 - .../DataCollector/CloneVarDataCollector.php | 46 - .../ExtensionAbsentBundle.php | 18 - .../ExtensionNotValidExtension.php | 20 - .../ExtensionNotValidBundle.php | 18 - .../Command/FooCommand.php | 22 - .../ExtensionPresentExtension.php | 22 - .../ExtensionPresentBundle.php | 18 - .../Tests/Fixtures/KernelForOverrideName.php | 28 - .../Tests/Fixtures/KernelForTest.php | 42 - .../Tests/Fixtures/KernelWithoutBundles.php | 33 - .../Tests/Fixtures/ResettableService.php | 13 - .../Fixtures/Resources/BaseBundle/hide.txt | 0 .../Fixtures/Resources/Bundle1Bundle/foo.txt | 0 .../Fixtures/Resources/ChildBundle/foo.txt | 0 .../Fixtures/Resources/FooBundle/foo.txt | 0 .../http-kernel/Tests/Fixtures/TestClient.php | 31 - .../Fragment/EsiFragmentRendererTest.php | 114 - .../Tests/Fragment/FragmentHandlerTest.php | 93 - .../Fragment/HIncludeFragmentRendererTest.php | 100 - .../Fragment/InlineFragmentRendererTest.php | 318 -- .../Fragment/RoutableFragmentRendererTest.php | 94 - .../Fragment/SsiFragmentRendererTest.php | 93 - .../http-kernel/Tests/HttpCache/EsiTest.php | 244 -- .../Tests/HttpCache/HttpCacheTest.php | 1526 ---------- .../Tests/HttpCache/HttpCacheTestCase.php | 185 -- .../HttpCache/ResponseCacheStrategyTest.php | 469 --- .../http-kernel/Tests/HttpCache/SsiTest.php | 211 -- .../http-kernel/Tests/HttpCache/StoreTest.php | 301 -- .../Tests/HttpCache/SubRequestHandlerTest.php | 153 - .../Tests/HttpCache/TestHttpKernel.php | 102 - .../HttpCache/TestMultipleHttpKernel.php | 81 - .../http-kernel/Tests/HttpKernelTest.php | 395 --- lib/symfony/http-kernel/Tests/KernelTest.php | 1073 ------- .../http-kernel/Tests/Log/LoggerTest.php | 206 -- lib/symfony/http-kernel/Tests/Logger.php | 91 - .../Profiler/FileProfilerStorageTest.php | 350 --- .../Tests/Profiler/ProfilerTest.php | 105 - .../http-kernel/Tests/TestHttpKernel.php | 42 - .../http-kernel/Tests/UriSignerTest.php | 76 - .../routing/Tests/Annotation/RouteTest.php | 48 - .../routing/Tests/CompiledRouteTest.php | 27 - .../RoutingResolverPassTest.php | 36 - .../AnnotatedClasses/AbstractClass.php | 21 - .../Fixtures/AnnotatedClasses/BarClass.php | 19 - .../Fixtures/AnnotatedClasses/BazClass.php | 19 - .../AnnotatedClasses/EncodingClass.php | 10 - .../Fixtures/AnnotatedClasses/FooClass.php | 16 - .../Fixtures/AnnotatedClasses/FooTrait.php | 13 - .../Tests/Fixtures/CustomCompiledRoute.php | 18 - .../Tests/Fixtures/CustomRouteCompiler.php | 26 - .../Tests/Fixtures/CustomXmlFileLoader.php | 26 - .../AnonymousClassInTrait.php | 24 - .../OtherAnnotatedClasses/NoStartTagClass.php | 3 - .../OtherAnnotatedClasses/VariadicClass.php | 19 - .../Tests/Fixtures/RedirectableUrlMatcher.php | 30 - .../routing/Tests/Fixtures/annotated.php | 0 .../routing/Tests/Fixtures/bad_format.yml | 3 - lib/symfony/routing/Tests/Fixtures/bar.xml | 0 .../controller/import__controller.xml | 10 - .../controller/import__controller.yml | 4 - .../Fixtures/controller/import_controller.xml | 8 - .../Fixtures/controller/import_controller.yml | 3 - .../controller/import_override_defaults.xml | 10 - .../controller/import_override_defaults.yml | 5 - .../Fixtures/controller/override_defaults.xml | 10 - .../Fixtures/controller/override_defaults.yml | 5 - .../Tests/Fixtures/controller/routing.xml | 14 - .../Tests/Fixtures/controller/routing.yml | 11 - .../Fixtures/directory/recurse/routes1.yml | 2 - .../Fixtures/directory/recurse/routes2.yml | 2 - .../Tests/Fixtures/directory/routes3.yml | 2 - .../Fixtures/directory_import/import.yml | 3 - .../Tests/Fixtures/dumper/url_matcher0.php | 37 - .../Tests/Fixtures/dumper/url_matcher1.php | 318 -- .../Tests/Fixtures/dumper/url_matcher2.php | 380 --- .../Tests/Fixtures/dumper/url_matcher3.php | 55 - .../Tests/Fixtures/dumper/url_matcher4.php | 112 - .../Tests/Fixtures/dumper/url_matcher5.php | 209 -- .../Tests/Fixtures/dumper/url_matcher6.php | 213 -- .../Tests/Fixtures/dumper/url_matcher7.php | 249 -- lib/symfony/routing/Tests/Fixtures/empty.yml | 0 .../routing/Tests/Fixtures/file_resource.yml | 0 lib/symfony/routing/Tests/Fixtures/foo.xml | 0 lib/symfony/routing/Tests/Fixtures/foo1.xml | 0 .../routing/Tests/Fixtures/glob/bar.xml | 8 - .../routing/Tests/Fixtures/glob/bar.yml | 4 - .../routing/Tests/Fixtures/glob/baz.xml | 8 - .../routing/Tests/Fixtures/glob/baz.yml | 4 - .../Tests/Fixtures/glob/import_multiple.xml | 8 - .../Tests/Fixtures/glob/import_multiple.yml | 2 - .../Tests/Fixtures/glob/import_single.xml | 8 - .../Tests/Fixtures/glob/import_single.yml | 2 - .../routing/Tests/Fixtures/glob/php_dsl.php | 7 - .../Tests/Fixtures/glob/php_dsl_bar.php | 12 - .../Tests/Fixtures/glob/php_dsl_baz.php | 12 - .../routing/Tests/Fixtures/incomplete.yml | 2 - .../routing/Tests/Fixtures/list_defaults.xml | 20 - .../Tests/Fixtures/list_in_list_defaults.xml | 22 - .../Tests/Fixtures/list_in_map_defaults.xml | 22 - .../Tests/Fixtures/list_null_values.xml | 22 - .../routing/Tests/Fixtures/localized/utf8.xml | 13 - .../routing/Tests/Fixtures/map_defaults.xml | 20 - .../Tests/Fixtures/map_in_list_defaults.xml | 22 - .../Tests/Fixtures/map_in_map_defaults.xml | 22 - .../Tests/Fixtures/map_null_values.xml | 22 - .../routing/Tests/Fixtures/missing_id.xml | 8 - .../routing/Tests/Fixtures/missing_path.xml | 8 - .../Tests/Fixtures/namespaceprefix.xml | 16 - .../Fixtures/nonesense_resource_plus_path.yml | 3 - .../nonesense_type_without_resource.yml | 3 - .../routing/Tests/Fixtures/nonvalid.xml | 10 - .../routing/Tests/Fixtures/nonvalid.yml | 1 - .../routing/Tests/Fixtures/nonvalid2.yml | 1 - .../routing/Tests/Fixtures/nonvalidkeys.yml | 3 - .../routing/Tests/Fixtures/nonvalidnode.xml | 8 - .../routing/Tests/Fixtures/nonvalidroute.xml | 12 - .../routing/Tests/Fixtures/null_values.xml | 12 - .../routing/Tests/Fixtures/php_dsl.php | 22 - .../routing/Tests/Fixtures/php_dsl_sub.php | 14 - .../Tests/Fixtures/scalar_defaults.xml | 33 - .../Tests/Fixtures/special_route_name.yml | 2 - .../routing/Tests/Fixtures/validpattern.php | 18 - .../routing/Tests/Fixtures/validpattern.xml | 15 - .../routing/Tests/Fixtures/validpattern.yml | 13 - .../routing/Tests/Fixtures/validresource.php | 18 - .../routing/Tests/Fixtures/validresource.xml | 13 - .../routing/Tests/Fixtures/validresource.yml | 8 - .../Fixtures/with_define_path_variable.php | 5 - .../routing/Tests/Fixtures/withdoctype.xml | 3 - .../Dumper/PhpGeneratorDumperTest.php | 177 -- .../Tests/Generator/UrlGeneratorTest.php | 747 ----- .../Loader/AbstractAnnotationLoaderTest.php | 33 - .../Loader/AnnotationClassLoaderTest.php | 348 --- .../Loader/AnnotationDirectoryLoaderTest.php | 110 - .../Tests/Loader/AnnotationFileLoaderTest.php | 94 - .../Tests/Loader/ClosureLoaderTest.php | 49 - .../Tests/Loader/DirectoryLoaderTest.php | 74 - .../Tests/Loader/GlobFileLoaderTest.php | 45 - .../Tests/Loader/ObjectRouteLoaderTest.php | 117 - .../Tests/Loader/PhpFileLoaderTest.php | 133 - .../Tests/Loader/XmlFileLoaderTest.php | 399 --- .../Tests/Loader/YamlFileLoaderTest.php | 202 -- .../DumpedRedirectableUrlMatcherTest.php | 43 - .../Tests/Matcher/DumpedUrlMatcherTest.php | 44 - .../Matcher/Dumper/DumperCollectionTest.php | 34 - .../Matcher/Dumper/PhpMatcherDumperTest.php | 454 --- .../Dumper/StaticPrefixCollectionTest.php | 175 -- .../Matcher/RedirectableUrlMatcherTest.php | 150 - .../Tests/Matcher/TraceableUrlMatcherTest.php | 126 - .../routing/Tests/Matcher/UrlMatcherTest.php | 616 ---- .../routing/Tests/RequestContextTest.php | 160 -- .../Tests/RouteCollectionBuilderTest.php | 362 --- .../routing/Tests/RouteCollectionTest.php | 305 -- .../routing/Tests/RouteCompilerTest.php | 379 --- lib/symfony/routing/Tests/RouteTest.php | 258 -- lib/symfony/routing/Tests/RouterTest.php | 157 - .../stopwatch/Tests/StopwatchEventTest.php | 210 -- .../stopwatch/Tests/StopwatchPeriodTest.php | 67 - lib/symfony/stopwatch/Tests/StopwatchTest.php | 182 -- .../twig-bridge/Tests/AppVariableTest.php | 264 -- .../Tests/Command/DebugCommandTest.php | 125 - .../Tests/Command/LintCommandTest.php | 127 - ...AbstractBootstrap3HorizontalLayoutTest.php | 166 -- .../AbstractBootstrap3LayoutTest.php | 2546 ----------------- ...AbstractBootstrap4HorizontalLayoutTest.php | 217 -- .../AbstractBootstrap4LayoutTest.php | 986 ------- .../Tests/Extension/CodeExtensionTest.php | 69 - .../Tests/Extension/DumpExtensionTest.php | 145 - .../Extension/ExpressionExtensionTest.php | 30 - .../Fixtures/StubFilesystemLoader.php | 25 - .../Extension/Fixtures/StubTranslator.php | 35 - .../templates/form/child_label.html.twig | 3 - .../templates/form/custom_widgets.html.twig | 19 - .../form/page_dynamic_extends.html.twig | 1 - .../templates/form/parent_label.html.twig | 3 - .../Fixtures/templates/form/theme.html.twig | 4 - .../templates/form/theme_extends.html.twig | 6 - .../templates/form/theme_use.html.twig | 6 - ...xtensionBootstrap3HorizontalLayoutTest.php | 106 - .../FormExtensionBootstrap3LayoutTest.php | 156 - ...xtensionBootstrap4HorizontalLayoutTest.php | 108 - .../FormExtensionBootstrap4LayoutTest.php | 160 -- .../Extension/FormExtensionDivLayoutTest.php | 258 -- .../FormExtensionTableLayoutTest.php | 130 - .../Tests/Extension/FormExtensionTest.php | 76 - .../Extension/HttpFoundationExtensionTest.php | 143 - .../Extension/HttpKernelExtensionTest.php | 86 - .../Tests/Extension/RoutingExtensionTest.php | 54 - .../Tests/Extension/RuntimeLoaderProvider.php | 27 - .../Extension/StopwatchExtensionTest.php | 74 - .../Extension/TranslationExtensionTest.php | 213 -- .../Tests/Extension/WebLinkExtensionTest.php | 92 - .../Tests/Extension/WorkflowExtensionTest.php | 83 - .../Fixtures/extractor/syntax_error.twig | 1 - .../extractor/with_translations.html.twig | 1 - .../twig-bridge/Tests/Node/DumpNodeTest.php | 128 - .../twig-bridge/Tests/Node/FormThemeTest.php | 111 - .../Node/SearchAndRenderBlockNodeTest.php | 280 -- .../twig-bridge/Tests/Node/TransNodeTest.php | 66 - .../Tests/NodeVisitor/ScopeTest.php | 25 - ...ranslationDefaultDomainNodeVisitorTest.php | 93 - .../TranslationNodeVisitorTest.php | 67 - .../Tests/NodeVisitor/TwigNodeProvider.php | 88 - .../TokenParser/FormThemeTokenParserTest.php | 123 - .../Tests/Translation/TwigExtractorTest.php | 140 - .../twig-bridge/Tests/TwigEngineTest.php | 79 - .../Tests/ContainerAwareRuntimeLoaderTest.php | 41 - .../Controller/ExceptionControllerTest.php | 92 - .../Controller/PreviewErrorControllerTest.php | 53 - .../Compiler/ExtensionPassTest.php | 46 - .../Compiler/TwigEnvironmentPassTest.php | 45 - .../Compiler/TwigLoaderPassTest.php | 95 - .../DependencyInjection/ConfigurationTest.php | 31 - .../Resources/views/layout.html.twig | 1 - .../Resources/views/layout.html.twig | 1 - .../Resources/views/layout.html.twig | 1 - .../Resources/views/layout.html.twig | 1 - .../TwigBundle/views/layout.html.twig | 1 - .../Fixtures/Resources/views/layout.html.twig | 1 - .../php/customTemplateEscapingGuesser.php | 6 - .../Fixtures/php/empty.php | 3 - .../Fixtures/php/extra.php | 7 - .../Fixtures/php/formats.php | 14 - .../DependencyInjection/Fixtures/php/full.php | 27 - .../bundles/BarBundle/layout.html.twig | 1 - .../bundles/TwigBundle/layout.html.twig | 1 - .../Fixtures/templates/layout.html.twig | 1 - .../xml/customTemplateEscapingGuesser.xml | 10 - .../Fixtures/xml/empty.xml | 10 - .../Fixtures/xml/extra.xml | 12 - .../Fixtures/xml/formats.xml | 12 - .../DependencyInjection/Fixtures/xml/full.xml | 19 - .../yml/customTemplateEscapingGuesser.yml | 3 - .../Fixtures/yml/empty.yml | 1 - .../Fixtures/yml/extra.yml | 3 - .../Fixtures/yml/formats.yml | 9 - .../DependencyInjection/Fixtures/yml/full.yml | 21 - .../DependencyInjection/TwigExtensionTest.php | 355 --- .../BarBundle/Resources/views/index.html.twig | 1 - .../Fixtures/templates/Foo/index.html.twig | 1 - .../Resources/BarBundle/views/base.html.twig | 0 .../Resources/views/layout.html.twig | 1 - .../Resources/views/sub/sub.html.twig | 1 - .../Tests/Functional/CacheWarmingTest.php | 124 - .../Tests/Functional/EmptyAppTest.php | 51 - .../Functional/NoTemplatingEntryTest.php | 80 - .../Resources/config/empty_routing.yml | 0 .../Resources/views/index.html.twig | 1 - .../Tests/Loader/FilesystemLoaderTest.php | 125 - .../Tests/TemplateIteratorTest.php | 44 - lib/symfony/twig-bundle/Tests/TestCase.php | 18 - .../var-dumper/Test/VarDumperTestTrait.php | 63 - .../var-dumper/Tests/Caster/CasterTest.php | 181 -- .../Tests/Caster/DateCasterTest.php | 426 --- .../Tests/Caster/ExceptionCasterTest.php | 227 -- .../var-dumper/Tests/Caster/PdoCasterTest.php | 64 - .../Tests/Caster/RedisCasterTest.php | 84 - .../Tests/Caster/ReflectionCasterTest.php | 270 -- .../var-dumper/Tests/Caster/SplCasterTest.php | 232 -- .../Tests/Caster/StubCasterTest.php | 192 -- .../Tests/Caster/XmlReaderCasterTest.php | 248 -- .../var-dumper/Tests/Cloner/DataTest.php | 115 - .../var-dumper/Tests/Cloner/VarClonerTest.php | 505 ---- .../var-dumper/Tests/Dumper/CliDumperTest.php | 591 ---- .../var-dumper/Tests/Dumper/FunctionsTest.php | 57 - .../Tests/Dumper/HtmlDumperTest.php | 168 -- .../Tests/Fixtures/FooInterface.php | 11 - .../Tests/Fixtures/GeneratorDemo.php | 21 - .../Tests/Fixtures/NotLoadableClass.php | 7 - .../var-dumper/Tests/Fixtures/Php74.php | 14 - .../var-dumper/Tests/Fixtures/Twig.php | 38 - .../var-dumper/Tests/Fixtures/dumb-var.php | 40 - .../var-dumper/Tests/Fixtures/xml_reader.xml | 10 - .../Tests/Test/VarDumperTestTraitTest.php | 41 - .../Controller/ProfilerControllerTest.php | 200 -- .../Csp/ContentSecurityPolicyHandlerTest.php | 207 -- .../DependencyInjection/ConfigurationTest.php | 64 - .../WebProfilerExtensionTest.php | 136 - .../WebDebugToolbarListenerTest.php | 341 --- .../Tests/Fixtures/profile.data | 1 - .../Tests/Profiler/TemplateManagerTest.php | 171 -- .../Tests/Resources/IconTest.php | 30 - .../web-profiler-bundle/Tests/TestCase.php | 18 - .../yaml/Tests/Command/LintCommandTest.php | 137 - lib/symfony/yaml/Tests/DumperTest.php | 606 ---- .../yaml/Tests/Fixtures/YtsAnchorAlias.yml | 31 - .../yaml/Tests/Fixtures/YtsBasicTests.yml | 202 -- .../yaml/Tests/Fixtures/YtsBlockMapping.yml | 51 - .../Tests/Fixtures/YtsDocumentSeparator.yml | 85 - .../yaml/Tests/Fixtures/YtsErrorTests.yml | 25 - .../Tests/Fixtures/YtsFlowCollections.yml | 60 - .../yaml/Tests/Fixtures/YtsFoldedScalars.yml | 176 -- .../Tests/Fixtures/YtsNullsAndEmpties.yml | 45 - .../Fixtures/YtsSpecificationExamples.yml | 1701 ----------- .../yaml/Tests/Fixtures/YtsTypeTransfers.yml | 266 -- lib/symfony/yaml/Tests/Fixtures/arrow.gif | Bin 185 -> 0 bytes .../Tests/Fixtures/booleanMappingKeys.yml | 11 - .../yaml/Tests/Fixtures/embededPhp.yml | 1 - .../yaml/Tests/Fixtures/escapedCharacters.yml | 155 - lib/symfony/yaml/Tests/Fixtures/index.yml | 18 - .../Fixtures/legacyBooleanMappingKeys.yml | 23 - .../Tests/Fixtures/legacyNonStringKeys.yml | 2 - .../Tests/Fixtures/legacyNullMappingKey.yml | 9 - .../multiple_lines_as_literal_block.yml | 14 - ...eral_block_leading_space_in_first_line.yml | 4 - .../yaml/Tests/Fixtures/nonStringKeys.yml | 3 - .../yaml/Tests/Fixtures/not_readable.yml | 18 - .../yaml/Tests/Fixtures/nullMappingKey.yml | 9 - .../Tests/Fixtures/numericMappingKeys.yml | 23 - .../yaml/Tests/Fixtures/sfComments.yml | 76 - lib/symfony/yaml/Tests/Fixtures/sfCompact.yml | 159 - .../yaml/Tests/Fixtures/sfMergeKey.yml | 61 - lib/symfony/yaml/Tests/Fixtures/sfObjects.yml | 11 - lib/symfony/yaml/Tests/Fixtures/sfQuotes.yml | 33 - lib/symfony/yaml/Tests/Fixtures/sfTests.yml | 140 - .../Tests/Fixtures/unindentedCollections.yml | 82 - lib/symfony/yaml/Tests/InlineTest.php | 784 ----- lib/symfony/yaml/Tests/ParseExceptionTest.php | 34 - lib/symfony/yaml/Tests/ParserTest.php | 2319 --------------- lib/symfony/yaml/Tests/YamlTest.php | 40 - .../Twig/Node/Expression/Test/Constant.php | 11 - .../lib/Twig/Node/Expression/Test/Defined.php | 11 - .../Twig/Node/Expression/Test/Divisibleby.php | 11 - .../lib/Twig/Node/Expression/Test/Even.php | 11 - .../lib/Twig/Node/Expression/Test/Null.php | 11 - .../lib/Twig/Node/Expression/Test/Odd.php | 11 - .../lib/Twig/Node/Expression/Test/Sameas.php | 11 - lib/twig/twig/lib/Twig/Test/Function.php | 38 - .../lib/Twig/Test/IntegrationTestCase.php | 11 - lib/twig/twig/lib/Twig/Test/Method.php | 42 - lib/twig/twig/lib/Twig/Test/Node.php | 40 - lib/twig/twig/lib/Twig/Test/NodeTestCase.php | 11 - .../src/Node/Expression/Test/ConstantTest.php | 51 - .../src/Node/Expression/Test/DefinedTest.php | 71 - .../Node/Expression/Test/DivisiblebyTest.php | 38 - .../src/Node/Expression/Test/EvenTest.php | 37 - .../src/Node/Expression/Test/NullTest.php | 36 - .../twig/src/Node/Expression/Test/OddTest.php | 37 - .../src/Node/Expression/Test/SameasTest.php | 36 - 1896 files changed, 5 insertions(+), 134443 deletions(-) delete mode 100644 lib/pear/pear_exception/tests/PEAR/ExceptionTest.php delete mode 100644 lib/psr/log/Psr/Log/Test/LoggerInterfaceTest.php delete mode 100644 lib/psr/log/Psr/Log/Test/TestLogger.php delete mode 100644 lib/symfony/cache/Tests/Adapter/AbstractRedisAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/AdapterTestCase.php delete mode 100644 lib/symfony/cache/Tests/Adapter/ApcuAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/ArrayAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/ChainAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/DoctrineAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/FilesystemAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/MemcachedAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/NamespacedProxyAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/NullAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/PdoAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/PdoDbalAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/PhpArrayAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/PhpFilesAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/PredisAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/PredisClusterAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/PredisRedisClusterAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/ProxyAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/RedisAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/RedisArrayAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/RedisClusterAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/SimpleCacheAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/TagAwareAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/TraceableAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/Adapter/TraceableTagAwareAdapterTest.php delete mode 100644 lib/symfony/cache/Tests/CacheItemTest.php delete mode 100644 lib/symfony/cache/Tests/DoctrineProviderTest.php delete mode 100644 lib/symfony/cache/Tests/Fixtures/ArrayCache.php delete mode 100644 lib/symfony/cache/Tests/Fixtures/ExternalAdapter.php delete mode 100644 lib/symfony/cache/Tests/Simple/AbstractRedisCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/ApcuCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/ArrayCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/CacheTestCase.php delete mode 100644 lib/symfony/cache/Tests/Simple/ChainCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/DoctrineCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/FilesystemCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/MemcachedCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/MemcachedCacheTextModeTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/NullCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/PdoCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/PdoDbalCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/PhpArrayCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/PhpFilesCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/Psr6CacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/RedisArrayCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/RedisCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/RedisClusterCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Simple/TraceableCacheTest.php delete mode 100644 lib/symfony/cache/Tests/Traits/PdoPruneableTrait.php delete mode 100644 lib/symfony/class-loader/Tests/ApcClassLoaderTest.php delete mode 100644 lib/symfony/class-loader/Tests/ClassCollectionLoaderTest.php delete mode 100644 lib/symfony/class-loader/Tests/ClassLoaderTest.php delete mode 100644 lib/symfony/class-loader/Tests/ClassMapGeneratorTest.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/Baz.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/FooBar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/Pearlike/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/Pearlike/Baz.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/Pearlike/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/alpha/Apc/ApcPrefixCollision/A/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/alpha/Apc/ApcPrefixCollision/A/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/fallback/Apc/Pearlike/FooBar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Apc/fallback/Namespaced/FooBar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/A.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/ATrait.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/B.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/BTrait.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/CInterface.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/CTrait.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/D.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/E.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/F.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/G.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/GInterface.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/DeclaredClass.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/DeclaredInterface.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Namespaced/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Namespaced/Baz.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Namespaced/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Namespaced/WithComments.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Namespaced/WithDirMagic.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Namespaced/WithFileMagic.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Namespaced/WithHaltCompiler.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Namespaced/WithStrictTypes.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Namespaced2/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Namespaced2/Baz.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Namespaced2/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Pearlike/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Pearlike/Baz.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Pearlike/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Pearlike/WithComments.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Pearlike2/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Pearlike2/Baz.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/Pearlike2/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/WarmedClass.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/WarmedInterface.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/alpha/NamespaceCollision/A/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/alpha/NamespaceCollision/A/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/alpha/NamespaceCollision/C/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/alpha/NamespaceCollision/C/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/alpha/PrefixCollision/A/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/alpha/PrefixCollision/A/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/alpha/PrefixCollision/C/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/alpha/PrefixCollision/C/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/beta/NamespaceCollision/A/B/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/beta/NamespaceCollision/A/B/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/beta/NamespaceCollision/C/B/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/beta/NamespaceCollision/C/B/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/beta/PrefixCollision/A/B/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/beta/PrefixCollision/A/B/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/beta/PrefixCollision/C/B/Bar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/beta/PrefixCollision/C/B/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/classmap/SomeClass.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/classmap/SomeInterface.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/classmap/SomeParent.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/classmap/multipleNs.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/classmap/notAClass.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/classmap/notPhpFile.md delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/classmap/sameNsMultipleClasses.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/deps/traits.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/fallback/Namespaced/FooBar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/fallback/Namespaced2/FooBar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/fallback/Pearlike/FooBar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/fallback/Pearlike2/FooBar.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/includepath/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/php5.4/traits.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/php5.5/class_cons.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/psr-4/Class_With_Underscores.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/psr-4/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/psr-4/Lets/Go/Deeper/Class_With_Underscores.php delete mode 100644 lib/symfony/class-loader/Tests/Fixtures/psr-4/Lets/Go/Deeper/Foo.php delete mode 100644 lib/symfony/class-loader/Tests/Psr4ClassLoaderTest.php delete mode 100644 lib/symfony/config/Tests/ConfigCacheFactoryTest.php delete mode 100644 lib/symfony/config/Tests/ConfigCacheTest.php delete mode 100644 lib/symfony/config/Tests/Definition/ArrayNodeTest.php delete mode 100644 lib/symfony/config/Tests/Definition/BooleanNodeTest.php delete mode 100644 lib/symfony/config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php delete mode 100644 lib/symfony/config/Tests/Definition/Builder/BooleanNodeDefinitionTest.php delete mode 100644 lib/symfony/config/Tests/Definition/Builder/EnumNodeDefinitionTest.php delete mode 100644 lib/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php delete mode 100644 lib/symfony/config/Tests/Definition/Builder/NodeBuilderTest.php delete mode 100644 lib/symfony/config/Tests/Definition/Builder/NumericNodeDefinitionTest.php delete mode 100644 lib/symfony/config/Tests/Definition/Builder/TreeBuilderTest.php delete mode 100644 lib/symfony/config/Tests/Definition/Dumper/XmlReferenceDumperTest.php delete mode 100644 lib/symfony/config/Tests/Definition/Dumper/YamlReferenceDumperTest.php delete mode 100644 lib/symfony/config/Tests/Definition/EnumNodeTest.php delete mode 100644 lib/symfony/config/Tests/Definition/FinalizationTest.php delete mode 100644 lib/symfony/config/Tests/Definition/FloatNodeTest.php delete mode 100644 lib/symfony/config/Tests/Definition/IntegerNodeTest.php delete mode 100644 lib/symfony/config/Tests/Definition/MergeTest.php delete mode 100644 lib/symfony/config/Tests/Definition/NormalizationTest.php delete mode 100644 lib/symfony/config/Tests/Definition/PrototypedArrayNodeTest.php delete mode 100644 lib/symfony/config/Tests/Definition/ScalarNodeTest.php delete mode 100644 lib/symfony/config/Tests/DependencyInjection/ConfigCachePassTest.php delete mode 100644 lib/symfony/config/Tests/Exception/FileLoaderLoadExceptionTest.php delete mode 100644 lib/symfony/config/Tests/FileLocatorTest.php delete mode 100644 lib/symfony/config/Tests/Fixtures/Again/foo.xml delete mode 100644 lib/symfony/config/Tests/Fixtures/BadParent.php delete mode 100644 lib/symfony/config/Tests/Fixtures/BarNode.php delete mode 100644 lib/symfony/config/Tests/Fixtures/Builder/BarNodeDefinition.php delete mode 100644 lib/symfony/config/Tests/Fixtures/Builder/NodeBuilder.php delete mode 100644 lib/symfony/config/Tests/Fixtures/Builder/VariableNodeDefinition.php delete mode 100644 lib/symfony/config/Tests/Fixtures/Configuration/ExampleConfiguration.php delete mode 100644 lib/symfony/config/Tests/Fixtures/Resource/.hiddenFile delete mode 100644 lib/symfony/config/Tests/Fixtures/Resource/ConditionalClass.php delete mode 100644 lib/symfony/config/Tests/Fixtures/Util/document_type.xml delete mode 100644 lib/symfony/config/Tests/Fixtures/Util/invalid.xml delete mode 100644 lib/symfony/config/Tests/Fixtures/Util/invalid_schema.xml delete mode 100644 lib/symfony/config/Tests/Fixtures/Util/schema.xsd delete mode 100644 lib/symfony/config/Tests/Fixtures/Util/valid.xml delete mode 100644 lib/symfony/config/Tests/Fixtures/foo.xml delete mode 100644 lib/symfony/config/Tests/Loader/DelegatingLoaderTest.php delete mode 100644 lib/symfony/config/Tests/Loader/FileLoaderTest.php delete mode 100644 lib/symfony/config/Tests/Loader/LoaderResolverTest.php delete mode 100644 lib/symfony/config/Tests/Loader/LoaderTest.php delete mode 100644 lib/symfony/config/Tests/Resource/ClassExistenceResourceTest.php delete mode 100644 lib/symfony/config/Tests/Resource/ComposerResourceTest.php delete mode 100644 lib/symfony/config/Tests/Resource/DirectoryResourceTest.php delete mode 100644 lib/symfony/config/Tests/Resource/FileExistenceResourceTest.php delete mode 100644 lib/symfony/config/Tests/Resource/FileResourceTest.php delete mode 100644 lib/symfony/config/Tests/Resource/GlobResourceTest.php delete mode 100644 lib/symfony/config/Tests/Resource/ReflectionClassResourceTest.php delete mode 100644 lib/symfony/config/Tests/Resource/ResourceStub.php delete mode 100644 lib/symfony/config/Tests/ResourceCheckerConfigCacheTest.php delete mode 100644 lib/symfony/config/Tests/Util/XmlUtilsTest.php delete mode 100644 lib/symfony/console/Tests/ApplicationTest.php delete mode 100644 lib/symfony/console/Tests/Command/CommandTest.php delete mode 100644 lib/symfony/console/Tests/Command/HelpCommandTest.php delete mode 100644 lib/symfony/console/Tests/Command/ListCommandTest.php delete mode 100644 lib/symfony/console/Tests/Command/LockableTraitTest.php delete mode 100644 lib/symfony/console/Tests/CommandLoader/ContainerCommandLoaderTest.php delete mode 100644 lib/symfony/console/Tests/CommandLoader/FactoryCommandLoaderTest.php delete mode 100644 lib/symfony/console/Tests/DependencyInjection/AddConsoleCommandPassTest.php delete mode 100644 lib/symfony/console/Tests/Descriptor/AbstractDescriptorTest.php delete mode 100644 lib/symfony/console/Tests/Descriptor/ApplicationDescriptionTest.php delete mode 100644 lib/symfony/console/Tests/Descriptor/JsonDescriptorTest.php delete mode 100644 lib/symfony/console/Tests/Descriptor/MarkdownDescriptorTest.php delete mode 100644 lib/symfony/console/Tests/Descriptor/ObjectsProvider.php delete mode 100644 lib/symfony/console/Tests/Descriptor/TextDescriptorTest.php delete mode 100644 lib/symfony/console/Tests/Descriptor/XmlDescriptorTest.php delete mode 100644 lib/symfony/console/Tests/EventListener/ErrorListenerTest.php delete mode 100644 lib/symfony/console/Tests/Fixtures/BarBucCommand.php delete mode 100644 lib/symfony/console/Tests/Fixtures/DescriptorApplication1.php delete mode 100644 lib/symfony/console/Tests/Fixtures/DescriptorApplication2.php delete mode 100644 lib/symfony/console/Tests/Fixtures/DescriptorApplicationMbString.php delete mode 100644 lib/symfony/console/Tests/Fixtures/DescriptorCommand1.php delete mode 100644 lib/symfony/console/Tests/Fixtures/DescriptorCommand2.php delete mode 100644 lib/symfony/console/Tests/Fixtures/DescriptorCommand3.php delete mode 100644 lib/symfony/console/Tests/Fixtures/DescriptorCommand4.php delete mode 100644 lib/symfony/console/Tests/Fixtures/DescriptorCommandMbString.php delete mode 100644 lib/symfony/console/Tests/Fixtures/DummyOutput.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Foo1Command.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Foo2Command.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Foo3Command.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Foo4Command.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Foo5Command.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Foo6Command.php delete mode 100644 lib/symfony/console/Tests/Fixtures/FooCommand.php delete mode 100644 lib/symfony/console/Tests/Fixtures/FooHiddenCommand.php delete mode 100644 lib/symfony/console/Tests/Fixtures/FooLock2Command.php delete mode 100644 lib/symfony/console/Tests/Fixtures/FooLockCommand.php delete mode 100644 lib/symfony/console/Tests/Fixtures/FooOptCommand.php delete mode 100644 lib/symfony/console/Tests/Fixtures/FooSameCaseLowercaseCommand.php delete mode 100644 lib/symfony/console/Tests/Fixtures/FooSameCaseUppercaseCommand.php delete mode 100644 lib/symfony/console/Tests/Fixtures/FooSubnamespaced1Command.php delete mode 100644 lib/symfony/console/Tests/Fixtures/FooSubnamespaced2Command.php delete mode 100644 lib/symfony/console/Tests/Fixtures/FoobarCommand.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_0.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_1.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_10.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_11.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_12.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_13.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_14.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_15.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_16.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_17.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_2.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_3.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_4.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_5.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_6.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_7.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_8.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/command_9.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/command/interactive_command_1.php delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/interactive_output_1.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_0.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_1.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_10.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_11.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_12.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_13.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_14.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_15.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_16.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_17.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_2.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_3.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_4.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_5.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_6.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_7.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_8.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/Style/SymfonyStyle/output/output_9.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/TestAmbiguousCommandRegistering.php delete mode 100644 lib/symfony/console/Tests/Fixtures/TestAmbiguousCommandRegistering2.php delete mode 100644 lib/symfony/console/Tests/Fixtures/TestCommand.php delete mode 100644 lib/symfony/console/Tests/Fixtures/application_1.json delete mode 100644 lib/symfony/console/Tests/Fixtures/application_1.md delete mode 100644 lib/symfony/console/Tests/Fixtures/application_1.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_1.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/application_2.json delete mode 100644 lib/symfony/console/Tests/Fixtures/application_2.md delete mode 100644 lib/symfony/console/Tests/Fixtures/application_2.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_2.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/application_filtered_namespace.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_gethelp.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_mbstring.md delete mode 100644 lib/symfony/console/Tests/Fixtures/application_mbstring.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_renderexception1.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_renderexception2.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_renderexception3.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_renderexception3decorated.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_renderexception4.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_renderexception_doublewidth2.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_renderexception_escapeslines.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_renderexception_linebreaks.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_run1.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_run2.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_run3.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/application_run4.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/command_1.json delete mode 100644 lib/symfony/console/Tests/Fixtures/command_1.md delete mode 100644 lib/symfony/console/Tests/Fixtures/command_1.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/command_1.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/command_2.json delete mode 100644 lib/symfony/console/Tests/Fixtures/command_2.md delete mode 100644 lib/symfony/console/Tests/Fixtures/command_2.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/command_2.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/command_mbstring.md delete mode 100644 lib/symfony/console/Tests/Fixtures/command_mbstring.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_1.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_1.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_1.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_1.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_2.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_2.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_2.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_2.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_3.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_3.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_3.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_3.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_4.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_4.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_4.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_4.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_with_default_inf_value.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_with_default_inf_value.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_with_default_inf_value.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_with_default_inf_value.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_with_style.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_with_style.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_with_style.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_argument_with_style.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_1.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_1.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_1.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_1.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_2.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_2.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_2.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_2.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_3.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_3.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_3.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_3.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_4.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_4.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_4.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_definition_4.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_1.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_1.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_1.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_1.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_2.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_2.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_2.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_2.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_3.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_3.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_3.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_3.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_4.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_4.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_4.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_4.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_5.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_5.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_5.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_5.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_6.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_6.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_6.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_6.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_with_default_inf_value.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_with_default_inf_value.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_with_default_inf_value.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_with_default_inf_value.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_with_style.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_with_style.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_with_style.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_with_style.xml delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_with_style_array.json delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_with_style_array.md delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_with_style_array.txt delete mode 100644 lib/symfony/console/Tests/Fixtures/input_option_with_style_array.xml delete mode 100644 lib/symfony/console/Tests/Formatter/OutputFormatterStyleStackTest.php delete mode 100644 lib/symfony/console/Tests/Formatter/OutputFormatterStyleTest.php delete mode 100644 lib/symfony/console/Tests/Formatter/OutputFormatterTest.php delete mode 100644 lib/symfony/console/Tests/Helper/AbstractQuestionHelperTest.php delete mode 100644 lib/symfony/console/Tests/Helper/FormatterHelperTest.php delete mode 100644 lib/symfony/console/Tests/Helper/HelperSetTest.php delete mode 100644 lib/symfony/console/Tests/Helper/HelperTest.php delete mode 100644 lib/symfony/console/Tests/Helper/ProcessHelperTest.php delete mode 100644 lib/symfony/console/Tests/Helper/ProgressBarTest.php delete mode 100644 lib/symfony/console/Tests/Helper/ProgressIndicatorTest.php delete mode 100644 lib/symfony/console/Tests/Helper/QuestionHelperTest.php delete mode 100644 lib/symfony/console/Tests/Helper/SymfonyQuestionHelperTest.php delete mode 100644 lib/symfony/console/Tests/Helper/TableStyleTest.php delete mode 100644 lib/symfony/console/Tests/Helper/TableTest.php delete mode 100644 lib/symfony/console/Tests/Input/ArgvInputTest.php delete mode 100644 lib/symfony/console/Tests/Input/ArrayInputTest.php delete mode 100644 lib/symfony/console/Tests/Input/InputArgumentTest.php delete mode 100644 lib/symfony/console/Tests/Input/InputDefinitionTest.php delete mode 100644 lib/symfony/console/Tests/Input/InputOptionTest.php delete mode 100644 lib/symfony/console/Tests/Input/InputTest.php delete mode 100644 lib/symfony/console/Tests/Input/StringInputTest.php delete mode 100644 lib/symfony/console/Tests/Logger/ConsoleLoggerTest.php delete mode 100644 lib/symfony/console/Tests/Output/ConsoleOutputTest.php delete mode 100644 lib/symfony/console/Tests/Output/NullOutputTest.php delete mode 100644 lib/symfony/console/Tests/Output/OutputTest.php delete mode 100644 lib/symfony/console/Tests/Output/StreamOutputTest.php delete mode 100644 lib/symfony/console/Tests/Question/ChoiceQuestionTest.php delete mode 100644 lib/symfony/console/Tests/Question/ConfirmationQuestionTest.php delete mode 100644 lib/symfony/console/Tests/Style/SymfonyStyleTest.php delete mode 100644 lib/symfony/console/Tests/TerminalTest.php delete mode 100644 lib/symfony/console/Tests/Tester/ApplicationTesterTest.php delete mode 100644 lib/symfony/console/Tests/Tester/CommandTesterTest.php delete mode 100644 lib/symfony/css-selector/Tests/CssSelectorConverterTest.php delete mode 100644 lib/symfony/css-selector/Tests/Node/AbstractNodeTest.php delete mode 100644 lib/symfony/css-selector/Tests/Node/AttributeNodeTest.php delete mode 100644 lib/symfony/css-selector/Tests/Node/ClassNodeTest.php delete mode 100644 lib/symfony/css-selector/Tests/Node/CombinedSelectorNodeTest.php delete mode 100644 lib/symfony/css-selector/Tests/Node/ElementNodeTest.php delete mode 100644 lib/symfony/css-selector/Tests/Node/FunctionNodeTest.php delete mode 100644 lib/symfony/css-selector/Tests/Node/HashNodeTest.php delete mode 100644 lib/symfony/css-selector/Tests/Node/NegationNodeTest.php delete mode 100644 lib/symfony/css-selector/Tests/Node/PseudoNodeTest.php delete mode 100644 lib/symfony/css-selector/Tests/Node/SelectorNodeTest.php delete mode 100644 lib/symfony/css-selector/Tests/Node/SpecificityTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/Handler/AbstractHandlerTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/Handler/CommentHandlerTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/Handler/HashHandlerTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/Handler/IdentifierHandlerTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/Handler/NumberHandlerTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/Handler/StringHandlerTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/Handler/WhitespaceHandlerTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/ParserTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/ReaderTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/Shortcut/ClassParserTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/Shortcut/ElementParserTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/Shortcut/EmptyStringParserTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/Shortcut/HashParserTest.php delete mode 100644 lib/symfony/css-selector/Tests/Parser/TokenStreamTest.php delete mode 100644 lib/symfony/css-selector/Tests/XPath/Fixtures/ids.html delete mode 100644 lib/symfony/css-selector/Tests/XPath/Fixtures/lang.xml delete mode 100644 lib/symfony/css-selector/Tests/XPath/Fixtures/shakespear.html delete mode 100644 lib/symfony/css-selector/Tests/XPath/TranslatorTest.php delete mode 100644 lib/symfony/debug/Resources/ext/tests/001.phpt delete mode 100644 lib/symfony/debug/Resources/ext/tests/002.phpt delete mode 100644 lib/symfony/debug/Resources/ext/tests/002_1.phpt delete mode 100644 lib/symfony/debug/Resources/ext/tests/003.phpt delete mode 100644 lib/symfony/debug/Tests/DebugClassLoaderTest.php delete mode 100644 lib/symfony/debug/Tests/ErrorHandlerTest.php delete mode 100644 lib/symfony/debug/Tests/Exception/FlattenExceptionTest.php delete mode 100644 lib/symfony/debug/Tests/ExceptionHandlerTest.php delete mode 100644 lib/symfony/debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php delete mode 100644 lib/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php delete mode 100644 lib/symfony/debug/Tests/FatalErrorHandler/UndefinedMethodFatalErrorHandlerTest.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/AnnotatedClass.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/ClassAlias.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/DefinitionInEvaluatedCode.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/DeprecatedClass.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/DeprecatedInterface.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/ErrorHandlerThatUsesThePreviousOne.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/ExtendedFinalMethod.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/FinalClasses.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/FinalMethod.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/FinalMethod2Trait.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/InternalClass.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/InternalInterface.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/InternalTrait.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/InternalTrait2.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/LoggerThatSetAnErrorHandler.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/NonDeprecatedInterface.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/PEARClass.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/Throwing.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/ToStringThrower.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/TraitWithInternalMethod.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/casemismatch.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/notPsr0Bis.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/psr4/Psr4CaseMismatch.php delete mode 100644 lib/symfony/debug/Tests/Fixtures/reallyNotPsr0.php delete mode 100644 lib/symfony/debug/Tests/Fixtures2/RequiredTwice.php delete mode 100644 lib/symfony/debug/Tests/HeaderMock.php delete mode 100644 lib/symfony/debug/Tests/phpt/debug_class_loader.phpt delete mode 100644 lib/symfony/debug/Tests/phpt/decorate_exception_hander.phpt delete mode 100644 lib/symfony/debug/Tests/phpt/exception_rethrown.phpt delete mode 100644 lib/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt delete mode 100644 lib/symfony/dependency-injection/Tests/Argument/RewindableGeneratorTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/ChildDefinitionTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/AutoAliasServicePassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/AutowireExceptionPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/AutowirePassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/AutowireRequiredMethodsPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/CheckArgumentsValidityPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/CheckCircularReferencesPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/CheckDefinitionValidityPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/CheckReferenceValidityPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/DecoratorServicePassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/DefinitionErrorExceptionPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ExtensionCompilerPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/FactoryReturnTypePassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/InlineServiceDefinitionsPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/IntegrationTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/MergeExtensionConfigurationPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/OptionalServiceClass.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/PassConfigTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/PriorityTaggedServiceTraitTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/RegisterServiceSubscribersPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolveBindingsPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolveChildDefinitionsPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolveClassPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolveFactoryClassPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolveHotPathPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolveInstanceofConditionalsPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolveInvalidReferencesPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolveNamedArgumentsPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolvePrivatesPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Compiler/ServiceLocatorTagPassTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Config/AutowireServiceResourceTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Config/ContainerParametersResourceCheckerTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Config/ContainerParametersResourceTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/ContainerBuilderTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/ContainerTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/CrossCheckTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/DefinitionDecoratorTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/DefinitionTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Dumper/GraphvizDumperTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Dumper/PhpDumperTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Dumper/XmlDumperTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Dumper/YamlDumperTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/EnvVarProcessorTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Extension/ExtensionTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Bar.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/BarInterface.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/CaseSensitiveClass.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Container/ConstructorWithMandatoryArgumentsContainer.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Container/ConstructorWithOptionalArgumentsContainer.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Container/ConstructorWithoutArgumentsContainer.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Container/NoConstructorContainer.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/CustomDefinition.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/DeprecatedClass.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/FactoryDummy.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/FactoryDummyWithoutReturnTypes.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/FooForCircularWithAddCalls.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/NamedArgumentsDummy.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/ParentNotExists.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Prototype/BadClasses/MissingParent.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Prototype/Foo.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Prototype/FooInterface.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/AnotherSub/DeeperBaz.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Baz.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component1/Dir1/Service1.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component1/Dir2/Service2.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component2/Dir1/Service4.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component2/Dir2/Service5.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Prototype/Sub/Bar.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/Prototype/Sub/BarInterface.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/ScalarFactory.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/SimilarArgumentsDummy.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/StubbedTranslator.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/TestDefinition1.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/TestDefinition2.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/TestServiceSubscriber.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/array.json delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/basic.expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/basic.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/child.expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/child.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/defaults.expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/defaults.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/factory_short_notation.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/instanceof.expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/instanceof.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/php7.expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/php7.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/prototype.expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/prototype.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/services9.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/config/services_autoconfigure_with_parent.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/CustomContainer.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container10.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container11.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container12.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container13.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container14.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container15.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container16.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container17.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container19.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container21.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container24.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container33.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container8.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container9.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container_abstract.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container_almost_circular.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container_env_in_id.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container_inline_requires.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/containers/container_uninitialized_ref.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/directory/import/import.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/directory/recurse/simple.ini delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/directory/recurse/simple.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/directory/simple.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/graphviz/services1.dot delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/graphviz/services10-1.dot delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/graphviz/services10.dot delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/graphviz/services13.dot delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/graphviz/services14.dot delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/graphviz/services17.dot delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/graphviz/services18.dot delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/graphviz/services9.dot delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/graphviz/services_inline.dot delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/FooVariadic.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/C1.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/C2.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/C3.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/I1.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/P1.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/T1.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/ProjectExtension.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/ProjectWithXsdExtension.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/ProjectWithXsdExtensionInPhar.phar delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/autowiring_classes.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/classes.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/createphar.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/foo.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/includes/schema/project-1.0.xsd delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/ini/almostvalid.ini delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/ini/ini_with_wrong_ext.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/ini/nonvalid.ini delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/ini/parameters.ini delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/ini/parameters1.ini delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/ini/parameters2.ini delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/ini/types.ini delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_without_constructor.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/php_with_wrong_ext.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services1-1.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services1.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services10.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services12.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services13.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services19.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services24.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services26.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services33.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services8.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services9.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services9_as_files.txt delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services9_compiled.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_adawson.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_private.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_public.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_array_params.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_base64_env.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_dedup_lazy_proxy.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_deep_graph.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_env_in_id.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_inline_requires.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_inline_self_ref.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_legacy_privates.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_locator.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_non_shared_lazy.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_private_frozen.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_private_in_expression.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_rot13_env.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_subscriber.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_tsantos.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_uninitialized_ref.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/services_unsupported_characters.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/php/simple.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/class_from_id.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/defaults_bindings.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/defaults_bindings2.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/extension1/services.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/extension2/services.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/extensions/services1.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/extensions/services2.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/extensions/services3.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/extensions/services4.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/extensions/services5.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/extensions/services6.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/extensions/services7.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/legacy_invalid_alias_definition.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/namespaces.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/nested_service_without_id.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/nonvalid.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services1.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services10.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services13.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services14.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services2.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services21.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services22.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services23.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services24.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services28.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services3.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services4.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services4_bad_import.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services5.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services6.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services7.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services8.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services9.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_abstract.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_autoconfigure.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_autoconfigure_with_parent.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_bindings.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_defaults_with_parent.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_deprecated.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_dump_load.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_inline_not_candidate.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_instanceof.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_instanceof_with_parent.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_named_args.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_prototype.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_tsantos.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/services_without_id.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/tag_with_empty_name.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/tag_without_name.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/with_key_outside_collection.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/withdoctype.xml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/xml/xml_with_wrong_ext.php delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/anonymous_services.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/anonymous_services_alias.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/anonymous_services_in_instanceof.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/anonymous_services_in_parameters.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bad_calls.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bad_decorates.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bad_empty_defaults.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bad_empty_instanceof.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bad_format.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bad_import.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bad_imports.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bad_parameters.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bad_service.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bad_services.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bad_types1.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bad_types2.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/badtag1.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/badtag2.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/badtag3.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/bar/services.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/class_from_id.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/defaults_bindings.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/defaults_bindings2.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/foo/services.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_child_not_applied/_child.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_child_not_applied/expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_child_not_applied/main.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_parent_child/_child.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_parent_child/expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_parent_child/main.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_parent_child_tags/_child.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_parent_child_tags/expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_parent_child_tags/main.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/child_parent/expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/child_parent/main.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_child_tags/expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_child_tags/main.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_instanceof_importance/expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_instanceof_importance/main.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_parent_child/_child.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_parent_child/expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_parent_child/main.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/instanceof_parent_child/_child.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/instanceof_parent_child/expected.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/integration/instanceof_parent_child/main.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/legacy_invalid_alias_definition.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/legacy_invalid_definition.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/nonvalid1.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/nonvalid2.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/null_config.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services1.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services10.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services11.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services13.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services14.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services2.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services21.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services22.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services23.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services24.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services26.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services28.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services3.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services31_invalid_tags.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services4.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services4_bad_import.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services6.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services7.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services8.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services9.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_adawson.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_autoconfigure.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_autoconfigure_with_parent.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_bindings.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_configurator_short_syntax.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_deep_graph.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_defaults_with_parent.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_dump_load.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_inline.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_instanceof.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_instanceof_with_parent.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_legacy_privates.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_named_args.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_prototype.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_prototype_namespace.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_prototype_namespace_without_resource.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/services_underscore.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/tag_name_empty_string.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/tag_name_no_string.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/tag_name_only.yml delete mode 100644 lib/symfony/dependency-injection/Tests/Fixtures/yaml/yaml_with_wrong_ext.ini delete mode 100644 lib/symfony/dependency-injection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/LazyProxy/PhpDumper/NullDumperTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Loader/ClosureLoaderTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Loader/DirectoryLoaderTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Loader/FileLoaderTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Loader/GlobFileLoaderTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Loader/IniFileLoaderTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Loader/LoaderResolverTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Loader/PhpFileLoaderTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Loader/XmlFileLoaderTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/Loader/YamlFileLoaderTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/ParameterBag/FrozenParameterBagTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/ParameterBag/ParameterBagTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/ParameterTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/ReferenceTest.php delete mode 100644 lib/symfony/dependency-injection/Tests/ServiceLocatorTest.php delete mode 100644 lib/symfony/dotenv/Tests/DotenvTest.php delete mode 100644 lib/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php delete mode 100644 lib/symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php delete mode 100644 lib/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php delete mode 100644 lib/symfony/event-dispatcher/Tests/Debug/WrappedListenerTest.php delete mode 100644 lib/symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php delete mode 100644 lib/symfony/event-dispatcher/Tests/EventDispatcherTest.php delete mode 100644 lib/symfony/event-dispatcher/Tests/EventTest.php delete mode 100644 lib/symfony/event-dispatcher/Tests/GenericEventTest.php delete mode 100644 lib/symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php delete mode 100644 lib/symfony/filesystem/Tests/ExceptionTest.php delete mode 100644 lib/symfony/filesystem/Tests/FilesystemTest.php delete mode 100644 lib/symfony/filesystem/Tests/FilesystemTestCase.php delete mode 100644 lib/symfony/filesystem/Tests/Fixtures/MockStream/MockStream.php delete mode 100644 lib/symfony/filesystem/Tests/LockHandlerTest.php delete mode 100644 lib/symfony/finder/Tests/Comparator/ComparatorTest.php delete mode 100644 lib/symfony/finder/Tests/Comparator/DateComparatorTest.php delete mode 100644 lib/symfony/finder/Tests/Comparator/NumberComparatorTest.php delete mode 100644 lib/symfony/finder/Tests/FinderTest.php delete mode 100644 lib/symfony/finder/Tests/Fixtures/.dot/a delete mode 100644 lib/symfony/finder/Tests/Fixtures/.dot/b/c.neon delete mode 100644 lib/symfony/finder/Tests/Fixtures/.dot/b/d.neon delete mode 100644 lib/symfony/finder/Tests/Fixtures/A/B/C/abc.dat delete mode 100644 lib/symfony/finder/Tests/Fixtures/A/B/ab.dat delete mode 100644 lib/symfony/finder/Tests/Fixtures/A/a.dat delete mode 100644 lib/symfony/finder/Tests/Fixtures/copy/A/B/C/abc.dat.copy delete mode 100644 lib/symfony/finder/Tests/Fixtures/copy/A/B/ab.dat.copy delete mode 100644 lib/symfony/finder/Tests/Fixtures/copy/A/a.dat.copy delete mode 100644 lib/symfony/finder/Tests/Fixtures/dolor.txt delete mode 100644 lib/symfony/finder/Tests/Fixtures/ipsum.txt delete mode 100644 lib/symfony/finder/Tests/Fixtures/lorem.txt delete mode 100644 lib/symfony/finder/Tests/Fixtures/one/.dot delete mode 100644 lib/symfony/finder/Tests/Fixtures/one/a delete mode 100644 lib/symfony/finder/Tests/Fixtures/one/b/c.neon delete mode 100644 lib/symfony/finder/Tests/Fixtures/one/b/d.neon delete mode 100644 lib/symfony/finder/Tests/Fixtures/r+e.gex[c]a(r)s/dir/bar.dat delete mode 100644 lib/symfony/finder/Tests/Fixtures/with space/foo.txt delete mode 100644 lib/symfony/finder/Tests/GlobTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/CustomFilterIteratorTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/DateRangeFilterIteratorTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/DepthRangeFilterIteratorTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/ExcludeDirectoryFilterIteratorTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/FileTypeFilterIteratorTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/FilecontentFilterIteratorTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/FilenameFilterIteratorTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/FilterIteratorTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/Iterator.php delete mode 100644 lib/symfony/finder/Tests/Iterator/IteratorTestCase.php delete mode 100644 lib/symfony/finder/Tests/Iterator/MockFileListIterator.php delete mode 100644 lib/symfony/finder/Tests/Iterator/MockSplFileInfo.php delete mode 100644 lib/symfony/finder/Tests/Iterator/MultiplePcreFilterIteratorTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/PathFilterIteratorTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/RealIteratorTestCase.php delete mode 100644 lib/symfony/finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/SizeRangeFilterIteratorTest.php delete mode 100644 lib/symfony/finder/Tests/Iterator/SortableIteratorTest.php delete mode 100644 lib/symfony/framework-bundle/Test/ForwardCompatTestTrait.php delete mode 100644 lib/symfony/framework-bundle/Test/KernelTestCase.php delete mode 100644 lib/symfony/framework-bundle/Test/WebTestCase.php delete mode 100644 lib/symfony/framework-bundle/Tests/CacheWarmer/AnnotationsCacheWarmerTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/CacheWarmer/ClassCacheCacheWarmerTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/CacheWarmer/SerializerCacheWarmerTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/CacheWarmer/TemplateFinderTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/CacheWarmer/TemplatePathsCacheWarmerTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/CacheWarmer/ValidatorCacheWarmerTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/ClientTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Command/CacheClearCommand/Fixture/TestAppKernel.php delete mode 100644 lib/symfony/framework-bundle/Tests/Command/CacheClearCommand/Fixture/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Command/CachePruneCommandTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Command/RouterDebugCommandTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Command/RouterMatchCommandTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Command/TranslationDebugCommandTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Command/TranslationUpdateCommandTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Command/YamlLintCommandTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Console/ApplicationTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Console/Descriptor/AbstractDescriptorTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Console/Descriptor/JsonDescriptorTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Console/Descriptor/MarkdownDescriptorTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Console/Descriptor/ObjectsProvider.php delete mode 100644 lib/symfony/framework-bundle/Tests/Console/Descriptor/TextDescriptorTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Console/Descriptor/XmlDescriptorTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Controller/AbstractControllerTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Controller/ControllerNameParserTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Controller/ControllerResolverTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Controller/ControllerTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Controller/ControllerTraitTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Controller/RedirectControllerTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Controller/TemplateControllerTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/AddCacheWarmerPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/AddConstraintValidatorsPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/CacheCollectorPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/CachePoolClearerPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/CachePoolPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/CachePoolPrunerPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/ConfigCachePassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/ControllerArgumentValueResolverPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/FormPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/ProfilerPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/PropertyInfoPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/SerializerPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/TranslatorPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/UnusedTagsPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Compiler/WorkflowGuardListenerPassTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/ConfigurationTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/Resources/config/validation.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/Resources/config/validation.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/CustomPathBundle/src/CustomPathBundle.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/serialization.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/serialization.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/serializer_mapping/files/foo.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/serializer_mapping/files/foo.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yaml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/serializer_mapping/serialization.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/validation.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/validation.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/validation_mapping/files/foo.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/validation_mapping/files/foo.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yaml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/validation_mapping/validation.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/TestBundle/TestBundle.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/assets.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/assets_disabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/assets_version_strategy_as_service.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/cache.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/cache_env_var.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/csrf.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/csrf_needs_session.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/default_config.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/esi_and_ssi_without_fragments.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/esi_disabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/form_no_csrf.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/full.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/php_errors_disabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/php_errors_enabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/profiler.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/property_accessor.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/property_info.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/request.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/serializer_disabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/serializer_enabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/serializer_legacy_cache.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/serializer_mapping.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/session.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/ssi_disabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/templating_disabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/templating_no_assets.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/templating_php_assets_disabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/templating_php_translator_disabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/templating_php_translator_enabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/translator_fallbacks.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/validation_annotations.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/validation_mapping.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/validation_multiple_static_methods.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/validation_no_static_method.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/validation_strict_email.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/validation_translation_domain.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/web_link.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/workflow_with_arguments_and_service.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/workflow_with_guard_expression.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/workflow_with_multiple_transitions_with_same_name.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/workflow_with_support_and_support_strategy.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/workflow_with_type_and_service.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/workflow_without_support_and_support_strategy.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/workflows.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/workflows_enabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/workflows_explicitly_enabled.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/workflows_explicitly_enabled_named_workflows.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/php/workflows_without_type.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/translations/test_paths.en.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/assets.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/assets_disabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/assets_version_strategy_as_service.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/cache.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/cache_env_var.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/csrf.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/csrf_disabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/csrf_needs_session.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/default_config.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/esi_and_ssi_without_fragments.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/esi_disabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/form_csrf_sets_field_name.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/form_csrf_under_form_sets_field_name.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/form_no_csrf.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/full.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/lock.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/lock_named.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/php_errors_disabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/php_errors_enabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/profiler.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/property_accessor.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/property_info.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/request.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/serializer_disabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/serializer_enabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/serializer_legacy_cache.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/serializer_mapping.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/session.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/ssi_disabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/templating_disabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/templating_no_assets.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/templating_php_translator_disabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/templating_php_translator_enabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/translator_fallbacks.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/validation_annotations.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/validation_mapping.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/validation_multiple_static_methods.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/validation_no_static_method.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/validation_strict_email.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/validation_translation_domain.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/web_link.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_arguments_and_service.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_guard_expression.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_multiple_transitions_with_same_name.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_support_and_support_strategy.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/workflow_with_type_and_service.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/workflow_without_support_and_support_strategy.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/workflows.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/workflows_enabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/workflows_explicitly_enabled_named_workflows.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/xml/workflows_without_type.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/assets.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/assets_disabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/assets_version_strategy_as_service.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/cache.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/cache_env_var.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/csrf.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/csrf_needs_session.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/default_config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/esi_and_ssi_without_fragments.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/esi_disabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/form_no_csrf.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/full.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/lock.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/lock_named.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/php_errors_disabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/php_errors_enabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/profiler.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/property_accessor.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/property_info.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/request.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/serializer_disabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/serializer_enabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/serializer_legacy_cache.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/serializer_mapping.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/session.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/ssi_disabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/templating_disabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/templating_no_assets.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/templating_php_assets_disabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/templating_php_translator_disabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/templating_php_translator_enabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/translator_fallbacks.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/validation_annotations.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/validation_mapping.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/validation_multiple_static_methods.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/validation_no_static_method.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/validation_strict_email.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/validation_translation_domain.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/web_link.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_arguments_and_service.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_guard_expression.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_multiple_transitions_with_same_name.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_support_and_support_strategy.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/workflow_with_type_and_service.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/workflow_without_support_and_support_strategy.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/workflows.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/workflows_enabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/workflows_explicitly_enabled_named_workflows.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/Fixtures/yml/workflows_without_type.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/FrameworkExtensionTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/PhpFrameworkExtensionTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/XmlFrameworkExtensionTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/YamlFrameworkExtensionTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/config/serializer/foo.yml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/config/validator/foo.xml delete mode 100644 lib/symfony/framework-bundle/Tests/DependencyInjection/translations/test_default.en.xlf delete mode 100644 lib/symfony/framework-bundle/Tests/EventListener/ResolveControllerNameSubscriberTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/BaseBundle/BaseBundle.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/BaseBundle/Resources/views/base.format.engine delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/BaseBundle/Resources/views/controller/base.format.engine delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/BaseBundle/Resources/views/this.is.a.template.format.engine delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/DeclaredClass.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_1.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_1.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_1.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_1.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_2.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_2.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_2.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_2.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_with_definition_1.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_with_definition_1.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_with_definition_1.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_with_definition_1.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_with_definition_2.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_with_definition_2.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_with_definition_2.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/alias_with_definition_2.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/array_parameter.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/array_parameter.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/array_parameter.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/array_parameter.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_arguments.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_arguments.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_arguments.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_arguments.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_public.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_public.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_public.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_public.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_services.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_services.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_services.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_services.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_tag1.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_tag1.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_tags.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_tags.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_tags.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/builder_1_tags.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_1.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_1.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_1.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_1.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_2.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_2.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_2.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_2.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_3.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_3.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_3.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_3.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_4.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_4.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_4.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_4.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_5.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_5.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_5.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_5.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_6.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_6.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_6.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_6.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_7.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_7.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_7.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_7.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_from_callable.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_from_callable.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_from_callable.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/callable_from_callable.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_1.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_1.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_1.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_1.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_2.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_2.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_2.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_2.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_arguments_1.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_arguments_1.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_arguments_1.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_arguments_1.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_arguments_2.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_arguments_2.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_arguments_2.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/definition_arguments_2.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/event_dispatcher_1_event1.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/event_dispatcher_1_events.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/parameter.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/parameter.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/parameter.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/parameter.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/parameters_1.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/parameters_1.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/parameters_1.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/parameters_1.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/route_1.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/route_1.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/route_1.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/route_1.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/route_2.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/route_2.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/route_2.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/route_2.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/route_collection_1.json delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/route_collection_1.md delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/route_collection_1.txt delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Descriptor/route_collection_1.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Resources/BaseBundle/views/base.format.engine delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Resources/BaseBundle/views/controller/custom.format.engine delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Resources/translations/messages.fr.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Resources/views/resource.format.engine delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Resources/views/this.is.a.template.format.engine delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Resources/views/translation.html.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Serialization/Author.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Serialization/Person.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Serialization/Resources/author.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Serialization/Resources/does_not_exist.yaml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Serialization/Resources/person.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/TemplatePathsCache/templates-empty.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/TemplatePathsCache/templates.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/Controller/DefaultController.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/TestBundle/Fabpot/FooBundle/FabpotFooBundle.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/TestBundle/FooBundle/Controller/DefaultController.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/TestBundle/FooBundle/Controller/Sub/DefaultController.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/TestBundle/FooBundle/Controller/Test/DefaultController.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/TestBundle/FooBundle/FooBundle.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/Controller/DefaultController.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/TestBundle/Sensio/Cms/FooBundle/SensioCmsFooBundle.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/Controller/DefaultController.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/TestBundle/Sensio/FooBundle/SensioFooBundle.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Validation/Article.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Validation/Author.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Validation/Category.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Validation/Person.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Validation/Resources/author.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Validation/Resources/categories.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Validation/Resources/does_not_exist.yaml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Validation/Resources/person.xml delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/Validation/SubCategory.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/WarmedClass.php delete mode 100644 lib/symfony/framework-bundle/Tests/Fixtures/templates.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/AbstractWebTestCase.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/AnnotatedControllerTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/AutowiringTypesTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/AutowiringTypes/AutowiredServices.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/Controller/AnnotatedController.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/Controller/ProfilerController.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestServiceResolutionController.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/AnnotationReaderPass.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/Config/CustomConfig.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/Configuration.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/DependencyInjection/TestExtension.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/Resources/config/routing.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/Bundle/TestBundle/TestBundle.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/CachePoolClearCommandTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/CachePoolsTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/ConfigDebugCommandTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/ConfigDumpReferenceCommandTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/ContainerDebugCommandTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/ContainerDumpTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/DebugAutowiringCommandTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/FragmentTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/ProfilerTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/PropertyInfoTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/SerializerTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/SessionTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/SubRequestsTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/AnnotatedController/bundles.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/AnnotatedController/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/AnnotatedController/routing.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/AppKernel.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/AutowiringTypes/bundles.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/AutowiringTypes/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/AutowiringTypes/no_annotations_cache.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/CachePoolClear/bundles.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/CachePoolClear/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/CachePools/bundles.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/CachePools/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/CachePools/redis_config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/CachePools/redis_custom_config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/ConfigDump/bundles.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/ConfigDump/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/ContainerDebug/bundles.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/ContainerDebug/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/ContainerDump/bundles.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/ContainerDump/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/ControllerServiceResolution/bundles.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/ControllerServiceResolution/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/ControllerServiceResolution/routing.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/Fragment/bundles.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/Fragment/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/Fragment/routing.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/Profiler/bundles.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/Profiler/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/Profiler/routing.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/Resources/views/fragment.html.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/Serializer/bundles.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/Serializer/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/Session/bundles.php delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/Session/config.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/Session/routing.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/config/default.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Functional/app/config/framework.yml delete mode 100644 lib/symfony/framework-bundle/Tests/Kernel/ConcreteMicroKernel.php delete mode 100644 lib/symfony/framework-bundle/Tests/Kernel/MicroKernelTraitTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Routing/DelegatingLoaderTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Routing/RedirectableUrlMatcherTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Routing/RouterTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/DelegatingEngineTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/GlobalVariablesTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/AssetsHelperTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/Fixtures/StubTemplateNameParser.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/Fixtures/StubTranslator.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/RequestHelperTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/Resources/Child/form_label.html.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/Resources/Custom/_name_c_entry_label.html.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/Resources/Custom/_names_entry_label.html.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/Resources/Custom/_text_id_widget.html.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/Resources/Parent/form_label.html.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/Resources/Parent/form_widget_simple.html.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/SessionHelperTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Helper/StopwatchHelperTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/Loader/TemplateLocatorTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/PhpEngineTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/TemplateFilenameParserTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/TemplateNameParserTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/TemplateReferenceTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/TemplateTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Templating/TimedPhpEngineTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/TestCase.php delete mode 100644 lib/symfony/framework-bundle/Tests/Translation/PhpExtractorTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Translation/TranslatorTest.php delete mode 100644 lib/symfony/framework-bundle/Tests/Validator/ConstraintValidatorFactoryTest.php delete mode 100644 lib/symfony/http-foundation/Tests/AcceptHeaderItemTest.php delete mode 100644 lib/symfony/http-foundation/Tests/AcceptHeaderTest.php delete mode 100644 lib/symfony/http-foundation/Tests/ApacheRequestTest.php delete mode 100644 lib/symfony/http-foundation/Tests/BinaryFileResponseTest.php delete mode 100644 lib/symfony/http-foundation/Tests/CookieTest.php delete mode 100644 lib/symfony/http-foundation/Tests/ExpressionRequestMatcherTest.php delete mode 100644 lib/symfony/http-foundation/Tests/File/FakeFile.php delete mode 100644 lib/symfony/http-foundation/Tests/File/FileTest.php delete mode 100644 lib/symfony/http-foundation/Tests/File/Fixtures/-test delete mode 100644 lib/symfony/http-foundation/Tests/File/Fixtures/.unknownextension delete mode 100644 lib/symfony/http-foundation/Tests/File/Fixtures/case-sensitive-mime-type.xlsm delete mode 100644 lib/symfony/http-foundation/Tests/File/Fixtures/directory/.empty delete mode 100644 lib/symfony/http-foundation/Tests/File/Fixtures/other-file.example delete mode 100644 lib/symfony/http-foundation/Tests/File/Fixtures/test delete mode 100644 lib/symfony/http-foundation/Tests/File/Fixtures/test.gif delete mode 100644 lib/symfony/http-foundation/Tests/File/MimeType/MimeTypeTest.php delete mode 100644 lib/symfony/http-foundation/Tests/File/UploadedFileTest.php delete mode 100644 lib/symfony/http-foundation/Tests/FileBagTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/common.inc delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_max_age.expected delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_max_age.php delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_raw_urlencode.expected delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_raw_urlencode.php delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_samesite_lax.expected delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_samesite_lax.php delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_samesite_strict.expected delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_samesite_strict.php delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_urlencode.expected delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/cookie_urlencode.php delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/invalid_cookie_name.expected delete mode 100644 lib/symfony/http-foundation/Tests/Fixtures/response-functional/invalid_cookie_name.php delete mode 100644 lib/symfony/http-foundation/Tests/HeaderBagTest.php delete mode 100644 lib/symfony/http-foundation/Tests/IpUtilsTest.php delete mode 100644 lib/symfony/http-foundation/Tests/JsonResponseTest.php delete mode 100644 lib/symfony/http-foundation/Tests/ParameterBagTest.php delete mode 100644 lib/symfony/http-foundation/Tests/RedirectResponseTest.php delete mode 100644 lib/symfony/http-foundation/Tests/RequestMatcherTest.php delete mode 100644 lib/symfony/http-foundation/Tests/RequestStackTest.php delete mode 100644 lib/symfony/http-foundation/Tests/RequestTest.php delete mode 100644 lib/symfony/http-foundation/Tests/ResponseFunctionalTest.php delete mode 100644 lib/symfony/http-foundation/Tests/ResponseHeaderBagTest.php delete mode 100644 lib/symfony/http-foundation/Tests/ResponseTest.php delete mode 100644 lib/symfony/http-foundation/Tests/ResponseTestCase.php delete mode 100644 lib/symfony/http-foundation/Tests/ServerBagTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Flash/AutoExpireFlashBagTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/SessionTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/AbstractSessionHandlerTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/common.inc delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/empty_destroys.expected delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/empty_destroys.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/read_only.expected delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/read_only.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/regenerate.expected delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/regenerate.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/storage.expected delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/storage.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_cookie.expected delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_cookie.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_cookie_and_session.expected delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_cookie_and_session.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/NativeFileSessionHandlerTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/NativeSessionHandlerTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Handler/WriteCheckSessionHandlerTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/MetadataBagTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/MockArraySessionStorageTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/MockFileSessionStorageTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Proxy/NativeProxyTest.php delete mode 100644 lib/symfony/http-foundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php delete mode 100644 lib/symfony/http-foundation/Tests/StreamedResponseTest.php delete mode 100644 lib/symfony/http-foundation/Tests/schema/http-status-codes.rng delete mode 100644 lib/symfony/http-foundation/Tests/schema/iana-registry.rng delete mode 100644 lib/symfony/http-kernel/Tests/Bundle/BundleTest.php delete mode 100644 lib/symfony/http-kernel/Tests/CacheClearer/ChainCacheClearerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/CacheClearer/Psr6CacheClearerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php delete mode 100644 lib/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/ClientTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Config/EnvParametersResourceTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Config/FileLocatorTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Controller/ArgumentResolverTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Controller/ContainerControllerResolverTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php delete mode 100644 lib/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php delete mode 100644 lib/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DataCollector/Compiler.log delete mode 100644 lib/symfony/http-kernel/Tests/DataCollector/ConfigDataCollectorTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DataCollector/DataCollectorTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DataCollector/DumpDataCollectorTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DataCollector/ExceptionDataCollectorTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DataCollector/LoggerDataCollectorTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DataCollector/MemoryDataCollectorTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DataCollector/RequestDataCollectorTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DataCollector/Util/ValueExporterTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Debug/FileLinkFormatterTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Debug/TraceableEventDispatcherTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DependencyInjection/AddAnnotatedClassesToCachePassTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DependencyInjection/ControllerArgumentValueResolverPassTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DependencyInjection/FragmentRendererPassTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DependencyInjection/LazyLoadingFragmentHandlerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DependencyInjection/LoggerPassTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DependencyInjection/ResettableServicePassTest.php delete mode 100644 lib/symfony/http-kernel/Tests/DependencyInjection/ServicesResetterTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Event/FilterControllerArgumentsEventTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Event/GetResponseForExceptionEventTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/DebugHandlersListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/DumpListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/ExceptionListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/FragmentListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/LocaleListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/ProfilerListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/ResponseListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/RouterListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/SaveSessionListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/SessionListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/SurrogateListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/TestSessionListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/TranslatorListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/EventListener/ValidateRequestListenerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/AccessDeniedHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/BadRequestHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/ConflictHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/GoneHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/HttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/LengthRequiredHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/MethodNotAllowedHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/NotAcceptableHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/NotFoundHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/PreconditionFailedHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/PreconditionRequiredHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/ServiceUnavailableHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/TooManyRequestsHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/UnauthorizedHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/UnprocessableEntityHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Exception/UnsupportedMediaTypeHttpExceptionTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/123/Kernel123.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/BaseBundle/Resources/foo.txt delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/BaseBundle/Resources/hide.txt delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/Resources/foo.txt delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/bar.txt delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/foo.txt delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Bundle2Bundle/foo.txt delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/ChildBundle/Resources/foo.txt delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/ChildBundle/Resources/hide.txt delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/ClearableService.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Controller/BasicTypesController.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Controller/ExtendingRequest.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Controller/ExtendingSession.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Controller/NullableController.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Controller/VariadicController.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/DataCollector/CloneVarDataCollector.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/ExtensionAbsentBundle/ExtensionAbsentBundle.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/ExtensionNotValidBundle/DependencyInjection/ExtensionNotValidExtension.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/ExtensionNotValidBundle/ExtensionNotValidBundle.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/ExtensionPresentBundle/Command/FooCommand.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/ExtensionPresentBundle/ExtensionPresentBundle.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/KernelForOverrideName.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/KernelForTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/KernelWithoutBundles.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/ResettableService.php delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Resources/BaseBundle/hide.txt delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Resources/Bundle1Bundle/foo.txt delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Resources/ChildBundle/foo.txt delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/Resources/FooBundle/foo.txt delete mode 100644 lib/symfony/http-kernel/Tests/Fixtures/TestClient.php delete mode 100644 lib/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Fragment/InlineFragmentRendererTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php delete mode 100644 lib/symfony/http-kernel/Tests/HttpCache/EsiTest.php delete mode 100644 lib/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php delete mode 100644 lib/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php delete mode 100644 lib/symfony/http-kernel/Tests/HttpCache/ResponseCacheStrategyTest.php delete mode 100644 lib/symfony/http-kernel/Tests/HttpCache/SsiTest.php delete mode 100644 lib/symfony/http-kernel/Tests/HttpCache/StoreTest.php delete mode 100644 lib/symfony/http-kernel/Tests/HttpCache/SubRequestHandlerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/HttpCache/TestHttpKernel.php delete mode 100644 lib/symfony/http-kernel/Tests/HttpCache/TestMultipleHttpKernel.php delete mode 100644 lib/symfony/http-kernel/Tests/HttpKernelTest.php delete mode 100644 lib/symfony/http-kernel/Tests/KernelTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Log/LoggerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Logger.php delete mode 100644 lib/symfony/http-kernel/Tests/Profiler/FileProfilerStorageTest.php delete mode 100644 lib/symfony/http-kernel/Tests/Profiler/ProfilerTest.php delete mode 100644 lib/symfony/http-kernel/Tests/TestHttpKernel.php delete mode 100644 lib/symfony/http-kernel/Tests/UriSignerTest.php delete mode 100644 lib/symfony/routing/Tests/Annotation/RouteTest.php delete mode 100644 lib/symfony/routing/Tests/CompiledRouteTest.php delete mode 100644 lib/symfony/routing/Tests/DependencyInjection/RoutingResolverPassTest.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/AnnotatedClasses/AbstractClass.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/AnnotatedClasses/BarClass.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/AnnotatedClasses/BazClass.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/AnnotatedClasses/EncodingClass.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/AnnotatedClasses/FooClass.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/AnnotatedClasses/FooTrait.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/CustomCompiledRoute.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/CustomRouteCompiler.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/CustomXmlFileLoader.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/OtherAnnotatedClasses/AnonymousClassInTrait.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/OtherAnnotatedClasses/NoStartTagClass.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/OtherAnnotatedClasses/VariadicClass.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/RedirectableUrlMatcher.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/annotated.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/bad_format.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/bar.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/controller/import__controller.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/controller/import__controller.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/controller/import_controller.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/controller/import_controller.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/controller/import_override_defaults.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/controller/import_override_defaults.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/controller/override_defaults.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/controller/override_defaults.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/controller/routing.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/controller/routing.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/directory/recurse/routes1.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/directory/recurse/routes2.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/directory/routes3.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/directory_import/import.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/dumper/url_matcher0.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/dumper/url_matcher1.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/dumper/url_matcher2.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/dumper/url_matcher3.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/dumper/url_matcher4.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/dumper/url_matcher5.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/dumper/url_matcher6.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/dumper/url_matcher7.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/empty.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/file_resource.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/foo.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/foo1.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/glob/bar.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/glob/bar.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/glob/baz.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/glob/baz.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/glob/import_multiple.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/glob/import_multiple.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/glob/import_single.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/glob/import_single.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/glob/php_dsl.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/glob/php_dsl_bar.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/glob/php_dsl_baz.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/incomplete.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/list_defaults.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/list_in_list_defaults.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/list_in_map_defaults.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/list_null_values.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/localized/utf8.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/map_defaults.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/map_in_list_defaults.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/map_in_map_defaults.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/map_null_values.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/missing_id.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/missing_path.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/namespaceprefix.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/nonesense_resource_plus_path.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/nonesense_type_without_resource.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/nonvalid.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/nonvalid.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/nonvalid2.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/nonvalidkeys.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/nonvalidnode.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/nonvalidroute.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/null_values.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/php_dsl.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/php_dsl_sub.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/scalar_defaults.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/special_route_name.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/validpattern.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/validpattern.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/validpattern.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/validresource.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/validresource.xml delete mode 100644 lib/symfony/routing/Tests/Fixtures/validresource.yml delete mode 100644 lib/symfony/routing/Tests/Fixtures/with_define_path_variable.php delete mode 100644 lib/symfony/routing/Tests/Fixtures/withdoctype.xml delete mode 100644 lib/symfony/routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php delete mode 100644 lib/symfony/routing/Tests/Generator/UrlGeneratorTest.php delete mode 100644 lib/symfony/routing/Tests/Loader/AbstractAnnotationLoaderTest.php delete mode 100644 lib/symfony/routing/Tests/Loader/AnnotationClassLoaderTest.php delete mode 100644 lib/symfony/routing/Tests/Loader/AnnotationDirectoryLoaderTest.php delete mode 100644 lib/symfony/routing/Tests/Loader/AnnotationFileLoaderTest.php delete mode 100644 lib/symfony/routing/Tests/Loader/ClosureLoaderTest.php delete mode 100644 lib/symfony/routing/Tests/Loader/DirectoryLoaderTest.php delete mode 100644 lib/symfony/routing/Tests/Loader/GlobFileLoaderTest.php delete mode 100644 lib/symfony/routing/Tests/Loader/ObjectRouteLoaderTest.php delete mode 100644 lib/symfony/routing/Tests/Loader/PhpFileLoaderTest.php delete mode 100644 lib/symfony/routing/Tests/Loader/XmlFileLoaderTest.php delete mode 100644 lib/symfony/routing/Tests/Loader/YamlFileLoaderTest.php delete mode 100644 lib/symfony/routing/Tests/Matcher/DumpedRedirectableUrlMatcherTest.php delete mode 100644 lib/symfony/routing/Tests/Matcher/DumpedUrlMatcherTest.php delete mode 100644 lib/symfony/routing/Tests/Matcher/Dumper/DumperCollectionTest.php delete mode 100644 lib/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php delete mode 100644 lib/symfony/routing/Tests/Matcher/Dumper/StaticPrefixCollectionTest.php delete mode 100644 lib/symfony/routing/Tests/Matcher/RedirectableUrlMatcherTest.php delete mode 100644 lib/symfony/routing/Tests/Matcher/TraceableUrlMatcherTest.php delete mode 100644 lib/symfony/routing/Tests/Matcher/UrlMatcherTest.php delete mode 100644 lib/symfony/routing/Tests/RequestContextTest.php delete mode 100644 lib/symfony/routing/Tests/RouteCollectionBuilderTest.php delete mode 100644 lib/symfony/routing/Tests/RouteCollectionTest.php delete mode 100644 lib/symfony/routing/Tests/RouteCompilerTest.php delete mode 100644 lib/symfony/routing/Tests/RouteTest.php delete mode 100644 lib/symfony/routing/Tests/RouterTest.php delete mode 100644 lib/symfony/stopwatch/Tests/StopwatchEventTest.php delete mode 100644 lib/symfony/stopwatch/Tests/StopwatchPeriodTest.php delete mode 100644 lib/symfony/stopwatch/Tests/StopwatchTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/AppVariableTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Command/DebugCommandTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Command/LintCommandTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/AbstractBootstrap3HorizontalLayoutTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/AbstractBootstrap3LayoutTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/AbstractBootstrap4HorizontalLayoutTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/AbstractBootstrap4LayoutTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/CodeExtensionTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/DumpExtensionTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/ExpressionExtensionTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/Fixtures/StubFilesystemLoader.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/Fixtures/StubTranslator.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/Fixtures/templates/form/child_label.html.twig delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/Fixtures/templates/form/custom_widgets.html.twig delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/Fixtures/templates/form/page_dynamic_extends.html.twig delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/Fixtures/templates/form/parent_label.html.twig delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/Fixtures/templates/form/theme.html.twig delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/Fixtures/templates/form/theme_extends.html.twig delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/Fixtures/templates/form/theme_use.html.twig delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/FormExtensionBootstrap3HorizontalLayoutTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/FormExtensionBootstrap3LayoutTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/FormExtensionBootstrap4HorizontalLayoutTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/FormExtensionBootstrap4LayoutTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/FormExtensionDivLayoutTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/FormExtensionTableLayoutTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/FormExtensionTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/HttpFoundationExtensionTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/HttpKernelExtensionTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/RoutingExtensionTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/RuntimeLoaderProvider.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/StopwatchExtensionTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/TranslationExtensionTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/WebLinkExtensionTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Extension/WorkflowExtensionTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Fixtures/extractor/syntax_error.twig delete mode 100644 lib/symfony/twig-bridge/Tests/Fixtures/extractor/with_translations.html.twig delete mode 100644 lib/symfony/twig-bridge/Tests/Node/DumpNodeTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Node/FormThemeTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Node/SearchAndRenderBlockNodeTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Node/TransNodeTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/NodeVisitor/ScopeTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/NodeVisitor/TranslationDefaultDomainNodeVisitorTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/NodeVisitor/TranslationNodeVisitorTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/NodeVisitor/TwigNodeProvider.php delete mode 100644 lib/symfony/twig-bridge/Tests/TokenParser/FormThemeTokenParserTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/Translation/TwigExtractorTest.php delete mode 100644 lib/symfony/twig-bridge/Tests/TwigEngineTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/ContainerAwareRuntimeLoaderTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/Controller/ExceptionControllerTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/Controller/PreviewErrorControllerTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Compiler/ExtensionPassTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Compiler/TwigEnvironmentPassTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Compiler/TwigLoaderPassTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/ConfigurationTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/Bundle/ChildChildChildChildTwigBundle/Resources/views/layout.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/Bundle/ChildChildChildTwigBundle/Resources/views/layout.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/Bundle/ChildChildTwigBundle/Resources/views/layout.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/Bundle/ChildTwigBundle/Resources/views/layout.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/Resources/TwigBundle/views/layout.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/Resources/views/layout.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/php/customTemplateEscapingGuesser.php delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/php/empty.php delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/php/extra.php delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/php/formats.php delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/php/full.php delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/templates/bundles/BarBundle/layout.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/templates/bundles/TwigBundle/layout.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/templates/layout.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/xml/customTemplateEscapingGuesser.xml delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/xml/empty.xml delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/xml/extra.xml delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/xml/formats.xml delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/xml/full.xml delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/yml/customTemplateEscapingGuesser.yml delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/yml/empty.yml delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/yml/extra.yml delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/yml/formats.yml delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/Fixtures/yml/full.yml delete mode 100644 lib/symfony/twig-bundle/Tests/DependencyInjection/TwigExtensionTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/Fixtures/templates/BarBundle/Resources/views/index.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/Fixtures/templates/Foo/index.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/Fixtures/templates/Resources/BarBundle/views/base.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/Fixtures/templates/Resources/views/layout.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/Fixtures/templates/Resources/views/sub/sub.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/Functional/CacheWarmingTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/Functional/EmptyAppTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/Functional/NoTemplatingEntryTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/Functional/Resources/config/empty_routing.yml delete mode 100644 lib/symfony/twig-bundle/Tests/Functional/Resources/views/index.html.twig delete mode 100644 lib/symfony/twig-bundle/Tests/Loader/FilesystemLoaderTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/TemplateIteratorTest.php delete mode 100644 lib/symfony/twig-bundle/Tests/TestCase.php delete mode 100644 lib/symfony/var-dumper/Test/VarDumperTestTrait.php delete mode 100644 lib/symfony/var-dumper/Tests/Caster/CasterTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Caster/DateCasterTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Caster/ExceptionCasterTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Caster/PdoCasterTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Caster/RedisCasterTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Caster/SplCasterTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Caster/StubCasterTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Caster/XmlReaderCasterTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Cloner/DataTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Cloner/VarClonerTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Dumper/CliDumperTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Dumper/FunctionsTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Dumper/HtmlDumperTest.php delete mode 100644 lib/symfony/var-dumper/Tests/Fixtures/FooInterface.php delete mode 100644 lib/symfony/var-dumper/Tests/Fixtures/GeneratorDemo.php delete mode 100644 lib/symfony/var-dumper/Tests/Fixtures/NotLoadableClass.php delete mode 100644 lib/symfony/var-dumper/Tests/Fixtures/Php74.php delete mode 100644 lib/symfony/var-dumper/Tests/Fixtures/Twig.php delete mode 100644 lib/symfony/var-dumper/Tests/Fixtures/dumb-var.php delete mode 100644 lib/symfony/var-dumper/Tests/Fixtures/xml_reader.xml delete mode 100644 lib/symfony/var-dumper/Tests/Test/VarDumperTestTraitTest.php delete mode 100644 lib/symfony/web-profiler-bundle/Tests/Controller/ProfilerControllerTest.php delete mode 100644 lib/symfony/web-profiler-bundle/Tests/Csp/ContentSecurityPolicyHandlerTest.php delete mode 100644 lib/symfony/web-profiler-bundle/Tests/DependencyInjection/ConfigurationTest.php delete mode 100644 lib/symfony/web-profiler-bundle/Tests/DependencyInjection/WebProfilerExtensionTest.php delete mode 100644 lib/symfony/web-profiler-bundle/Tests/EventListener/WebDebugToolbarListenerTest.php delete mode 100644 lib/symfony/web-profiler-bundle/Tests/Fixtures/profile.data delete mode 100644 lib/symfony/web-profiler-bundle/Tests/Profiler/TemplateManagerTest.php delete mode 100644 lib/symfony/web-profiler-bundle/Tests/Resources/IconTest.php delete mode 100644 lib/symfony/web-profiler-bundle/Tests/TestCase.php delete mode 100644 lib/symfony/yaml/Tests/Command/LintCommandTest.php delete mode 100644 lib/symfony/yaml/Tests/DumperTest.php delete mode 100644 lib/symfony/yaml/Tests/Fixtures/YtsAnchorAlias.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/YtsBasicTests.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/YtsBlockMapping.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/YtsDocumentSeparator.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/YtsErrorTests.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/YtsFlowCollections.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/YtsFoldedScalars.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/YtsNullsAndEmpties.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/YtsSpecificationExamples.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/YtsTypeTransfers.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/arrow.gif delete mode 100644 lib/symfony/yaml/Tests/Fixtures/booleanMappingKeys.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/embededPhp.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/escapedCharacters.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/index.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/legacyBooleanMappingKeys.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/legacyNonStringKeys.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/legacyNullMappingKey.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/multiple_lines_as_literal_block.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/multiple_lines_as_literal_block_leading_space_in_first_line.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/nonStringKeys.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/not_readable.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/nullMappingKey.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/numericMappingKeys.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/sfComments.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/sfCompact.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/sfMergeKey.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/sfObjects.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/sfQuotes.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/sfTests.yml delete mode 100644 lib/symfony/yaml/Tests/Fixtures/unindentedCollections.yml delete mode 100644 lib/symfony/yaml/Tests/InlineTest.php delete mode 100644 lib/symfony/yaml/Tests/ParseExceptionTest.php delete mode 100644 lib/symfony/yaml/Tests/ParserTest.php delete mode 100644 lib/symfony/yaml/Tests/YamlTest.php delete mode 100644 lib/twig/twig/lib/Twig/Node/Expression/Test/Constant.php delete mode 100644 lib/twig/twig/lib/Twig/Node/Expression/Test/Defined.php delete mode 100644 lib/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php delete mode 100644 lib/twig/twig/lib/Twig/Node/Expression/Test/Even.php delete mode 100644 lib/twig/twig/lib/Twig/Node/Expression/Test/Null.php delete mode 100644 lib/twig/twig/lib/Twig/Node/Expression/Test/Odd.php delete mode 100644 lib/twig/twig/lib/Twig/Node/Expression/Test/Sameas.php delete mode 100644 lib/twig/twig/lib/Twig/Test/Function.php delete mode 100644 lib/twig/twig/lib/Twig/Test/IntegrationTestCase.php delete mode 100644 lib/twig/twig/lib/Twig/Test/Method.php delete mode 100644 lib/twig/twig/lib/Twig/Test/Node.php delete mode 100644 lib/twig/twig/lib/Twig/Test/NodeTestCase.php delete mode 100644 lib/twig/twig/src/Node/Expression/Test/ConstantTest.php delete mode 100644 lib/twig/twig/src/Node/Expression/Test/DefinedTest.php delete mode 100644 lib/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php delete mode 100644 lib/twig/twig/src/Node/Expression/Test/EvenTest.php delete mode 100644 lib/twig/twig/src/Node/Expression/Test/NullTest.php delete mode 100644 lib/twig/twig/src/Node/Expression/Test/OddTest.php delete mode 100644 lib/twig/twig/src/Node/Expression/Test/SameasTest.php diff --git a/.gitignore b/.gitignore index 51f650a97..d38435f9b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,11 @@ # composer reserver directory, from sources, populate/update using "composer install" vendor/* test/vendor/* +# remove tests from libs (N°2651) +/lib/**/test/** +/lib/**/tests/** +/lib/**/Test/** +/lib/**/Tests/** # all datas but listing prevention /data/** diff --git a/lib/pear/pear_exception/tests/PEAR/ExceptionTest.php b/lib/pear/pear_exception/tests/PEAR/ExceptionTest.php deleted file mode 100644 index 61d2df4f1..000000000 --- a/lib/pear/pear_exception/tests/PEAR/ExceptionTest.php +++ /dev/null @@ -1,78 +0,0 @@ -assertNull($e->getCause()); - } - - public function testGetCauseException() - { - $cause = new Exception('foo bar'); - $e = new PEAR_Exception('I caught an exception', $cause); - $this->assertNotNull($e->getCause()); - $this->assertInstanceOf('Exception', $e->getCause()); - $this->assertEquals($cause, $e->getCause()); - } - - public function testGetCauseMessage() - { - $cause = new Exception('foo bar'); - $e = new PEAR_Exception('I caught an exception', $cause); - - $e->getCauseMessage($causes); - $this->assertEquals('I caught an exception', $causes[0]['message']); - $this->assertEquals('foo bar', $causes[1]['message']); - } - - public function testGetTraceSafe() - { - $e = new PEAR_Exception('oops'); - $this->assertInternalType('array', $e->getTraceSafe()); - } - - public function testGetErrorClass() - { - $e = new PEAR_Exception('oops'); - $this->assertEquals('PEAR_ExceptionTest', $e->getErrorClass()); - } - - public function testGetErrorMethod() - { - $e = new PEAR_Exception('oops'); - $this->assertEquals('testGetErrorMethod', $e->getErrorMethod()); - } - - public function test__toString() - { - $e = new PEAR_Exception('oops'); - $this->assertInternalType('string', (string) $e); - $this->assertContains('oops', (string) $e); - } - - public function testToHtml() - { - $e = new PEAR_Exception('oops'); - $html = $e->toHtml(); - $this->assertInternalType('string', $html); - $this->assertContains('oops', $html); - } -} -?> diff --git a/lib/psr/log/Psr/Log/Test/LoggerInterfaceTest.php b/lib/psr/log/Psr/Log/Test/LoggerInterfaceTest.php deleted file mode 100644 index 9ecb6c4b0..000000000 --- a/lib/psr/log/Psr/Log/Test/LoggerInterfaceTest.php +++ /dev/null @@ -1,146 +0,0 @@ - ". - * - * Example ->error('Foo') would yield "error Foo". - * - * @return string[] - */ - abstract public function getLogs(); - - public function testImplements() - { - $this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger()); - } - - /** - * @dataProvider provideLevelsAndMessages - */ - public function testLogsAtAllLevels($level, $message) - { - $logger = $this->getLogger(); - $logger->{$level}($message, array('user' => 'Bob')); - $logger->log($level, $message, array('user' => 'Bob')); - - $expected = array( - $level.' message of level '.$level.' with context: Bob', - $level.' message of level '.$level.' with context: Bob', - ); - $this->assertEquals($expected, $this->getLogs()); - } - - public function provideLevelsAndMessages() - { - return array( - LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'), - LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'), - LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'), - LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'), - LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'), - LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'), - LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'), - LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'), - ); - } - - /** - * @expectedException \Psr\Log\InvalidArgumentException - */ - public function testThrowsOnInvalidLevel() - { - $logger = $this->getLogger(); - $logger->log('invalid level', 'Foo'); - } - - public function testContextReplacement() - { - $logger = $this->getLogger(); - $logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar')); - - $expected = array('info {Message {nothing} Bob Bar a}'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testObjectCastToString() - { - if (method_exists($this, 'createPartialMock')) { - $dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString')); - } else { - $dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString')); - } - $dummy->expects($this->once()) - ->method('__toString') - ->will($this->returnValue('DUMMY')); - - $this->getLogger()->warning($dummy); - - $expected = array('warning DUMMY'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testContextCanContainAnything() - { - $closed = fopen('php://memory', 'r'); - fclose($closed); - - $context = array( - 'bool' => true, - 'null' => null, - 'string' => 'Foo', - 'int' => 0, - 'float' => 0.5, - 'nested' => array('with object' => new DummyTest), - 'object' => new \DateTime, - 'resource' => fopen('php://memory', 'r'), - 'closed' => $closed, - ); - - $this->getLogger()->warning('Crazy context data', $context); - - $expected = array('warning Crazy context data'); - $this->assertEquals($expected, $this->getLogs()); - } - - public function testContextExceptionKeyCanBeExceptionOrOtherValues() - { - $logger = $this->getLogger(); - $logger->warning('Random message', array('exception' => 'oops')); - $logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail'))); - - $expected = array( - 'warning Random message', - 'critical Uncaught Exception!' - ); - $this->assertEquals($expected, $this->getLogs()); - } -} - -class DummyTest -{ - public function __toString() - { - return 'DummyTest'; - } -} diff --git a/lib/psr/log/Psr/Log/Test/TestLogger.php b/lib/psr/log/Psr/Log/Test/TestLogger.php deleted file mode 100644 index 1be323049..000000000 --- a/lib/psr/log/Psr/Log/Test/TestLogger.php +++ /dev/null @@ -1,147 +0,0 @@ - $level, - 'message' => $message, - 'context' => $context, - ]; - - $this->recordsByLevel[$record['level']][] = $record; - $this->records[] = $record; - } - - public function hasRecords($level) - { - return isset($this->recordsByLevel[$level]); - } - - public function hasRecord($record, $level) - { - if (is_string($record)) { - $record = ['message' => $record]; - } - return $this->hasRecordThatPasses(function ($rec) use ($record) { - if ($rec['message'] !== $record['message']) { - return false; - } - if (isset($record['context']) && $rec['context'] !== $record['context']) { - return false; - } - return true; - }, $level); - } - - public function hasRecordThatContains($message, $level) - { - return $this->hasRecordThatPasses(function ($rec) use ($message) { - return strpos($rec['message'], $message) !== false; - }, $level); - } - - public function hasRecordThatMatches($regex, $level) - { - return $this->hasRecordThatPasses(function ($rec) use ($regex) { - return preg_match($regex, $rec['message']) > 0; - }, $level); - } - - public function hasRecordThatPasses(callable $predicate, $level) - { - if (!isset($this->recordsByLevel[$level])) { - return false; - } - foreach ($this->recordsByLevel[$level] as $i => $rec) { - if (call_user_func($predicate, $rec, $i)) { - return true; - } - } - return false; - } - - public function __call($method, $args) - { - if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { - $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; - $level = strtolower($matches[2]); - if (method_exists($this, $genericMethod)) { - $args[] = $level; - return call_user_func_array([$this, $genericMethod], $args); - } - } - throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); - } - - public function reset() - { - $this->records = []; - $this->recordsByLevel = []; - } -} diff --git a/lib/symfony/cache/Tests/Adapter/AbstractRedisAdapterTest.php b/lib/symfony/cache/Tests/Adapter/AbstractRedisAdapterTest.php deleted file mode 100644 index d1fa9535c..000000000 --- a/lib/symfony/cache/Tests/Adapter/AbstractRedisAdapterTest.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Symfony\Component\Cache\Adapter\RedisAdapter; - -abstract class AbstractRedisAdapterTest extends AdapterTestCase -{ - protected $skippedTests = [ - 'testExpiration' => 'Testing expiration slows down the test suite', - 'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite', - 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', - ]; - - protected static $redis; - - public function createCachePool($defaultLifetime = 0) - { - return new RedisAdapter(self::$redis, str_replace('\\', '.', __CLASS__), $defaultLifetime); - } - - public static function setUpBeforeClass() - { - if (!\extension_loaded('redis')) { - self::markTestSkipped('Extension redis required.'); - } - if (!@((new \Redis())->connect(getenv('REDIS_HOST')))) { - $e = error_get_last(); - self::markTestSkipped($e['message']); - } - } - - public static function tearDownAfterClass() - { - self::$redis = null; - } -} diff --git a/lib/symfony/cache/Tests/Adapter/AdapterTestCase.php b/lib/symfony/cache/Tests/Adapter/AdapterTestCase.php deleted file mode 100644 index 5758a2861..000000000 --- a/lib/symfony/cache/Tests/Adapter/AdapterTestCase.php +++ /dev/null @@ -1,175 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Cache\IntegrationTests\CachePoolTest; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\PruneableInterface; - -abstract class AdapterTestCase extends CachePoolTest -{ - protected function setUp() - { - parent::setUp(); - - if (!\array_key_exists('testDeferredSaveWithoutCommit', $this->skippedTests) && \defined('HHVM_VERSION')) { - $this->skippedTests['testDeferredSaveWithoutCommit'] = 'Destructors are called late on HHVM.'; - } - - if (!\array_key_exists('testPrune', $this->skippedTests) && !$this->createCachePool() instanceof PruneableInterface) { - $this->skippedTests['testPrune'] = 'Not a pruneable cache pool.'; - } - } - - public function testDefaultLifeTime() - { - if (isset($this->skippedTests[__FUNCTION__])) { - $this->markTestSkipped($this->skippedTests[__FUNCTION__]); - } - - $cache = $this->createCachePool(2); - - $item = $cache->getItem('key.dlt'); - $item->set('value'); - $cache->save($item); - sleep(1); - - $item = $cache->getItem('key.dlt'); - $this->assertTrue($item->isHit()); - - sleep(2); - $item = $cache->getItem('key.dlt'); - $this->assertFalse($item->isHit()); - } - - public function testExpiration() - { - if (isset($this->skippedTests[__FUNCTION__])) { - $this->markTestSkipped($this->skippedTests[__FUNCTION__]); - } - - $cache = $this->createCachePool(); - $cache->save($cache->getItem('k1')->set('v1')->expiresAfter(2)); - $cache->save($cache->getItem('k2')->set('v2')->expiresAfter(366 * 86400)); - - sleep(3); - $item = $cache->getItem('k1'); - $this->assertFalse($item->isHit()); - $this->assertNull($item->get(), "Item's value must be null when isHit() is false."); - - $item = $cache->getItem('k2'); - $this->assertTrue($item->isHit()); - $this->assertSame('v2', $item->get()); - } - - public function testNotUnserializable() - { - if (isset($this->skippedTests[__FUNCTION__])) { - $this->markTestSkipped($this->skippedTests[__FUNCTION__]); - } - - $cache = $this->createCachePool(); - - $item = $cache->getItem('foo'); - $cache->save($item->set(new NotUnserializable())); - - $item = $cache->getItem('foo'); - $this->assertFalse($item->isHit()); - - foreach ($cache->getItems(['foo']) as $item) { - } - $cache->save($item->set(new NotUnserializable())); - - foreach ($cache->getItems(['foo']) as $item) { - } - $this->assertFalse($item->isHit()); - } - - public function testPrune() - { - if (isset($this->skippedTests[__FUNCTION__])) { - $this->markTestSkipped($this->skippedTests[__FUNCTION__]); - } - - if (!method_exists($this, 'isPruned')) { - $this->fail('Test classes for pruneable caches must implement `isPruned($cache, $name)` method.'); - } - - /** @var PruneableInterface|CacheItemPoolInterface $cache */ - $cache = $this->createCachePool(); - - $doSet = function ($name, $value, \DateInterval $expiresAfter = null) use ($cache) { - $item = $cache->getItem($name); - $item->set($value); - - if ($expiresAfter) { - $item->expiresAfter($expiresAfter); - } - - $cache->save($item); - }; - - $doSet('foo', 'foo-val', new \DateInterval('PT05S')); - $doSet('bar', 'bar-val', new \DateInterval('PT10S')); - $doSet('baz', 'baz-val', new \DateInterval('PT15S')); - $doSet('qux', 'qux-val', new \DateInterval('PT20S')); - - sleep(30); - $cache->prune(); - $this->assertTrue($this->isPruned($cache, 'foo')); - $this->assertTrue($this->isPruned($cache, 'bar')); - $this->assertTrue($this->isPruned($cache, 'baz')); - $this->assertTrue($this->isPruned($cache, 'qux')); - - $doSet('foo', 'foo-val'); - $doSet('bar', 'bar-val', new \DateInterval('PT20S')); - $doSet('baz', 'baz-val', new \DateInterval('PT40S')); - $doSet('qux', 'qux-val', new \DateInterval('PT80S')); - - $cache->prune(); - $this->assertFalse($this->isPruned($cache, 'foo')); - $this->assertFalse($this->isPruned($cache, 'bar')); - $this->assertFalse($this->isPruned($cache, 'baz')); - $this->assertFalse($this->isPruned($cache, 'qux')); - - sleep(30); - $cache->prune(); - $this->assertFalse($this->isPruned($cache, 'foo')); - $this->assertTrue($this->isPruned($cache, 'bar')); - $this->assertFalse($this->isPruned($cache, 'baz')); - $this->assertFalse($this->isPruned($cache, 'qux')); - - sleep(30); - $cache->prune(); - $this->assertFalse($this->isPruned($cache, 'foo')); - $this->assertTrue($this->isPruned($cache, 'baz')); - $this->assertFalse($this->isPruned($cache, 'qux')); - - sleep(30); - $cache->prune(); - $this->assertFalse($this->isPruned($cache, 'foo')); - $this->assertTrue($this->isPruned($cache, 'qux')); - } -} - -class NotUnserializable implements \Serializable -{ - public function serialize() - { - return serialize(123); - } - - public function unserialize($ser) - { - throw new \Exception(__CLASS__); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/ApcuAdapterTest.php b/lib/symfony/cache/Tests/Adapter/ApcuAdapterTest.php deleted file mode 100644 index 5cca73f56..000000000 --- a/lib/symfony/cache/Tests/Adapter/ApcuAdapterTest.php +++ /dev/null @@ -1,124 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Psr\Log\NullLogger; -use Symfony\Component\Cache\Adapter\ApcuAdapter; - -class ApcuAdapterTest extends AdapterTestCase -{ - protected $skippedTests = [ - 'testExpiration' => 'Testing expiration slows down the test suite', - 'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite', - 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', - ]; - - public function createCachePool($defaultLifetime = 0) - { - if (!\function_exists('apcu_fetch') || !filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN)) { - $this->markTestSkipped('APCu extension is required.'); - } - if ('cli' === \PHP_SAPI && !filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) { - if ('testWithCliSapi' !== $this->getName()) { - $this->markTestSkipped('apc.enable_cli=1 is required.'); - } - } - if ('\\' === \DIRECTORY_SEPARATOR) { - $this->markTestSkipped('Fails transiently on Windows.'); - } - - return new ApcuAdapter(str_replace('\\', '.', __CLASS__), $defaultLifetime); - } - - public function testUnserializable() - { - $pool = $this->createCachePool(); - - $item = $pool->getItem('foo'); - $item->set(function () {}); - - $this->assertFalse($pool->save($item)); - - $item = $pool->getItem('foo'); - $this->assertFalse($item->isHit()); - } - - public function testVersion() - { - $namespace = str_replace('\\', '.', \get_class($this)); - - $pool1 = new ApcuAdapter($namespace, 0, 'p1'); - - $item = $pool1->getItem('foo'); - $this->assertFalse($item->isHit()); - $this->assertTrue($pool1->save($item->set('bar'))); - - $item = $pool1->getItem('foo'); - $this->assertTrue($item->isHit()); - $this->assertSame('bar', $item->get()); - - $pool2 = new ApcuAdapter($namespace, 0, 'p2'); - - $item = $pool2->getItem('foo'); - $this->assertFalse($item->isHit()); - $this->assertNull($item->get()); - - $item = $pool1->getItem('foo'); - $this->assertFalse($item->isHit()); - $this->assertNull($item->get()); - } - - public function testNamespace() - { - $namespace = str_replace('\\', '.', \get_class($this)); - - $pool1 = new ApcuAdapter($namespace.'_1', 0, 'p1'); - - $item = $pool1->getItem('foo'); - $this->assertFalse($item->isHit()); - $this->assertTrue($pool1->save($item->set('bar'))); - - $item = $pool1->getItem('foo'); - $this->assertTrue($item->isHit()); - $this->assertSame('bar', $item->get()); - - $pool2 = new ApcuAdapter($namespace.'_2', 0, 'p1'); - - $item = $pool2->getItem('foo'); - $this->assertFalse($item->isHit()); - $this->assertNull($item->get()); - - $item = $pool1->getItem('foo'); - $this->assertTrue($item->isHit()); - $this->assertSame('bar', $item->get()); - } - - public function testWithCliSapi() - { - try { - // disable PHPUnit error handler to mimic a production environment - $isCalled = false; - set_error_handler(function () use (&$isCalled) { - $isCalled = true; - }); - $pool = new ApcuAdapter(str_replace('\\', '.', __CLASS__)); - $pool->setLogger(new NullLogger()); - - $item = $pool->getItem('foo'); - $item->isHit(); - $pool->save($item->set('bar')); - $this->assertFalse($isCalled); - } finally { - restore_error_handler(); - } - } -} diff --git a/lib/symfony/cache/Tests/Adapter/ArrayAdapterTest.php b/lib/symfony/cache/Tests/Adapter/ArrayAdapterTest.php deleted file mode 100644 index e6adc9d01..000000000 --- a/lib/symfony/cache/Tests/Adapter/ArrayAdapterTest.php +++ /dev/null @@ -1,56 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Symfony\Component\Cache\Adapter\ArrayAdapter; - -/** - * @group time-sensitive - */ -class ArrayAdapterTest extends AdapterTestCase -{ - protected $skippedTests = [ - 'testDeferredSaveWithoutCommit' => 'Assumes a shared cache which ArrayAdapter is not.', - 'testSaveWithoutExpire' => 'Assumes a shared cache which ArrayAdapter is not.', - ]; - - public function createCachePool($defaultLifetime = 0) - { - return new ArrayAdapter($defaultLifetime); - } - - public function testGetValuesHitAndMiss() - { - /** @var ArrayAdapter $cache */ - $cache = $this->createCachePool(); - - // Hit - $item = $cache->getItem('foo'); - $item->set('4711'); - $cache->save($item); - - $fooItem = $cache->getItem('foo'); - $this->assertTrue($fooItem->isHit()); - $this->assertEquals('4711', $fooItem->get()); - - // Miss (should be present as NULL in $values) - $cache->getItem('bar'); - - $values = $cache->getValues(); - - $this->assertCount(2, $values); - $this->assertArrayHasKey('foo', $values); - $this->assertSame(serialize('4711'), $values['foo']); - $this->assertArrayHasKey('bar', $values); - $this->assertNull($values['bar']); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/ChainAdapterTest.php b/lib/symfony/cache/Tests/Adapter/ChainAdapterTest.php deleted file mode 100644 index 5e48930dd..000000000 --- a/lib/symfony/cache/Tests/Adapter/ChainAdapterTest.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use PHPUnit\Framework\MockObject\MockObject; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\ChainAdapter; -use Symfony\Component\Cache\Adapter\FilesystemAdapter; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\Tests\Fixtures\ExternalAdapter; - -/** - * @author Kévin Dunglas - * @group time-sensitive - */ -class ChainAdapterTest extends AdapterTestCase -{ - public function createCachePool($defaultLifetime = 0) - { - return new ChainAdapter([new ArrayAdapter($defaultLifetime), new ExternalAdapter(), new FilesystemAdapter('', $defaultLifetime)], $defaultLifetime); - } - - public function testEmptyAdaptersException() - { - $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('At least one adapter must be specified.'); - new ChainAdapter([]); - } - - public function testInvalidAdapterException() - { - $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('The class "stdClass" does not implement'); - new ChainAdapter([new \stdClass()]); - } - - public function testPrune() - { - if (isset($this->skippedTests[__FUNCTION__])) { - $this->markTestSkipped($this->skippedTests[__FUNCTION__]); - } - - $cache = new ChainAdapter([ - $this->getPruneableMock(), - $this->getNonPruneableMock(), - $this->getPruneableMock(), - ]); - $this->assertTrue($cache->prune()); - - $cache = new ChainAdapter([ - $this->getPruneableMock(), - $this->getFailingPruneableMock(), - $this->getPruneableMock(), - ]); - $this->assertFalse($cache->prune()); - } - - /** - * @return MockObject|PruneableCacheInterface - */ - private function getPruneableMock() - { - $pruneable = $this - ->getMockBuilder(PruneableCacheInterface::class) - ->getMock(); - - $pruneable - ->expects($this->atLeastOnce()) - ->method('prune') - ->willReturn(true); - - return $pruneable; - } - - /** - * @return MockObject|PruneableCacheInterface - */ - private function getFailingPruneableMock() - { - $pruneable = $this - ->getMockBuilder(PruneableCacheInterface::class) - ->getMock(); - - $pruneable - ->expects($this->atLeastOnce()) - ->method('prune') - ->willReturn(false); - - return $pruneable; - } - - /** - * @return MockObject|AdapterInterface - */ - private function getNonPruneableMock() - { - return $this - ->getMockBuilder(AdapterInterface::class) - ->getMock(); - } -} - -interface PruneableCacheInterface extends PruneableInterface, AdapterInterface -{ -} diff --git a/lib/symfony/cache/Tests/Adapter/DoctrineAdapterTest.php b/lib/symfony/cache/Tests/Adapter/DoctrineAdapterTest.php deleted file mode 100644 index 8f520cb59..000000000 --- a/lib/symfony/cache/Tests/Adapter/DoctrineAdapterTest.php +++ /dev/null @@ -1,32 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Symfony\Component\Cache\Adapter\DoctrineAdapter; -use Symfony\Component\Cache\Tests\Fixtures\ArrayCache; - -/** - * @group time-sensitive - */ -class DoctrineAdapterTest extends AdapterTestCase -{ - protected $skippedTests = [ - 'testDeferredSaveWithoutCommit' => 'Assumes a shared cache which ArrayCache is not.', - 'testSaveWithoutExpire' => 'Assumes a shared cache which ArrayCache is not.', - 'testNotUnserializable' => 'ArrayCache does not use serialize/unserialize', - ]; - - public function createCachePool($defaultLifetime = 0) - { - return new DoctrineAdapter(new ArrayCache($defaultLifetime), '', $defaultLifetime); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/FilesystemAdapterTest.php b/lib/symfony/cache/Tests/Adapter/FilesystemAdapterTest.php deleted file mode 100644 index fa8306826..000000000 --- a/lib/symfony/cache/Tests/Adapter/FilesystemAdapterTest.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\Adapter\FilesystemAdapter; - -/** - * @group time-sensitive - */ -class FilesystemAdapterTest extends AdapterTestCase -{ - public function createCachePool($defaultLifetime = 0) - { - return new FilesystemAdapter('', $defaultLifetime); - } - - public static function tearDownAfterClass() - { - self::rmdir(sys_get_temp_dir().'/symfony-cache'); - } - - public static function rmdir($dir) - { - if (!file_exists($dir)) { - return; - } - if (!$dir || 0 !== strpos(\dirname($dir), sys_get_temp_dir())) { - throw new \Exception(__METHOD__."() operates only on subdirs of system's temp dir"); - } - $children = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($dir, \RecursiveDirectoryIterator::SKIP_DOTS), - \RecursiveIteratorIterator::CHILD_FIRST - ); - foreach ($children as $child) { - if ($child->isDir()) { - rmdir($child); - } else { - unlink($child); - } - } - rmdir($dir); - } - - protected function isPruned(CacheItemPoolInterface $cache, $name) - { - $getFileMethod = (new \ReflectionObject($cache))->getMethod('getFile'); - $getFileMethod->setAccessible(true); - - return !file_exists($getFileMethod->invoke($cache, $name)); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php b/lib/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php deleted file mode 100644 index 536e2c2d4..000000000 --- a/lib/symfony/cache/Tests/Adapter/MaxIdLengthAdapterTest.php +++ /dev/null @@ -1,87 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Cache\Adapter\AbstractAdapter; - -class MaxIdLengthAdapterTest extends TestCase -{ - public function testLongKey() - { - $cache = $this->getMockBuilder(MaxIdLengthAdapter::class) - ->setConstructorArgs([str_repeat('-', 10)]) - ->setMethods(['doHave', 'doFetch', 'doDelete', 'doSave', 'doClear']) - ->getMock(); - - $cache->expects($this->exactly(2)) - ->method('doHave') - ->withConsecutive( - [$this->equalTo('----------:0GTYWa9n4ed8vqNlOT2iEr:')], - [$this->equalTo('----------:---------------------------------------')] - ); - - $cache->hasItem(str_repeat('-', 40)); - $cache->hasItem(str_repeat('-', 39)); - } - - public function testLongKeyVersioning() - { - $cache = $this->getMockBuilder(MaxIdLengthAdapter::class) - ->setConstructorArgs([str_repeat('-', 26)]) - ->getMock(); - - $cache - ->method('doFetch') - ->willReturn(['2:']); - - $reflectionClass = new \ReflectionClass(AbstractAdapter::class); - - $reflectionMethod = $reflectionClass->getMethod('getId'); - $reflectionMethod->setAccessible(true); - - // No versioning enabled - $this->assertEquals('--------------------------:------------', $reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)])); - $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)]))); - $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 23)]))); - $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 40)]))); - - $reflectionProperty = $reflectionClass->getProperty('versioningIsEnabled'); - $reflectionProperty->setAccessible(true); - $reflectionProperty->setValue($cache, true); - - // Versioning enabled - $this->assertEquals('--------------------------:2:------------', $reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)])); - $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)]))); - $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 23)]))); - $this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 40)]))); - } - - public function testTooLongNamespace() - { - $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('Namespace must be 26 chars max, 40 given ("----------------------------------------")'); - $this->getMockBuilder(MaxIdLengthAdapter::class) - ->setConstructorArgs([str_repeat('-', 40)]) - ->getMock(); - } -} - -abstract class MaxIdLengthAdapter extends AbstractAdapter -{ - protected $maxIdLength = 50; - - public function __construct($ns) - { - parent::__construct($ns); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/MemcachedAdapterTest.php b/lib/symfony/cache/Tests/Adapter/MemcachedAdapterTest.php deleted file mode 100644 index 3a996079a..000000000 --- a/lib/symfony/cache/Tests/Adapter/MemcachedAdapterTest.php +++ /dev/null @@ -1,198 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Adapter\MemcachedAdapter; - -class MemcachedAdapterTest extends AdapterTestCase -{ - protected $skippedTests = [ - 'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite', - 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', - ]; - - protected static $client; - - public static function setUpBeforeClass() - { - if (!MemcachedAdapter::isSupported()) { - self::markTestSkipped('Extension memcached >=2.2.0 required.'); - } - self::$client = AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST'), ['binary_protocol' => false]); - self::$client->get('foo'); - $code = self::$client->getResultCode(); - - if (\Memcached::RES_SUCCESS !== $code && \Memcached::RES_NOTFOUND !== $code) { - self::markTestSkipped('Memcached error: '.strtolower(self::$client->getResultMessage())); - } - } - - public function createCachePool($defaultLifetime = 0) - { - $client = $defaultLifetime ? AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST')) : self::$client; - - return new MemcachedAdapter($client, str_replace('\\', '.', __CLASS__), $defaultLifetime); - } - - public function testOptions() - { - $client = MemcachedAdapter::createConnection([], [ - 'libketama_compatible' => false, - 'distribution' => 'modula', - 'compression' => true, - 'serializer' => 'php', - 'hash' => 'md5', - ]); - - $this->assertSame(\Memcached::SERIALIZER_PHP, $client->getOption(\Memcached::OPT_SERIALIZER)); - $this->assertSame(\Memcached::HASH_MD5, $client->getOption(\Memcached::OPT_HASH)); - $this->assertTrue($client->getOption(\Memcached::OPT_COMPRESSION)); - $this->assertSame(0, $client->getOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE)); - $this->assertSame(\Memcached::DISTRIBUTION_MODULA, $client->getOption(\Memcached::OPT_DISTRIBUTION)); - } - - /** - * @dataProvider provideBadOptions - */ - public function testBadOptions($name, $value) - { - $this->expectException('ErrorException'); - $this->expectExceptionMessage('constant(): Couldn\'t find constant Memcached::'); - MemcachedAdapter::createConnection([], [$name => $value]); - } - - public function provideBadOptions() - { - return [ - ['foo', 'bar'], - ['hash', 'zyx'], - ['serializer', 'zyx'], - ['distribution', 'zyx'], - ]; - } - - public function testDefaultOptions() - { - $this->assertTrue(MemcachedAdapter::isSupported()); - - $client = MemcachedAdapter::createConnection([]); - - $this->assertTrue($client->getOption(\Memcached::OPT_COMPRESSION)); - $this->assertSame(1, $client->getOption(\Memcached::OPT_BINARY_PROTOCOL)); - $this->assertSame(1, $client->getOption(\Memcached::OPT_TCP_NODELAY)); - $this->assertSame(1, $client->getOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE)); - } - - public function testOptionSerializer() - { - $this->expectException('Symfony\Component\Cache\Exception\CacheException'); - $this->expectExceptionMessage('MemcachedAdapter: "serializer" option must be "php" or "igbinary".'); - if (!\Memcached::HAVE_JSON) { - $this->markTestSkipped('Memcached::HAVE_JSON required'); - } - - new MemcachedAdapter(MemcachedAdapter::createConnection([], ['serializer' => 'json'])); - } - - /** - * @dataProvider provideServersSetting - */ - public function testServersSetting($dsn, $host, $port) - { - $client1 = MemcachedAdapter::createConnection($dsn); - $client2 = MemcachedAdapter::createConnection([$dsn]); - $client3 = MemcachedAdapter::createConnection([[$host, $port]]); - $expect = [ - 'host' => $host, - 'port' => $port, - ]; - - $f = function ($s) { return ['host' => $s['host'], 'port' => $s['port']]; }; - $this->assertSame([$expect], array_map($f, $client1->getServerList())); - $this->assertSame([$expect], array_map($f, $client2->getServerList())); - $this->assertSame([$expect], array_map($f, $client3->getServerList())); - } - - public function provideServersSetting() - { - yield [ - 'memcached://127.0.0.1/50', - '127.0.0.1', - 11211, - ]; - yield [ - 'memcached://localhost:11222?weight=25', - 'localhost', - 11222, - ]; - if (filter_var(ini_get('memcached.use_sasl'), FILTER_VALIDATE_BOOLEAN)) { - yield [ - 'memcached://user:password@127.0.0.1?weight=50', - '127.0.0.1', - 11211, - ]; - } - yield [ - 'memcached:///var/run/memcached.sock?weight=25', - '/var/run/memcached.sock', - 0, - ]; - yield [ - 'memcached:///var/local/run/memcached.socket?weight=25', - '/var/local/run/memcached.socket', - 0, - ]; - if (filter_var(ini_get('memcached.use_sasl'), FILTER_VALIDATE_BOOLEAN)) { - yield [ - 'memcached://user:password@/var/local/run/memcached.socket?weight=25', - '/var/local/run/memcached.socket', - 0, - ]; - } - } - - /** - * @dataProvider provideDsnWithOptions - */ - public function testDsnWithOptions($dsn, array $options, array $expectedOptions) - { - $client = MemcachedAdapter::createConnection($dsn, $options); - - foreach ($expectedOptions as $option => $expect) { - $this->assertSame($expect, $client->getOption($option)); - } - } - - public function provideDsnWithOptions() - { - if (!class_exists('\Memcached')) { - self::markTestSkipped('Extension memcached required.'); - } - - yield [ - 'memcached://localhost:11222?retry_timeout=10', - [\Memcached::OPT_RETRY_TIMEOUT => 8], - [\Memcached::OPT_RETRY_TIMEOUT => 10], - ]; - yield [ - 'memcached://localhost:11222?socket_recv_size=1&socket_send_size=2', - [\Memcached::OPT_RETRY_TIMEOUT => 8], - [\Memcached::OPT_SOCKET_RECV_SIZE => 1, \Memcached::OPT_SOCKET_SEND_SIZE => 2, \Memcached::OPT_RETRY_TIMEOUT => 8], - ]; - } - - public function testClear() - { - $this->assertTrue($this->createCachePool()->clear()); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/NamespacedProxyAdapterTest.php b/lib/symfony/cache/Tests/Adapter/NamespacedProxyAdapterTest.php deleted file mode 100644 index c27140333..000000000 --- a/lib/symfony/cache/Tests/Adapter/NamespacedProxyAdapterTest.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\ProxyAdapter; - -/** - * @group time-sensitive - */ -class NamespacedProxyAdapterTest extends ProxyAdapterTest -{ - public function createCachePool($defaultLifetime = 0) - { - return new ProxyAdapter(new ArrayAdapter($defaultLifetime), 'foo', $defaultLifetime); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/NullAdapterTest.php b/lib/symfony/cache/Tests/Adapter/NullAdapterTest.php deleted file mode 100644 index b771fa0ed..000000000 --- a/lib/symfony/cache/Tests/Adapter/NullAdapterTest.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use PHPUnit\Framework\TestCase; -use Psr\Cache\CacheItemInterface; -use Symfony\Component\Cache\Adapter\NullAdapter; - -/** - * @group time-sensitive - */ -class NullAdapterTest extends TestCase -{ - public function createCachePool() - { - return new NullAdapter(); - } - - public function testGetItem() - { - $adapter = $this->createCachePool(); - - $item = $adapter->getItem('key'); - $this->assertFalse($item->isHit()); - $this->assertNull($item->get(), "Item's value must be null when isHit is false."); - } - - public function testHasItem() - { - $this->assertFalse($this->createCachePool()->hasItem('key')); - } - - public function testGetItems() - { - $adapter = $this->createCachePool(); - - $keys = ['foo', 'bar', 'baz', 'biz']; - - /** @var CacheItemInterface[] $items */ - $items = $adapter->getItems($keys); - $count = 0; - - foreach ($items as $key => $item) { - $itemKey = $item->getKey(); - - $this->assertEquals($itemKey, $key, 'Keys must be preserved when fetching multiple items'); - $this->assertContains($key, $keys, 'Cache key can not change.'); - $this->assertFalse($item->isHit()); - - // Remove $key for $keys - foreach ($keys as $k => $v) { - if ($v === $key) { - unset($keys[$k]); - } - } - - ++$count; - } - - $this->assertSame(4, $count); - } - - public function testIsHit() - { - $adapter = $this->createCachePool(); - - $item = $adapter->getItem('key'); - $this->assertFalse($item->isHit()); - } - - public function testClear() - { - $this->assertTrue($this->createCachePool()->clear()); - } - - public function testDeleteItem() - { - $this->assertTrue($this->createCachePool()->deleteItem('key')); - } - - public function testDeleteItems() - { - $this->assertTrue($this->createCachePool()->deleteItems(['key', 'foo', 'bar'])); - } - - public function testSave() - { - $adapter = $this->createCachePool(); - - $item = $adapter->getItem('key'); - $this->assertFalse($item->isHit()); - $this->assertNull($item->get(), "Item's value must be null when isHit is false."); - - $this->assertFalse($adapter->save($item)); - } - - public function testDeferredSave() - { - $adapter = $this->createCachePool(); - - $item = $adapter->getItem('key'); - $this->assertFalse($item->isHit()); - $this->assertNull($item->get(), "Item's value must be null when isHit is false."); - - $this->assertFalse($adapter->saveDeferred($item)); - } - - public function testCommit() - { - $adapter = $this->createCachePool(); - - $item = $adapter->getItem('key'); - $this->assertFalse($item->isHit()); - $this->assertNull($item->get(), "Item's value must be null when isHit is false."); - - $this->assertFalse($adapter->saveDeferred($item)); - $this->assertFalse($this->createCachePool()->commit()); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/PdoAdapterTest.php b/lib/symfony/cache/Tests/Adapter/PdoAdapterTest.php deleted file mode 100644 index dd2a91185..000000000 --- a/lib/symfony/cache/Tests/Adapter/PdoAdapterTest.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Symfony\Component\Cache\Adapter\PdoAdapter; -use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait; - -/** - * @group time-sensitive - */ -class PdoAdapterTest extends AdapterTestCase -{ - use PdoPruneableTrait; - - protected static $dbFile; - - public static function setUpBeforeClass() - { - if (!\extension_loaded('pdo_sqlite')) { - self::markTestSkipped('Extension pdo_sqlite required.'); - } - - self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); - - $pool = new PdoAdapter('sqlite:'.self::$dbFile); - $pool->createTable(); - } - - public static function tearDownAfterClass() - { - @unlink(self::$dbFile); - } - - public function createCachePool($defaultLifetime = 0) - { - return new PdoAdapter('sqlite:'.self::$dbFile, 'ns', $defaultLifetime); - } - - public function testCleanupExpiredItems() - { - $pdo = new \PDO('sqlite:'.self::$dbFile); - - $getCacheItemCount = function () use ($pdo) { - return (int) $pdo->query('SELECT COUNT(*) FROM cache_items')->fetch(\PDO::FETCH_COLUMN); - }; - - $this->assertSame(0, $getCacheItemCount()); - - $cache = $this->createCachePool(); - - $item = $cache->getItem('some_nice_key'); - $item->expiresAfter(1); - $item->set(1); - - $cache->save($item); - $this->assertSame(1, $getCacheItemCount()); - - sleep(2); - - $newItem = $cache->getItem($item->getKey()); - $this->assertFalse($newItem->isHit()); - $this->assertSame(0, $getCacheItemCount(), 'PDOAdapter must clean up expired items'); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/PdoDbalAdapterTest.php b/lib/symfony/cache/Tests/Adapter/PdoDbalAdapterTest.php deleted file mode 100644 index aa53958cf..000000000 --- a/lib/symfony/cache/Tests/Adapter/PdoDbalAdapterTest.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Doctrine\DBAL\DriverManager; -use Symfony\Component\Cache\Adapter\PdoAdapter; -use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait; - -/** - * @group time-sensitive - */ -class PdoDbalAdapterTest extends AdapterTestCase -{ - use PdoPruneableTrait; - - protected static $dbFile; - - public static function setUpBeforeClass() - { - if (!\extension_loaded('pdo_sqlite')) { - self::markTestSkipped('Extension pdo_sqlite required.'); - } - - self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); - - $pool = new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); - $pool->createTable(); - } - - public static function tearDownAfterClass() - { - @unlink(self::$dbFile); - } - - public function createCachePool($defaultLifetime = 0) - { - return new PdoAdapter(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]), '', $defaultLifetime); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/PhpArrayAdapterTest.php b/lib/symfony/cache/Tests/Adapter/PhpArrayAdapterTest.php deleted file mode 100644 index 751f758cc..000000000 --- a/lib/symfony/cache/Tests/Adapter/PhpArrayAdapterTest.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Psr\Cache\CacheItemInterface; -use Symfony\Component\Cache\Adapter\NullAdapter; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; - -/** - * @group time-sensitive - */ -class PhpArrayAdapterTest extends AdapterTestCase -{ - protected $skippedTests = [ - 'testBasicUsage' => 'PhpArrayAdapter is read-only.', - 'testBasicUsageWithLongKey' => 'PhpArrayAdapter is read-only.', - 'testClear' => 'PhpArrayAdapter is read-only.', - 'testClearWithDeferredItems' => 'PhpArrayAdapter is read-only.', - 'testDeleteItem' => 'PhpArrayAdapter is read-only.', - 'testSaveExpired' => 'PhpArrayAdapter is read-only.', - 'testSaveWithoutExpire' => 'PhpArrayAdapter is read-only.', - 'testDeferredSave' => 'PhpArrayAdapter is read-only.', - 'testDeferredSaveWithoutCommit' => 'PhpArrayAdapter is read-only.', - 'testDeleteItems' => 'PhpArrayAdapter is read-only.', - 'testDeleteDeferredItem' => 'PhpArrayAdapter is read-only.', - 'testCommit' => 'PhpArrayAdapter is read-only.', - 'testSaveDeferredWhenChangingValues' => 'PhpArrayAdapter is read-only.', - 'testSaveDeferredOverwrite' => 'PhpArrayAdapter is read-only.', - 'testIsHitDeferred' => 'PhpArrayAdapter is read-only.', - - 'testExpiresAt' => 'PhpArrayAdapter does not support expiration.', - 'testExpiresAtWithNull' => 'PhpArrayAdapter does not support expiration.', - 'testExpiresAfterWithNull' => 'PhpArrayAdapter does not support expiration.', - 'testDeferredExpired' => 'PhpArrayAdapter does not support expiration.', - 'testExpiration' => 'PhpArrayAdapter does not support expiration.', - - 'testGetItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', - 'testGetItemsInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', - 'testHasItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', - 'testDeleteItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', - 'testDeleteItemsInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', - - 'testDefaultLifeTime' => 'PhpArrayAdapter does not allow configuring a default lifetime.', - 'testPrune' => 'PhpArrayAdapter just proxies', - ]; - - protected static $file; - - public static function setUpBeforeClass() - { - self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php'; - } - - protected function tearDown() - { - if (file_exists(sys_get_temp_dir().'/symfony-cache')) { - FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); - } - } - - public function createCachePool() - { - return new PhpArrayAdapterWrapper(self::$file, new NullAdapter()); - } - - public function testStore() - { - $arrayWithRefs = []; - $arrayWithRefs[0] = 123; - $arrayWithRefs[1] = &$arrayWithRefs[0]; - - $object = (object) [ - 'foo' => 'bar', - 'foo2' => 'bar2', - ]; - - $expected = [ - 'null' => null, - 'serializedString' => serialize($object), - 'arrayWithRefs' => $arrayWithRefs, - 'object' => $object, - 'arrayWithObject' => ['bar' => $object], - ]; - - $adapter = $this->createCachePool(); - $adapter->warmUp($expected); - - foreach ($expected as $key => $value) { - $this->assertSame(serialize($value), serialize($adapter->getItem($key)->get()), 'Warm up should create a PHP file that OPCache can load in memory'); - } - } - - public function testStoredFile() - { - $expected = [ - 'integer' => 42, - 'float' => 42.42, - 'boolean' => true, - 'array_simple' => ['foo', 'bar'], - 'array_associative' => ['foo' => 'bar', 'foo2' => 'bar2'], - ]; - - $adapter = $this->createCachePool(); - $adapter->warmUp($expected); - - $values = eval(substr(file_get_contents(self::$file), 6)); - - $this->assertSame($expected, $values, 'Warm up should create a PHP file that OPCache can load in memory'); - } -} - -class PhpArrayAdapterWrapper extends PhpArrayAdapter -{ - public function save(CacheItemInterface $item) - { - \call_user_func(\Closure::bind(function () use ($item) { - $this->values[$item->getKey()] = $item->get(); - $this->warmUp($this->values); - $this->values = eval(substr(file_get_contents($this->file), 6)); - }, $this, PhpArrayAdapter::class)); - - return true; - } -} diff --git a/lib/symfony/cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php b/lib/symfony/cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php deleted file mode 100644 index 4bdd7580f..000000000 --- a/lib/symfony/cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Symfony\Component\Cache\Adapter\FilesystemAdapter; -use Symfony\Component\Cache\Adapter\PhpArrayAdapter; - -/** - * @group time-sensitive - */ -class PhpArrayAdapterWithFallbackTest extends AdapterTestCase -{ - protected $skippedTests = [ - 'testGetItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', - 'testGetItemsInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', - 'testHasItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', - 'testDeleteItemInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', - 'testDeleteItemsInvalidKeys' => 'PhpArrayAdapter does not throw exceptions on invalid key.', - 'testPrune' => 'PhpArrayAdapter just proxies', - ]; - - protected static $file; - - public static function setUpBeforeClass() - { - self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php'; - } - - protected function tearDown() - { - if (file_exists(sys_get_temp_dir().'/symfony-cache')) { - FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); - } - } - - public function createCachePool($defaultLifetime = 0) - { - return new PhpArrayAdapter(self::$file, new FilesystemAdapter('php-array-fallback', $defaultLifetime)); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/PhpFilesAdapterTest.php b/lib/symfony/cache/Tests/Adapter/PhpFilesAdapterTest.php deleted file mode 100644 index 247160d53..000000000 --- a/lib/symfony/cache/Tests/Adapter/PhpFilesAdapterTest.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\Adapter\PhpFilesAdapter; - -/** - * @group time-sensitive - */ -class PhpFilesAdapterTest extends AdapterTestCase -{ - protected $skippedTests = [ - 'testDefaultLifeTime' => 'PhpFilesAdapter does not allow configuring a default lifetime.', - ]; - - public function createCachePool() - { - if (!PhpFilesAdapter::isSupported()) { - $this->markTestSkipped('OPcache extension is not enabled.'); - } - - return new PhpFilesAdapter('sf-cache'); - } - - public static function tearDownAfterClass() - { - FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); - } - - protected function isPruned(CacheItemPoolInterface $cache, $name) - { - $getFileMethod = (new \ReflectionObject($cache))->getMethod('getFile'); - $getFileMethod->setAccessible(true); - - return !file_exists($getFileMethod->invoke($cache, $name)); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/PredisAdapterTest.php b/lib/symfony/cache/Tests/Adapter/PredisAdapterTest.php deleted file mode 100644 index 6aadbf266..000000000 --- a/lib/symfony/cache/Tests/Adapter/PredisAdapterTest.php +++ /dev/null @@ -1,53 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Predis\Connection\StreamConnection; -use Symfony\Component\Cache\Adapter\RedisAdapter; - -class PredisAdapterTest extends AbstractRedisAdapterTest -{ - public static function setUpBeforeClass() - { - parent::setUpBeforeClass(); - self::$redis = new \Predis\Client(['host' => getenv('REDIS_HOST')]); - } - - public function testCreateConnection() - { - $redisHost = getenv('REDIS_HOST'); - - $redis = RedisAdapter::createConnection('redis://'.$redisHost.'/1', ['class' => \Predis\Client::class, 'timeout' => 3]); - $this->assertInstanceOf(\Predis\Client::class, $redis); - - $connection = $redis->getConnection(); - $this->assertInstanceOf(StreamConnection::class, $connection); - - $params = [ - 'scheme' => 'tcp', - 'host' => $redisHost, - 'path' => '', - 'dbindex' => '1', - 'port' => 6379, - 'class' => 'Predis\Client', - 'timeout' => 3, - 'persistent' => 0, - 'persistent_id' => null, - 'read_timeout' => 0, - 'retry_interval' => 0, - 'lazy' => false, - 'database' => '1', - 'password' => null, - ]; - $this->assertSame($params, $connection->getParameters()->toArray()); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/PredisClusterAdapterTest.php b/lib/symfony/cache/Tests/Adapter/PredisClusterAdapterTest.php deleted file mode 100644 index 1afabaf1d..000000000 --- a/lib/symfony/cache/Tests/Adapter/PredisClusterAdapterTest.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -class PredisClusterAdapterTest extends AbstractRedisAdapterTest -{ - public static function setUpBeforeClass() - { - parent::setUpBeforeClass(); - self::$redis = new \Predis\Client([['host' => getenv('REDIS_HOST')]]); - } - - public static function tearDownAfterClass() - { - self::$redis = null; - } -} diff --git a/lib/symfony/cache/Tests/Adapter/PredisRedisClusterAdapterTest.php b/lib/symfony/cache/Tests/Adapter/PredisRedisClusterAdapterTest.php deleted file mode 100644 index 5b09919e2..000000000 --- a/lib/symfony/cache/Tests/Adapter/PredisRedisClusterAdapterTest.php +++ /dev/null @@ -1,28 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -class PredisRedisClusterAdapterTest extends AbstractRedisAdapterTest -{ - public static function setUpBeforeClass() - { - if (!$hosts = getenv('REDIS_CLUSTER_HOSTS')) { - self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.'); - } - self::$redis = new \Predis\Client(explode(' ', $hosts), ['cluster' => 'redis']); - } - - public static function tearDownAfterClass() - { - self::$redis = null; - } -} diff --git a/lib/symfony/cache/Tests/Adapter/ProxyAdapterTest.php b/lib/symfony/cache/Tests/Adapter/ProxyAdapterTest.php deleted file mode 100644 index 810cb31a2..000000000 --- a/lib/symfony/cache/Tests/Adapter/ProxyAdapterTest.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Psr\Cache\CacheItemInterface; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\Adapter\ProxyAdapter; -use Symfony\Component\Cache\CacheItem; - -/** - * @group time-sensitive - */ -class ProxyAdapterTest extends AdapterTestCase -{ - protected $skippedTests = [ - 'testDeferredSaveWithoutCommit' => 'Assumes a shared cache which ArrayAdapter is not.', - 'testSaveWithoutExpire' => 'Assumes a shared cache which ArrayAdapter is not.', - 'testPrune' => 'ProxyAdapter just proxies', - ]; - - public function createCachePool($defaultLifetime = 0) - { - return new ProxyAdapter(new ArrayAdapter(), '', $defaultLifetime); - } - - public function testProxyfiedItem() - { - $this->expectException('Exception'); - $this->expectExceptionMessage('OK bar'); - $item = new CacheItem(); - $pool = new ProxyAdapter(new TestingArrayAdapter($item)); - - $proxyItem = $pool->getItem('foo'); - - $this->assertNotSame($item, $proxyItem); - $pool->save($proxyItem->set('bar')); - } -} - -class TestingArrayAdapter extends ArrayAdapter -{ - private $item; - - public function __construct(CacheItemInterface $item) - { - $this->item = $item; - } - - public function getItem($key) - { - return $this->item; - } - - public function save(CacheItemInterface $item) - { - if ($item === $this->item) { - throw new \Exception('OK '.$item->get()); - } - } -} diff --git a/lib/symfony/cache/Tests/Adapter/RedisAdapterTest.php b/lib/symfony/cache/Tests/Adapter/RedisAdapterTest.php deleted file mode 100644 index edc6a9934..000000000 --- a/lib/symfony/cache/Tests/Adapter/RedisAdapterTest.php +++ /dev/null @@ -1,92 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Adapter\RedisAdapter; -use Symfony\Component\Cache\Traits\RedisProxy; - -class RedisAdapterTest extends AbstractRedisAdapterTest -{ - public static function setUpBeforeClass() - { - parent::setUpBeforeClass(); - self::$redis = AbstractAdapter::createConnection('redis://'.getenv('REDIS_HOST'), ['lazy' => true]); - } - - public function createCachePool($defaultLifetime = 0) - { - $adapter = parent::createCachePool($defaultLifetime); - $this->assertInstanceOf(RedisProxy::class, self::$redis); - - return $adapter; - } - - public function testCreateConnection() - { - $redisHost = getenv('REDIS_HOST'); - - $redis = RedisAdapter::createConnection('redis://'.$redisHost); - $this->assertInstanceOf(\Redis::class, $redis); - $this->assertTrue($redis->isConnected()); - $this->assertSame(0, $redis->getDbNum()); - - $redis = RedisAdapter::createConnection('redis://'.$redisHost.'/2'); - $this->assertSame(2, $redis->getDbNum()); - - $redis = RedisAdapter::createConnection('redis://'.$redisHost, ['timeout' => 3]); - $this->assertEquals(3, $redis->getTimeout()); - - $redis = RedisAdapter::createConnection('redis://'.$redisHost.'?timeout=4'); - $this->assertEquals(4, $redis->getTimeout()); - - $redis = RedisAdapter::createConnection('redis://'.$redisHost, ['read_timeout' => 5]); - $this->assertEquals(5, $redis->getReadTimeout()); - } - - /** - * @dataProvider provideFailedCreateConnection - */ - public function testFailedCreateConnection($dsn) - { - $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('Redis connection failed'); - RedisAdapter::createConnection($dsn); - } - - public function provideFailedCreateConnection() - { - return [ - ['redis://localhost:1234'], - ['redis://foo@localhost'], - ['redis://localhost/123'], - ]; - } - - /** - * @dataProvider provideInvalidCreateConnection - */ - public function testInvalidCreateConnection($dsn) - { - $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('Invalid Redis DSN'); - RedisAdapter::createConnection($dsn); - } - - public function provideInvalidCreateConnection() - { - return [ - ['foo://localhost'], - ['redis://'], - ]; - } -} diff --git a/lib/symfony/cache/Tests/Adapter/RedisArrayAdapterTest.php b/lib/symfony/cache/Tests/Adapter/RedisArrayAdapterTest.php deleted file mode 100644 index bd9def326..000000000 --- a/lib/symfony/cache/Tests/Adapter/RedisArrayAdapterTest.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -class RedisArrayAdapterTest extends AbstractRedisAdapterTest -{ - public static function setUpBeforeClass() - { - parent::setupBeforeClass(); - if (!class_exists('RedisArray')) { - self::markTestSkipped('The RedisArray class is required.'); - } - self::$redis = new \RedisArray([getenv('REDIS_HOST')], ['lazy_connect' => true]); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/RedisClusterAdapterTest.php b/lib/symfony/cache/Tests/Adapter/RedisClusterAdapterTest.php deleted file mode 100644 index 9c339d2dd..000000000 --- a/lib/symfony/cache/Tests/Adapter/RedisClusterAdapterTest.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -class RedisClusterAdapterTest extends AbstractRedisAdapterTest -{ - public static function setUpBeforeClass() - { - if (!class_exists('RedisCluster')) { - self::markTestSkipped('The RedisCluster class is required.'); - } - if (!$hosts = getenv('REDIS_CLUSTER_HOSTS')) { - self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.'); - } - - self::$redis = new \RedisCluster(null, explode(' ', $hosts)); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/SimpleCacheAdapterTest.php b/lib/symfony/cache/Tests/Adapter/SimpleCacheAdapterTest.php deleted file mode 100644 index d8470a2e7..000000000 --- a/lib/symfony/cache/Tests/Adapter/SimpleCacheAdapterTest.php +++ /dev/null @@ -1,41 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Symfony\Component\Cache\Adapter\SimpleCacheAdapter; -use Symfony\Component\Cache\Simple\ArrayCache; -use Symfony\Component\Cache\Simple\FilesystemCache; - -/** - * @group time-sensitive - */ -class SimpleCacheAdapterTest extends AdapterTestCase -{ - protected $skippedTests = [ - 'testPrune' => 'SimpleCache just proxies', - ]; - - public function createCachePool($defaultLifetime = 0) - { - return new SimpleCacheAdapter(new FilesystemCache(), '', $defaultLifetime); - } - - public function testValidCacheKeyWithNamespace() - { - $cache = new SimpleCacheAdapter(new ArrayCache(), 'some_namespace', 0); - $item = $cache->getItem('my_key'); - $item->set('someValue'); - $cache->save($item); - - $this->assertTrue($cache->getItem('my_key')->isHit(), 'Stored item is successfully retrieved.'); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/TagAwareAdapterTest.php b/lib/symfony/cache/Tests/Adapter/TagAwareAdapterTest.php deleted file mode 100644 index 0108b9250..000000000 --- a/lib/symfony/cache/Tests/Adapter/TagAwareAdapterTest.php +++ /dev/null @@ -1,318 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use PHPUnit\Framework\MockObject\MockObject; -use Psr\Cache\CacheItemInterface; -use Symfony\Component\Cache\Adapter\AdapterInterface; -use Symfony\Component\Cache\Adapter\FilesystemAdapter; -use Symfony\Component\Cache\Adapter\TagAwareAdapter; - -/** - * @group time-sensitive - */ -class TagAwareAdapterTest extends AdapterTestCase -{ - public function createCachePool($defaultLifetime = 0) - { - return new TagAwareAdapter(new FilesystemAdapter('', $defaultLifetime)); - } - - public static function tearDownAfterClass() - { - FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); - } - - public function testInvalidTag() - { - $this->expectException('Psr\Cache\InvalidArgumentException'); - $pool = $this->createCachePool(); - $item = $pool->getItem('foo'); - $item->tag(':'); - } - - public function testInvalidateTags() - { - $pool = $this->createCachePool(); - - $i0 = $pool->getItem('i0'); - $i1 = $pool->getItem('i1'); - $i2 = $pool->getItem('i2'); - $i3 = $pool->getItem('i3'); - $foo = $pool->getItem('foo'); - - $pool->save($i0->tag('bar')); - $pool->save($i1->tag('foo')); - $pool->save($i2->tag('foo')->tag('bar')); - $pool->save($i3->tag('foo')->tag('baz')); - $pool->save($foo); - - $pool->invalidateTags(['bar']); - - $this->assertFalse($pool->getItem('i0')->isHit()); - $this->assertTrue($pool->getItem('i1')->isHit()); - $this->assertFalse($pool->getItem('i2')->isHit()); - $this->assertTrue($pool->getItem('i3')->isHit()); - $this->assertTrue($pool->getItem('foo')->isHit()); - - $pool->invalidateTags(['foo']); - - $this->assertFalse($pool->getItem('i1')->isHit()); - $this->assertFalse($pool->getItem('i3')->isHit()); - $this->assertTrue($pool->getItem('foo')->isHit()); - - $anotherPoolInstance = $this->createCachePool(); - - $this->assertFalse($anotherPoolInstance->getItem('i1')->isHit()); - $this->assertFalse($anotherPoolInstance->getItem('i3')->isHit()); - $this->assertTrue($anotherPoolInstance->getItem('foo')->isHit()); - } - - public function testInvalidateCommits() - { - $pool1 = $this->createCachePool(); - - $foo = $pool1->getItem('foo'); - $foo->tag('tag'); - - $pool1->saveDeferred($foo->set('foo')); - $pool1->invalidateTags(['tag']); - - $pool2 = $this->createCachePool(); - $foo = $pool2->getItem('foo'); - - $this->assertTrue($foo->isHit()); - } - - public function testTagsAreCleanedOnSave() - { - $pool = $this->createCachePool(); - - $i = $pool->getItem('k'); - $pool->save($i->tag('foo')); - - $i = $pool->getItem('k'); - $pool->save($i->tag('bar')); - - $pool->invalidateTags(['foo']); - $this->assertTrue($pool->getItem('k')->isHit()); - } - - public function testTagsAreCleanedOnDelete() - { - $pool = $this->createCachePool(); - - $i = $pool->getItem('k'); - $pool->save($i->tag('foo')); - $pool->deleteItem('k'); - - $pool->save($pool->getItem('k')); - $pool->invalidateTags(['foo']); - - $this->assertTrue($pool->getItem('k')->isHit()); - } - - public function testTagItemExpiry() - { - $pool = $this->createCachePool(10); - - $item = $pool->getItem('foo'); - $item->tag(['baz']); - $item->expiresAfter(100); - - $pool->save($item); - $pool->invalidateTags(['baz']); - $this->assertFalse($pool->getItem('foo')->isHit()); - - sleep(20); - - $this->assertFalse($pool->getItem('foo')->isHit()); - } - - public function testGetPreviousTags() - { - $pool = $this->createCachePool(); - - $i = $pool->getItem('k'); - $pool->save($i->tag('foo')); - - $i = $pool->getItem('k'); - $this->assertSame(['foo' => 'foo'], $i->getPreviousTags()); - } - - public function testPrune() - { - $cache = new TagAwareAdapter($this->getPruneableMock()); - $this->assertTrue($cache->prune()); - - $cache = new TagAwareAdapter($this->getNonPruneableMock()); - $this->assertFalse($cache->prune()); - - $cache = new TagAwareAdapter($this->getFailingPruneableMock()); - $this->assertFalse($cache->prune()); - } - - public function testKnownTagVersionsTtl() - { - $itemsPool = new FilesystemAdapter('', 10); - $tagsPool = $this - ->getMockBuilder(AdapterInterface::class) - ->getMock(); - - $pool = new TagAwareAdapter($itemsPool, $tagsPool, 10); - - $item = $pool->getItem('foo'); - $item->tag(['baz']); - $item->expiresAfter(100); - - $tag = $this->getMockBuilder(CacheItemInterface::class)->getMock(); - $tag->expects(self::exactly(2))->method('get')->willReturn(10); - - $tagsPool->expects(self::exactly(2))->method('getItems')->willReturn([ - 'baz'.TagAwareAdapter::TAGS_PREFIX => $tag, - ]); - - $pool->save($item); - $this->assertTrue($pool->getItem('foo')->isHit()); - $this->assertTrue($pool->getItem('foo')->isHit()); - - sleep(20); - - $this->assertTrue($pool->getItem('foo')->isHit()); - - sleep(5); - - $this->assertTrue($pool->getItem('foo')->isHit()); - } - - public function testTagEntryIsCreatedForItemWithoutTags() - { - $pool = $this->createCachePool(); - - $itemKey = 'foo'; - $item = $pool->getItem($itemKey); - $pool->save($item); - - $adapter = new FilesystemAdapter(); - $this->assertTrue($adapter->hasItem(TagAwareAdapter::TAGS_PREFIX.$itemKey)); - } - - public function testHasItemReturnsFalseWhenPoolDoesNotHaveItemTags() - { - $pool = $this->createCachePool(); - - $itemKey = 'foo'; - $item = $pool->getItem($itemKey); - $pool->save($item); - - $anotherPool = $this->createCachePool(); - - $adapter = new FilesystemAdapter(); - $adapter->deleteItem(TagAwareAdapter::TAGS_PREFIX.$itemKey); //simulate item losing tags pair - - $this->assertFalse($anotherPool->hasItem($itemKey)); - } - - public function testGetItemReturnsCacheMissWhenPoolDoesNotHaveItemTags() - { - $pool = $this->createCachePool(); - - $itemKey = 'foo'; - $item = $pool->getItem($itemKey); - $pool->save($item); - - $anotherPool = $this->createCachePool(); - - $adapter = new FilesystemAdapter(); - $adapter->deleteItem(TagAwareAdapter::TAGS_PREFIX.$itemKey); //simulate item losing tags pair - - $item = $anotherPool->getItem($itemKey); - $this->assertFalse($item->isHit()); - } - - public function testHasItemReturnsFalseWhenPoolDoesNotHaveItemAndOnlyHasTags() - { - $pool = $this->createCachePool(); - - $itemKey = 'foo'; - $item = $pool->getItem($itemKey); - $pool->save($item); - - $anotherPool = $this->createCachePool(); - - $adapter = new FilesystemAdapter(); - $adapter->deleteItem($itemKey); //simulate losing item but keeping tags - - $this->assertFalse($anotherPool->hasItem($itemKey)); - } - - public function testGetItemReturnsCacheMissWhenPoolDoesNotHaveItemAndOnlyHasTags() - { - $pool = $this->createCachePool(); - - $itemKey = 'foo'; - $item = $pool->getItem($itemKey); - $pool->save($item); - - $anotherPool = $this->createCachePool(); - - $adapter = new FilesystemAdapter(); - $adapter->deleteItem($itemKey); //simulate losing item but keeping tags - - $item = $anotherPool->getItem($itemKey); - $this->assertFalse($item->isHit()); - } - - /** - * @return MockObject|PruneableCacheInterface - */ - private function getPruneableMock() - { - $pruneable = $this - ->getMockBuilder(PruneableCacheInterface::class) - ->getMock(); - - $pruneable - ->expects($this->atLeastOnce()) - ->method('prune') - ->willReturn(true); - - return $pruneable; - } - - /** - * @return MockObject|PruneableCacheInterface - */ - private function getFailingPruneableMock() - { - $pruneable = $this - ->getMockBuilder(PruneableCacheInterface::class) - ->getMock(); - - $pruneable - ->expects($this->atLeastOnce()) - ->method('prune') - ->willReturn(false); - - return $pruneable; - } - - /** - * @return MockObject|AdapterInterface - */ - private function getNonPruneableMock() - { - return $this - ->getMockBuilder(AdapterInterface::class) - ->getMock(); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php b/lib/symfony/cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php deleted file mode 100644 index b11c1f287..000000000 --- a/lib/symfony/cache/Tests/Adapter/TagAwareAndProxyAdapterIntegrationTest.php +++ /dev/null @@ -1,38 +0,0 @@ -getItem('foo'); - $item->tag(['tag1', 'tag2']); - $item->set('bar'); - $cache->save($item); - - $this->assertSame('bar', $cache->getItem('foo')->get()); - } - - public function dataProvider() - { - return [ - [new ArrayAdapter()], - // also testing with a non-AdapterInterface implementation - // because the ProxyAdapter behaves slightly different for those - [new ExternalAdapter()], - ]; - } -} diff --git a/lib/symfony/cache/Tests/Adapter/TraceableAdapterTest.php b/lib/symfony/cache/Tests/Adapter/TraceableAdapterTest.php deleted file mode 100644 index 35eba7d77..000000000 --- a/lib/symfony/cache/Tests/Adapter/TraceableAdapterTest.php +++ /dev/null @@ -1,191 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Symfony\Component\Cache\Adapter\FilesystemAdapter; -use Symfony\Component\Cache\Adapter\TraceableAdapter; - -/** - * @group time-sensitive - */ -class TraceableAdapterTest extends AdapterTestCase -{ - protected $skippedTests = [ - 'testPrune' => 'TraceableAdapter just proxies', - ]; - - public function createCachePool($defaultLifetime = 0) - { - return new TraceableAdapter(new FilesystemAdapter('', $defaultLifetime)); - } - - public function testGetItemMissTrace() - { - $pool = $this->createCachePool(); - $pool->getItem('k'); - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('getItem', $call->name); - $this->assertSame(['k' => false], $call->result); - $this->assertSame(0, $call->hits); - $this->assertSame(1, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testGetItemHitTrace() - { - $pool = $this->createCachePool(); - $item = $pool->getItem('k')->set('foo'); - $pool->save($item); - $pool->getItem('k'); - $calls = $pool->getCalls(); - $this->assertCount(3, $calls); - - $call = $calls[2]; - $this->assertSame(1, $call->hits); - $this->assertSame(0, $call->misses); - } - - public function testGetItemsMissTrace() - { - $pool = $this->createCachePool(); - $arg = ['k0', 'k1']; - $items = $pool->getItems($arg); - foreach ($items as $item) { - } - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('getItems', $call->name); - $this->assertSame(['k0' => false, 'k1' => false], $call->result); - $this->assertSame(2, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testHasItemMissTrace() - { - $pool = $this->createCachePool(); - $pool->hasItem('k'); - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('hasItem', $call->name); - $this->assertSame(['k' => false], $call->result); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testHasItemHitTrace() - { - $pool = $this->createCachePool(); - $item = $pool->getItem('k')->set('foo'); - $pool->save($item); - $pool->hasItem('k'); - $calls = $pool->getCalls(); - $this->assertCount(3, $calls); - - $call = $calls[2]; - $this->assertSame('hasItem', $call->name); - $this->assertSame(['k' => true], $call->result); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testDeleteItemTrace() - { - $pool = $this->createCachePool(); - $pool->deleteItem('k'); - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('deleteItem', $call->name); - $this->assertSame(['k' => true], $call->result); - $this->assertSame(0, $call->hits); - $this->assertSame(0, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testDeleteItemsTrace() - { - $pool = $this->createCachePool(); - $arg = ['k0', 'k1']; - $pool->deleteItems($arg); - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('deleteItems', $call->name); - $this->assertSame(['keys' => $arg, 'result' => true], $call->result); - $this->assertSame(0, $call->hits); - $this->assertSame(0, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testSaveTrace() - { - $pool = $this->createCachePool(); - $item = $pool->getItem('k')->set('foo'); - $pool->save($item); - $calls = $pool->getCalls(); - $this->assertCount(2, $calls); - - $call = $calls[1]; - $this->assertSame('save', $call->name); - $this->assertSame(['k' => true], $call->result); - $this->assertSame(0, $call->hits); - $this->assertSame(0, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testSaveDeferredTrace() - { - $pool = $this->createCachePool(); - $item = $pool->getItem('k')->set('foo'); - $pool->saveDeferred($item); - $calls = $pool->getCalls(); - $this->assertCount(2, $calls); - - $call = $calls[1]; - $this->assertSame('saveDeferred', $call->name); - $this->assertSame(['k' => true], $call->result); - $this->assertSame(0, $call->hits); - $this->assertSame(0, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testCommitTrace() - { - $pool = $this->createCachePool(); - $pool->commit(); - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('commit', $call->name); - $this->assertTrue($call->result); - $this->assertSame(0, $call->hits); - $this->assertSame(0, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } -} diff --git a/lib/symfony/cache/Tests/Adapter/TraceableTagAwareAdapterTest.php b/lib/symfony/cache/Tests/Adapter/TraceableTagAwareAdapterTest.php deleted file mode 100644 index 5cd4185cb..000000000 --- a/lib/symfony/cache/Tests/Adapter/TraceableTagAwareAdapterTest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Adapter; - -use Symfony\Component\Cache\Adapter\FilesystemAdapter; -use Symfony\Component\Cache\Adapter\TagAwareAdapter; -use Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter; - -/** - * @group time-sensitive - */ -class TraceableTagAwareAdapterTest extends TraceableAdapterTest -{ - public function testInvalidateTags() - { - $pool = new TraceableTagAwareAdapter(new TagAwareAdapter(new FilesystemAdapter())); - $pool->invalidateTags(['foo']); - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('invalidateTags', $call->name); - $this->assertSame(0, $call->hits); - $this->assertSame(0, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } -} diff --git a/lib/symfony/cache/Tests/CacheItemTest.php b/lib/symfony/cache/Tests/CacheItemTest.php deleted file mode 100644 index 28c681d15..000000000 --- a/lib/symfony/cache/Tests/CacheItemTest.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Cache\CacheItem; - -class CacheItemTest extends TestCase -{ - public function testValidKey() - { - $this->assertSame('foo', CacheItem::validateKey('foo')); - } - - /** - * @dataProvider provideInvalidKey - */ - public function testInvalidKey($key) - { - $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('Cache key'); - CacheItem::validateKey($key); - } - - public function provideInvalidKey() - { - return [ - [''], - ['{'], - ['}'], - ['('], - [')'], - ['/'], - ['\\'], - ['@'], - [':'], - [true], - [null], - [1], - [1.1], - [[[]]], - [new \Exception('foo')], - ]; - } - - public function testTag() - { - $item = new CacheItem(); - - $this->assertSame($item, $item->tag('foo')); - $this->assertSame($item, $item->tag(['bar', 'baz'])); - - \call_user_func(\Closure::bind(function () use ($item) { - $this->assertSame(['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'], $item->tags); - }, $this, CacheItem::class)); - } - - /** - * @dataProvider provideInvalidKey - */ - public function testInvalidTag($tag) - { - $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('Cache tag'); - $item = new CacheItem(); - $item->tag($tag); - } -} diff --git a/lib/symfony/cache/Tests/DoctrineProviderTest.php b/lib/symfony/cache/Tests/DoctrineProviderTest.php deleted file mode 100644 index 91a5516ab..000000000 --- a/lib/symfony/cache/Tests/DoctrineProviderTest.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests; - -use Doctrine\Common\Cache\CacheProvider; -use PHPUnit\Framework\TestCase; -use Symfony\Component\Cache\Adapter\ArrayAdapter; -use Symfony\Component\Cache\DoctrineProvider; - -class DoctrineProviderTest extends TestCase -{ - public function testProvider() - { - $pool = new ArrayAdapter(); - $cache = new DoctrineProvider($pool); - - $this->assertInstanceOf(CacheProvider::class, $cache); - - $key = '{}()/\@:'; - - $this->assertTrue($cache->delete($key)); - $this->assertFalse($cache->contains($key)); - - $this->assertTrue($cache->save($key, 'bar')); - $this->assertTrue($cache->contains($key)); - $this->assertSame('bar', $cache->fetch($key)); - - $this->assertTrue($cache->delete($key)); - $this->assertFalse($cache->fetch($key)); - $this->assertTrue($cache->save($key, 'bar')); - - $cache->flushAll(); - $this->assertFalse($cache->fetch($key)); - $this->assertFalse($cache->contains($key)); - } -} diff --git a/lib/symfony/cache/Tests/Fixtures/ArrayCache.php b/lib/symfony/cache/Tests/Fixtures/ArrayCache.php deleted file mode 100644 index 13b4f3306..000000000 --- a/lib/symfony/cache/Tests/Fixtures/ArrayCache.php +++ /dev/null @@ -1,52 +0,0 @@ -doContains($id) ? $this->data[$id][0] : false; - } - - protected function doContains($id) - { - if (!isset($this->data[$id])) { - return false; - } - - $expiry = $this->data[$id][1]; - - return !$expiry || time() < $expiry || !$this->doDelete($id); - } - - protected function doSave($id, $data, $lifeTime = 0) - { - $this->data[$id] = [$data, $lifeTime ? time() + $lifeTime : false]; - - return true; - } - - protected function doDelete($id) - { - unset($this->data[$id]); - - return true; - } - - protected function doFlush() - { - $this->data = []; - - return true; - } - - protected function doGetStats() - { - return null; - } -} diff --git a/lib/symfony/cache/Tests/Fixtures/ExternalAdapter.php b/lib/symfony/cache/Tests/Fixtures/ExternalAdapter.php deleted file mode 100644 index 779a374ec..000000000 --- a/lib/symfony/cache/Tests/Fixtures/ExternalAdapter.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Fixtures; - -use Psr\Cache\CacheItemInterface; -use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\Adapter\ArrayAdapter; - -/** - * Adapter not implementing the {@see \Symfony\Component\Cache\Adapter\AdapterInterface}. - * - * @author Kévin Dunglas - */ -class ExternalAdapter implements CacheItemPoolInterface -{ - private $cache; - - public function __construct() - { - $this->cache = new ArrayAdapter(); - } - - public function getItem($key) - { - return $this->cache->getItem($key); - } - - public function getItems(array $keys = []) - { - return $this->cache->getItems($keys); - } - - public function hasItem($key) - { - return $this->cache->hasItem($key); - } - - public function clear() - { - return $this->cache->clear(); - } - - public function deleteItem($key) - { - return $this->cache->deleteItem($key); - } - - public function deleteItems(array $keys) - { - return $this->cache->deleteItems($keys); - } - - public function save(CacheItemInterface $item) - { - return $this->cache->save($item); - } - - public function saveDeferred(CacheItemInterface $item) - { - return $this->cache->saveDeferred($item); - } - - public function commit() - { - return $this->cache->commit(); - } -} diff --git a/lib/symfony/cache/Tests/Simple/AbstractRedisCacheTest.php b/lib/symfony/cache/Tests/Simple/AbstractRedisCacheTest.php deleted file mode 100644 index e6d10284e..000000000 --- a/lib/symfony/cache/Tests/Simple/AbstractRedisCacheTest.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Symfony\Component\Cache\Simple\RedisCache; - -abstract class AbstractRedisCacheTest extends CacheTestCase -{ - protected $skippedTests = [ - 'testSetTtl' => 'Testing expiration slows down the test suite', - 'testSetMultipleTtl' => 'Testing expiration slows down the test suite', - 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', - ]; - - protected static $redis; - - public function createSimpleCache($defaultLifetime = 0) - { - return new RedisCache(self::$redis, str_replace('\\', '.', __CLASS__), $defaultLifetime); - } - - public static function setUpBeforeClass() - { - if (!\extension_loaded('redis')) { - self::markTestSkipped('Extension redis required.'); - } - if (!@((new \Redis())->connect(getenv('REDIS_HOST')))) { - $e = error_get_last(); - self::markTestSkipped($e['message']); - } - } - - public static function tearDownAfterClass() - { - self::$redis = null; - } -} diff --git a/lib/symfony/cache/Tests/Simple/ApcuCacheTest.php b/lib/symfony/cache/Tests/Simple/ApcuCacheTest.php deleted file mode 100644 index f37b95a09..000000000 --- a/lib/symfony/cache/Tests/Simple/ApcuCacheTest.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Symfony\Component\Cache\Simple\ApcuCache; - -class ApcuCacheTest extends CacheTestCase -{ - protected $skippedTests = [ - 'testSetTtl' => 'Testing expiration slows down the test suite', - 'testSetMultipleTtl' => 'Testing expiration slows down the test suite', - 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', - ]; - - public function createSimpleCache($defaultLifetime = 0) - { - if (!\function_exists('apcu_fetch') || !filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) || ('cli' === \PHP_SAPI && !filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN))) { - $this->markTestSkipped('APCu extension is required.'); - } - if ('\\' === \DIRECTORY_SEPARATOR) { - $this->markTestSkipped('Fails transiently on Windows.'); - } - - return new ApcuCache(str_replace('\\', '.', __CLASS__), $defaultLifetime); - } -} diff --git a/lib/symfony/cache/Tests/Simple/ArrayCacheTest.php b/lib/symfony/cache/Tests/Simple/ArrayCacheTest.php deleted file mode 100644 index 26c3e14d0..000000000 --- a/lib/symfony/cache/Tests/Simple/ArrayCacheTest.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Symfony\Component\Cache\Simple\ArrayCache; - -/** - * @group time-sensitive - */ -class ArrayCacheTest extends CacheTestCase -{ - public function createSimpleCache($defaultLifetime = 0) - { - return new ArrayCache($defaultLifetime); - } -} diff --git a/lib/symfony/cache/Tests/Simple/CacheTestCase.php b/lib/symfony/cache/Tests/Simple/CacheTestCase.php deleted file mode 100644 index ff9944a34..000000000 --- a/lib/symfony/cache/Tests/Simple/CacheTestCase.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Cache\IntegrationTests\SimpleCacheTest; -use Psr\SimpleCache\CacheInterface; -use Symfony\Component\Cache\PruneableInterface; - -abstract class CacheTestCase extends SimpleCacheTest -{ - protected function setUp() - { - parent::setUp(); - - if (!\array_key_exists('testPrune', $this->skippedTests) && !$this->createSimpleCache() instanceof PruneableInterface) { - $this->skippedTests['testPrune'] = 'Not a pruneable cache pool.'; - } - } - - public static function validKeys() - { - if (\defined('HHVM_VERSION')) { - return parent::validKeys(); - } - - return array_merge(parent::validKeys(), [["a\0b"]]); - } - - public function testDefaultLifeTime() - { - if (isset($this->skippedTests[__FUNCTION__])) { - $this->markTestSkipped($this->skippedTests[__FUNCTION__]); - } - - $cache = $this->createSimpleCache(2); - $cache->clear(); - - $cache->set('key.dlt', 'value'); - sleep(1); - - $this->assertSame('value', $cache->get('key.dlt')); - - sleep(2); - $this->assertNull($cache->get('key.dlt')); - - $cache->clear(); - } - - public function testNotUnserializable() - { - if (isset($this->skippedTests[__FUNCTION__])) { - $this->markTestSkipped($this->skippedTests[__FUNCTION__]); - } - - $cache = $this->createSimpleCache(); - $cache->clear(); - - $cache->set('foo', new NotUnserializable()); - - $this->assertNull($cache->get('foo')); - - $cache->setMultiple(['foo' => new NotUnserializable()]); - - foreach ($cache->getMultiple(['foo']) as $value) { - } - $this->assertNull($value); - - $cache->clear(); - } - - public function testPrune() - { - if (isset($this->skippedTests[__FUNCTION__])) { - $this->markTestSkipped($this->skippedTests[__FUNCTION__]); - } - - if (!method_exists($this, 'isPruned')) { - $this->fail('Test classes for pruneable caches must implement `isPruned($cache, $name)` method.'); - } - - /** @var PruneableInterface|CacheInterface $cache */ - $cache = $this->createSimpleCache(); - $cache->clear(); - - $cache->set('foo', 'foo-val', new \DateInterval('PT05S')); - $cache->set('bar', 'bar-val', new \DateInterval('PT10S')); - $cache->set('baz', 'baz-val', new \DateInterval('PT15S')); - $cache->set('qux', 'qux-val', new \DateInterval('PT20S')); - - sleep(30); - $cache->prune(); - $this->assertTrue($this->isPruned($cache, 'foo')); - $this->assertTrue($this->isPruned($cache, 'bar')); - $this->assertTrue($this->isPruned($cache, 'baz')); - $this->assertTrue($this->isPruned($cache, 'qux')); - - $cache->set('foo', 'foo-val'); - $cache->set('bar', 'bar-val', new \DateInterval('PT20S')); - $cache->set('baz', 'baz-val', new \DateInterval('PT40S')); - $cache->set('qux', 'qux-val', new \DateInterval('PT80S')); - - $cache->prune(); - $this->assertFalse($this->isPruned($cache, 'foo')); - $this->assertFalse($this->isPruned($cache, 'bar')); - $this->assertFalse($this->isPruned($cache, 'baz')); - $this->assertFalse($this->isPruned($cache, 'qux')); - - sleep(30); - $cache->prune(); - $this->assertFalse($this->isPruned($cache, 'foo')); - $this->assertTrue($this->isPruned($cache, 'bar')); - $this->assertFalse($this->isPruned($cache, 'baz')); - $this->assertFalse($this->isPruned($cache, 'qux')); - - sleep(30); - $cache->prune(); - $this->assertFalse($this->isPruned($cache, 'foo')); - $this->assertTrue($this->isPruned($cache, 'baz')); - $this->assertFalse($this->isPruned($cache, 'qux')); - - sleep(30); - $cache->prune(); - $this->assertFalse($this->isPruned($cache, 'foo')); - $this->assertTrue($this->isPruned($cache, 'qux')); - - $cache->clear(); - } -} - -class NotUnserializable implements \Serializable -{ - public function serialize() - { - return serialize(123); - } - - public function unserialize($ser) - { - throw new \Exception(__CLASS__); - } -} diff --git a/lib/symfony/cache/Tests/Simple/ChainCacheTest.php b/lib/symfony/cache/Tests/Simple/ChainCacheTest.php deleted file mode 100644 index f216bc1f3..000000000 --- a/lib/symfony/cache/Tests/Simple/ChainCacheTest.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use PHPUnit\Framework\MockObject\MockObject; -use Psr\SimpleCache\CacheInterface; -use Symfony\Component\Cache\PruneableInterface; -use Symfony\Component\Cache\Simple\ArrayCache; -use Symfony\Component\Cache\Simple\ChainCache; -use Symfony\Component\Cache\Simple\FilesystemCache; - -/** - * @group time-sensitive - */ -class ChainCacheTest extends CacheTestCase -{ - public function createSimpleCache($defaultLifetime = 0) - { - return new ChainCache([new ArrayCache($defaultLifetime), new FilesystemCache('', $defaultLifetime)], $defaultLifetime); - } - - public function testEmptyCachesException() - { - $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('At least one cache must be specified.'); - new ChainCache([]); - } - - public function testInvalidCacheException() - { - $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('The class "stdClass" does not implement'); - new ChainCache([new \stdClass()]); - } - - public function testPrune() - { - if (isset($this->skippedTests[__FUNCTION__])) { - $this->markTestSkipped($this->skippedTests[__FUNCTION__]); - } - - $cache = new ChainCache([ - $this->getPruneableMock(), - $this->getNonPruneableMock(), - $this->getPruneableMock(), - ]); - $this->assertTrue($cache->prune()); - - $cache = new ChainCache([ - $this->getPruneableMock(), - $this->getFailingPruneableMock(), - $this->getPruneableMock(), - ]); - $this->assertFalse($cache->prune()); - } - - /** - * @return MockObject|PruneableCacheInterface - */ - private function getPruneableMock() - { - $pruneable = $this - ->getMockBuilder(PruneableCacheInterface::class) - ->getMock(); - - $pruneable - ->expects($this->atLeastOnce()) - ->method('prune') - ->willReturn(true); - - return $pruneable; - } - - /** - * @return MockObject|PruneableCacheInterface - */ - private function getFailingPruneableMock() - { - $pruneable = $this - ->getMockBuilder(PruneableCacheInterface::class) - ->getMock(); - - $pruneable - ->expects($this->atLeastOnce()) - ->method('prune') - ->willReturn(false); - - return $pruneable; - } - - /** - * @return MockObject|CacheInterface - */ - private function getNonPruneableMock() - { - return $this - ->getMockBuilder(CacheInterface::class) - ->getMock(); - } -} - -interface PruneableCacheInterface extends PruneableInterface, CacheInterface -{ -} diff --git a/lib/symfony/cache/Tests/Simple/DoctrineCacheTest.php b/lib/symfony/cache/Tests/Simple/DoctrineCacheTest.php deleted file mode 100644 index af4331d69..000000000 --- a/lib/symfony/cache/Tests/Simple/DoctrineCacheTest.php +++ /dev/null @@ -1,31 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Symfony\Component\Cache\Simple\DoctrineCache; -use Symfony\Component\Cache\Tests\Fixtures\ArrayCache; - -/** - * @group time-sensitive - */ -class DoctrineCacheTest extends CacheTestCase -{ - protected $skippedTests = [ - 'testObjectDoesNotChangeInCache' => 'ArrayCache does not use serialize/unserialize', - 'testNotUnserializable' => 'ArrayCache does not use serialize/unserialize', - ]; - - public function createSimpleCache($defaultLifetime = 0) - { - return new DoctrineCache(new ArrayCache($defaultLifetime), '', $defaultLifetime); - } -} diff --git a/lib/symfony/cache/Tests/Simple/FilesystemCacheTest.php b/lib/symfony/cache/Tests/Simple/FilesystemCacheTest.php deleted file mode 100644 index 620305a58..000000000 --- a/lib/symfony/cache/Tests/Simple/FilesystemCacheTest.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Psr\SimpleCache\CacheInterface; -use Symfony\Component\Cache\Simple\FilesystemCache; - -/** - * @group time-sensitive - */ -class FilesystemCacheTest extends CacheTestCase -{ - public function createSimpleCache($defaultLifetime = 0) - { - return new FilesystemCache('', $defaultLifetime); - } - - protected function isPruned(CacheInterface $cache, $name) - { - $getFileMethod = (new \ReflectionObject($cache))->getMethod('getFile'); - $getFileMethod->setAccessible(true); - - return !file_exists($getFileMethod->invoke($cache, $name)); - } -} diff --git a/lib/symfony/cache/Tests/Simple/MemcachedCacheTest.php b/lib/symfony/cache/Tests/Simple/MemcachedCacheTest.php deleted file mode 100644 index 21332232b..000000000 --- a/lib/symfony/cache/Tests/Simple/MemcachedCacheTest.php +++ /dev/null @@ -1,172 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Simple\MemcachedCache; - -class MemcachedCacheTest extends CacheTestCase -{ - protected $skippedTests = [ - 'testSetTtl' => 'Testing expiration slows down the test suite', - 'testSetMultipleTtl' => 'Testing expiration slows down the test suite', - 'testDefaultLifeTime' => 'Testing expiration slows down the test suite', - ]; - - protected static $client; - - public static function setUpBeforeClass() - { - if (!MemcachedCache::isSupported()) { - self::markTestSkipped('Extension memcached >=2.2.0 required.'); - } - self::$client = AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST')); - self::$client->get('foo'); - $code = self::$client->getResultCode(); - - if (\Memcached::RES_SUCCESS !== $code && \Memcached::RES_NOTFOUND !== $code) { - self::markTestSkipped('Memcached error: '.strtolower(self::$client->getResultMessage())); - } - } - - public function createSimpleCache($defaultLifetime = 0) - { - $client = $defaultLifetime ? AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST'), ['binary_protocol' => false]) : self::$client; - - return new MemcachedCache($client, str_replace('\\', '.', __CLASS__), $defaultLifetime); - } - - public function testCreatePersistentConnectionShouldNotDupServerList() - { - $instance = MemcachedCache::createConnection('memcached://'.getenv('MEMCACHED_HOST'), ['persistent_id' => 'persistent']); - $this->assertCount(1, $instance->getServerList()); - - $instance = MemcachedCache::createConnection('memcached://'.getenv('MEMCACHED_HOST'), ['persistent_id' => 'persistent']); - $this->assertCount(1, $instance->getServerList()); - } - - public function testOptions() - { - $client = MemcachedCache::createConnection([], [ - 'libketama_compatible' => false, - 'distribution' => 'modula', - 'compression' => true, - 'serializer' => 'php', - 'hash' => 'md5', - ]); - - $this->assertSame(\Memcached::SERIALIZER_PHP, $client->getOption(\Memcached::OPT_SERIALIZER)); - $this->assertSame(\Memcached::HASH_MD5, $client->getOption(\Memcached::OPT_HASH)); - $this->assertTrue($client->getOption(\Memcached::OPT_COMPRESSION)); - $this->assertSame(0, $client->getOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE)); - $this->assertSame(\Memcached::DISTRIBUTION_MODULA, $client->getOption(\Memcached::OPT_DISTRIBUTION)); - } - - /** - * @dataProvider provideBadOptions - */ - public function testBadOptions($name, $value) - { - $this->expectException('ErrorException'); - $this->expectExceptionMessage('constant(): Couldn\'t find constant Memcached::'); - MemcachedCache::createConnection([], [$name => $value]); - } - - public function provideBadOptions() - { - return [ - ['foo', 'bar'], - ['hash', 'zyx'], - ['serializer', 'zyx'], - ['distribution', 'zyx'], - ]; - } - - public function testDefaultOptions() - { - $this->assertTrue(MemcachedCache::isSupported()); - - $client = MemcachedCache::createConnection([]); - - $this->assertTrue($client->getOption(\Memcached::OPT_COMPRESSION)); - $this->assertSame(1, $client->getOption(\Memcached::OPT_BINARY_PROTOCOL)); - $this->assertSame(1, $client->getOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE)); - } - - public function testOptionSerializer() - { - $this->expectException('Symfony\Component\Cache\Exception\CacheException'); - $this->expectExceptionMessage('MemcachedAdapter: "serializer" option must be "php" or "igbinary".'); - if (!\Memcached::HAVE_JSON) { - $this->markTestSkipped('Memcached::HAVE_JSON required'); - } - - new MemcachedCache(MemcachedCache::createConnection([], ['serializer' => 'json'])); - } - - /** - * @dataProvider provideServersSetting - */ - public function testServersSetting($dsn, $host, $port) - { - $client1 = MemcachedCache::createConnection($dsn); - $client2 = MemcachedCache::createConnection([$dsn]); - $client3 = MemcachedCache::createConnection([[$host, $port]]); - $expect = [ - 'host' => $host, - 'port' => $port, - ]; - - $f = function ($s) { return ['host' => $s['host'], 'port' => $s['port']]; }; - $this->assertSame([$expect], array_map($f, $client1->getServerList())); - $this->assertSame([$expect], array_map($f, $client2->getServerList())); - $this->assertSame([$expect], array_map($f, $client3->getServerList())); - } - - public function provideServersSetting() - { - yield [ - 'memcached://127.0.0.1/50', - '127.0.0.1', - 11211, - ]; - yield [ - 'memcached://localhost:11222?weight=25', - 'localhost', - 11222, - ]; - if (filter_var(ini_get('memcached.use_sasl'), FILTER_VALIDATE_BOOLEAN)) { - yield [ - 'memcached://user:password@127.0.0.1?weight=50', - '127.0.0.1', - 11211, - ]; - } - yield [ - 'memcached:///var/run/memcached.sock?weight=25', - '/var/run/memcached.sock', - 0, - ]; - yield [ - 'memcached:///var/local/run/memcached.socket?weight=25', - '/var/local/run/memcached.socket', - 0, - ]; - if (filter_var(ini_get('memcached.use_sasl'), FILTER_VALIDATE_BOOLEAN)) { - yield [ - 'memcached://user:password@/var/local/run/memcached.socket?weight=25', - '/var/local/run/memcached.socket', - 0, - ]; - } - } -} diff --git a/lib/symfony/cache/Tests/Simple/MemcachedCacheTextModeTest.php b/lib/symfony/cache/Tests/Simple/MemcachedCacheTextModeTest.php deleted file mode 100644 index 13865a609..000000000 --- a/lib/symfony/cache/Tests/Simple/MemcachedCacheTextModeTest.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Symfony\Component\Cache\Adapter\AbstractAdapter; -use Symfony\Component\Cache\Simple\MemcachedCache; - -class MemcachedCacheTextModeTest extends MemcachedCacheTest -{ - public function createSimpleCache($defaultLifetime = 0) - { - $client = AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST'), ['binary_protocol' => false]); - - return new MemcachedCache($client, str_replace('\\', '.', __CLASS__), $defaultLifetime); - } -} diff --git a/lib/symfony/cache/Tests/Simple/NullCacheTest.php b/lib/symfony/cache/Tests/Simple/NullCacheTest.php deleted file mode 100644 index 31f42c32b..000000000 --- a/lib/symfony/cache/Tests/Simple/NullCacheTest.php +++ /dev/null @@ -1,96 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Cache\Simple\NullCache; - -/** - * @group time-sensitive - */ -class NullCacheTest extends TestCase -{ - public function createCachePool() - { - return new NullCache(); - } - - public function testGetItem() - { - $cache = $this->createCachePool(); - - $this->assertNull($cache->get('key')); - } - - public function testHas() - { - $this->assertFalse($this->createCachePool()->has('key')); - } - - public function testGetMultiple() - { - $cache = $this->createCachePool(); - - $keys = ['foo', 'bar', 'baz', 'biz']; - - $default = new \stdClass(); - $items = $cache->getMultiple($keys, $default); - $count = 0; - - foreach ($items as $key => $item) { - $this->assertContains($key, $keys, 'Cache key can not change.'); - $this->assertSame($default, $item); - - // Remove $key for $keys - foreach ($keys as $k => $v) { - if ($v === $key) { - unset($keys[$k]); - } - } - - ++$count; - } - - $this->assertSame(4, $count); - } - - public function testClear() - { - $this->assertTrue($this->createCachePool()->clear()); - } - - public function testDelete() - { - $this->assertTrue($this->createCachePool()->delete('key')); - } - - public function testDeleteMultiple() - { - $this->assertTrue($this->createCachePool()->deleteMultiple(['key', 'foo', 'bar'])); - } - - public function testSet() - { - $cache = $this->createCachePool(); - - $this->assertFalse($cache->set('key', 'val')); - $this->assertNull($cache->get('key')); - } - - public function testSetMultiple() - { - $cache = $this->createCachePool(); - - $this->assertFalse($cache->setMultiple(['key' => 'val'])); - $this->assertNull($cache->get('key')); - } -} diff --git a/lib/symfony/cache/Tests/Simple/PdoCacheTest.php b/lib/symfony/cache/Tests/Simple/PdoCacheTest.php deleted file mode 100644 index f5a26341f..000000000 --- a/lib/symfony/cache/Tests/Simple/PdoCacheTest.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Symfony\Component\Cache\Simple\PdoCache; -use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait; - -/** - * @group time-sensitive - */ -class PdoCacheTest extends CacheTestCase -{ - use PdoPruneableTrait; - - protected static $dbFile; - - public static function setUpBeforeClass() - { - if (!\extension_loaded('pdo_sqlite')) { - self::markTestSkipped('Extension pdo_sqlite required.'); - } - - self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); - - $pool = new PdoCache('sqlite:'.self::$dbFile); - $pool->createTable(); - } - - public static function tearDownAfterClass() - { - @unlink(self::$dbFile); - } - - public function createSimpleCache($defaultLifetime = 0) - { - return new PdoCache('sqlite:'.self::$dbFile, 'ns', $defaultLifetime); - } -} diff --git a/lib/symfony/cache/Tests/Simple/PdoDbalCacheTest.php b/lib/symfony/cache/Tests/Simple/PdoDbalCacheTest.php deleted file mode 100644 index 4da2b603c..000000000 --- a/lib/symfony/cache/Tests/Simple/PdoDbalCacheTest.php +++ /dev/null @@ -1,48 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Doctrine\DBAL\DriverManager; -use Symfony\Component\Cache\Simple\PdoCache; -use Symfony\Component\Cache\Tests\Traits\PdoPruneableTrait; - -/** - * @group time-sensitive - */ -class PdoDbalCacheTest extends CacheTestCase -{ - use PdoPruneableTrait; - - protected static $dbFile; - - public static function setUpBeforeClass() - { - if (!\extension_loaded('pdo_sqlite')) { - self::markTestSkipped('Extension pdo_sqlite required.'); - } - - self::$dbFile = tempnam(sys_get_temp_dir(), 'sf_sqlite_cache'); - - $pool = new PdoCache(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile])); - $pool->createTable(); - } - - public static function tearDownAfterClass() - { - @unlink(self::$dbFile); - } - - public function createSimpleCache($defaultLifetime = 0) - { - return new PdoCache(DriverManager::getConnection(['driver' => 'pdo_sqlite', 'path' => self::$dbFile]), '', $defaultLifetime); - } -} diff --git a/lib/symfony/cache/Tests/Simple/PhpArrayCacheTest.php b/lib/symfony/cache/Tests/Simple/PhpArrayCacheTest.php deleted file mode 100644 index c18f71442..000000000 --- a/lib/symfony/cache/Tests/Simple/PhpArrayCacheTest.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Symfony\Component\Cache\Simple\NullCache; -use Symfony\Component\Cache\Simple\PhpArrayCache; -use Symfony\Component\Cache\Tests\Adapter\FilesystemAdapterTest; - -/** - * @group time-sensitive - */ -class PhpArrayCacheTest extends CacheTestCase -{ - protected $skippedTests = [ - 'testBasicUsageWithLongKey' => 'PhpArrayCache does no writes', - - 'testDelete' => 'PhpArrayCache does no writes', - 'testDeleteMultiple' => 'PhpArrayCache does no writes', - 'testDeleteMultipleGenerator' => 'PhpArrayCache does no writes', - - 'testSetTtl' => 'PhpArrayCache does no expiration', - 'testSetMultipleTtl' => 'PhpArrayCache does no expiration', - 'testSetExpiredTtl' => 'PhpArrayCache does no expiration', - 'testSetMultipleExpiredTtl' => 'PhpArrayCache does no expiration', - - 'testGetInvalidKeys' => 'PhpArrayCache does no validation', - 'testGetMultipleInvalidKeys' => 'PhpArrayCache does no validation', - 'testSetInvalidKeys' => 'PhpArrayCache does no validation', - 'testDeleteInvalidKeys' => 'PhpArrayCache does no validation', - 'testDeleteMultipleInvalidKeys' => 'PhpArrayCache does no validation', - 'testSetInvalidTtl' => 'PhpArrayCache does no validation', - 'testSetMultipleInvalidKeys' => 'PhpArrayCache does no validation', - 'testSetMultipleInvalidTtl' => 'PhpArrayCache does no validation', - 'testHasInvalidKeys' => 'PhpArrayCache does no validation', - 'testSetValidData' => 'PhpArrayCache does no validation', - - 'testDefaultLifeTime' => 'PhpArrayCache does not allow configuring a default lifetime.', - 'testPrune' => 'PhpArrayCache just proxies', - ]; - - protected static $file; - - public static function setUpBeforeClass() - { - self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php'; - } - - protected function tearDown() - { - if (file_exists(sys_get_temp_dir().'/symfony-cache')) { - FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); - } - } - - public function createSimpleCache() - { - return new PhpArrayCacheWrapper(self::$file, new NullCache()); - } - - public function testStore() - { - $arrayWithRefs = []; - $arrayWithRefs[0] = 123; - $arrayWithRefs[1] = &$arrayWithRefs[0]; - - $object = (object) [ - 'foo' => 'bar', - 'foo2' => 'bar2', - ]; - - $expected = [ - 'null' => null, - 'serializedString' => serialize($object), - 'arrayWithRefs' => $arrayWithRefs, - 'object' => $object, - 'arrayWithObject' => ['bar' => $object], - ]; - - $cache = new PhpArrayCache(self::$file, new NullCache()); - $cache->warmUp($expected); - - foreach ($expected as $key => $value) { - $this->assertSame(serialize($value), serialize($cache->get($key)), 'Warm up should create a PHP file that OPCache can load in memory'); - } - } - - public function testStoredFile() - { - $expected = [ - 'integer' => 42, - 'float' => 42.42, - 'boolean' => true, - 'array_simple' => ['foo', 'bar'], - 'array_associative' => ['foo' => 'bar', 'foo2' => 'bar2'], - ]; - - $cache = new PhpArrayCache(self::$file, new NullCache()); - $cache->warmUp($expected); - - $values = eval(substr(file_get_contents(self::$file), 6)); - - $this->assertSame($expected, $values, 'Warm up should create a PHP file that OPCache can load in memory'); - } -} - -class PhpArrayCacheWrapper extends PhpArrayCache -{ - public function set($key, $value, $ttl = null) - { - \call_user_func(\Closure::bind(function () use ($key, $value) { - $this->values[$key] = $value; - $this->warmUp($this->values); - $this->values = eval(substr(file_get_contents($this->file), 6)); - }, $this, PhpArrayCache::class)); - - return true; - } - - public function setMultiple($values, $ttl = null) - { - if (!\is_array($values) && !$values instanceof \Traversable) { - return parent::setMultiple($values, $ttl); - } - \call_user_func(\Closure::bind(function () use ($values) { - foreach ($values as $key => $value) { - $this->values[$key] = $value; - } - $this->warmUp($this->values); - $this->values = eval(substr(file_get_contents($this->file), 6)); - }, $this, PhpArrayCache::class)); - - return true; - } -} diff --git a/lib/symfony/cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php b/lib/symfony/cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php deleted file mode 100644 index eba749cec..000000000 --- a/lib/symfony/cache/Tests/Simple/PhpArrayCacheWithFallbackTest.php +++ /dev/null @@ -1,55 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Symfony\Component\Cache\Simple\FilesystemCache; -use Symfony\Component\Cache\Simple\PhpArrayCache; -use Symfony\Component\Cache\Tests\Adapter\FilesystemAdapterTest; - -/** - * @group time-sensitive - */ -class PhpArrayCacheWithFallbackTest extends CacheTestCase -{ - protected $skippedTests = [ - 'testGetInvalidKeys' => 'PhpArrayCache does no validation', - 'testGetMultipleInvalidKeys' => 'PhpArrayCache does no validation', - 'testDeleteInvalidKeys' => 'PhpArrayCache does no validation', - 'testDeleteMultipleInvalidKeys' => 'PhpArrayCache does no validation', - //'testSetValidData' => 'PhpArrayCache does no validation', - 'testSetInvalidKeys' => 'PhpArrayCache does no validation', - 'testSetInvalidTtl' => 'PhpArrayCache does no validation', - 'testSetMultipleInvalidKeys' => 'PhpArrayCache does no validation', - 'testSetMultipleInvalidTtl' => 'PhpArrayCache does no validation', - 'testHasInvalidKeys' => 'PhpArrayCache does no validation', - 'testPrune' => 'PhpArrayCache just proxies', - ]; - - protected static $file; - - public static function setUpBeforeClass() - { - self::$file = sys_get_temp_dir().'/symfony-cache/php-array-adapter-test.php'; - } - - protected function tearDown() - { - if (file_exists(sys_get_temp_dir().'/symfony-cache')) { - FilesystemAdapterTest::rmdir(sys_get_temp_dir().'/symfony-cache'); - } - } - - public function createSimpleCache($defaultLifetime = 0) - { - return new PhpArrayCache(self::$file, new FilesystemCache('php-array-fallback', $defaultLifetime)); - } -} diff --git a/lib/symfony/cache/Tests/Simple/PhpFilesCacheTest.php b/lib/symfony/cache/Tests/Simple/PhpFilesCacheTest.php deleted file mode 100644 index 936f29a43..000000000 --- a/lib/symfony/cache/Tests/Simple/PhpFilesCacheTest.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Psr\SimpleCache\CacheInterface; -use Symfony\Component\Cache\Simple\PhpFilesCache; - -/** - * @group time-sensitive - */ -class PhpFilesCacheTest extends CacheTestCase -{ - protected $skippedTests = [ - 'testDefaultLifeTime' => 'PhpFilesCache does not allow configuring a default lifetime.', - ]; - - public function createSimpleCache() - { - if (!PhpFilesCache::isSupported()) { - $this->markTestSkipped('OPcache extension is not enabled.'); - } - - return new PhpFilesCache('sf-cache'); - } - - protected function isPruned(CacheInterface $cache, $name) - { - $getFileMethod = (new \ReflectionObject($cache))->getMethod('getFile'); - $getFileMethod->setAccessible(true); - - return !file_exists($getFileMethod->invoke($cache, $name)); - } -} diff --git a/lib/symfony/cache/Tests/Simple/Psr6CacheTest.php b/lib/symfony/cache/Tests/Simple/Psr6CacheTest.php deleted file mode 100644 index 1bc75c906..000000000 --- a/lib/symfony/cache/Tests/Simple/Psr6CacheTest.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Symfony\Component\Cache\Adapter\FilesystemAdapter; -use Symfony\Component\Cache\Simple\Psr6Cache; - -/** - * @group time-sensitive - */ -class Psr6CacheTest extends CacheTestCase -{ - protected $skippedTests = [ - 'testPrune' => 'Psr6Cache just proxies', - ]; - - public function createSimpleCache($defaultLifetime = 0) - { - return new Psr6Cache(new FilesystemAdapter('', $defaultLifetime)); - } -} diff --git a/lib/symfony/cache/Tests/Simple/RedisArrayCacheTest.php b/lib/symfony/cache/Tests/Simple/RedisArrayCacheTest.php deleted file mode 100644 index ec5e4c06e..000000000 --- a/lib/symfony/cache/Tests/Simple/RedisArrayCacheTest.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -class RedisArrayCacheTest extends AbstractRedisCacheTest -{ - public static function setUpBeforeClass() - { - parent::setupBeforeClass(); - if (!class_exists('RedisArray')) { - self::markTestSkipped('The RedisArray class is required.'); - } - self::$redis = new \RedisArray([getenv('REDIS_HOST')], ['lazy_connect' => true]); - } -} diff --git a/lib/symfony/cache/Tests/Simple/RedisCacheTest.php b/lib/symfony/cache/Tests/Simple/RedisCacheTest.php deleted file mode 100644 index c2cd31a5b..000000000 --- a/lib/symfony/cache/Tests/Simple/RedisCacheTest.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Symfony\Component\Cache\Simple\RedisCache; - -class RedisCacheTest extends AbstractRedisCacheTest -{ - public static function setUpBeforeClass() - { - parent::setupBeforeClass(); - self::$redis = RedisCache::createConnection('redis://'.getenv('REDIS_HOST')); - } - - public function testCreateConnection() - { - $redisHost = getenv('REDIS_HOST'); - - $redis = RedisCache::createConnection('redis://'.$redisHost); - $this->assertInstanceOf(\Redis::class, $redis); - $this->assertTrue($redis->isConnected()); - $this->assertSame(0, $redis->getDbNum()); - - $redis = RedisCache::createConnection('redis://'.$redisHost.'/2'); - $this->assertSame(2, $redis->getDbNum()); - - $redis = RedisCache::createConnection('redis://'.$redisHost, ['timeout' => 3]); - $this->assertEquals(3, $redis->getTimeout()); - - $redis = RedisCache::createConnection('redis://'.$redisHost.'?timeout=4'); - $this->assertEquals(4, $redis->getTimeout()); - - $redis = RedisCache::createConnection('redis://'.$redisHost, ['read_timeout' => 5]); - $this->assertEquals(5, $redis->getReadTimeout()); - } - - /** - * @dataProvider provideFailedCreateConnection - */ - public function testFailedCreateConnection($dsn) - { - $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('Redis connection failed'); - RedisCache::createConnection($dsn); - } - - public function provideFailedCreateConnection() - { - return [ - ['redis://localhost:1234'], - ['redis://foo@localhost'], - ['redis://localhost/123'], - ]; - } - - /** - * @dataProvider provideInvalidCreateConnection - */ - public function testInvalidCreateConnection($dsn) - { - $this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException'); - $this->expectExceptionMessage('Invalid Redis DSN'); - RedisCache::createConnection($dsn); - } - - public function provideInvalidCreateConnection() - { - return [ - ['foo://localhost'], - ['redis://'], - ]; - } -} diff --git a/lib/symfony/cache/Tests/Simple/RedisClusterCacheTest.php b/lib/symfony/cache/Tests/Simple/RedisClusterCacheTest.php deleted file mode 100644 index 6b7f8039d..000000000 --- a/lib/symfony/cache/Tests/Simple/RedisClusterCacheTest.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -class RedisClusterCacheTest extends AbstractRedisCacheTest -{ - public static function setUpBeforeClass() - { - if (!class_exists('RedisCluster')) { - self::markTestSkipped('The RedisCluster class is required.'); - } - if (!$hosts = getenv('REDIS_CLUSTER_HOSTS')) { - self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.'); - } - - self::$redis = new \RedisCluster(null, explode(' ', $hosts)); - } -} diff --git a/lib/symfony/cache/Tests/Simple/TraceableCacheTest.php b/lib/symfony/cache/Tests/Simple/TraceableCacheTest.php deleted file mode 100644 index e684caf36..000000000 --- a/lib/symfony/cache/Tests/Simple/TraceableCacheTest.php +++ /dev/null @@ -1,171 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Simple; - -use Symfony\Component\Cache\Simple\FilesystemCache; -use Symfony\Component\Cache\Simple\TraceableCache; - -/** - * @group time-sensitive - */ -class TraceableCacheTest extends CacheTestCase -{ - protected $skippedTests = [ - 'testPrune' => 'TraceableCache just proxies', - ]; - - public function createSimpleCache($defaultLifetime = 0) - { - return new TraceableCache(new FilesystemCache('', $defaultLifetime)); - } - - public function testGetMissTrace() - { - $pool = $this->createSimpleCache(); - $pool->get('k'); - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('get', $call->name); - $this->assertSame(['k' => false], $call->result); - $this->assertSame(0, $call->hits); - $this->assertSame(1, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testGetHitTrace() - { - $pool = $this->createSimpleCache(); - $pool->set('k', 'foo'); - $pool->get('k'); - $calls = $pool->getCalls(); - $this->assertCount(2, $calls); - - $call = $calls[1]; - $this->assertSame(1, $call->hits); - $this->assertSame(0, $call->misses); - } - - public function testGetMultipleMissTrace() - { - $pool = $this->createSimpleCache(); - $pool->set('k1', 123); - $values = $pool->getMultiple(['k0', 'k1']); - foreach ($values as $value) { - } - $calls = $pool->getCalls(); - $this->assertCount(2, $calls); - - $call = $calls[1]; - $this->assertSame('getMultiple', $call->name); - $this->assertSame(['k1' => true, 'k0' => false], $call->result); - $this->assertSame(1, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testHasMissTrace() - { - $pool = $this->createSimpleCache(); - $pool->has('k'); - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('has', $call->name); - $this->assertSame(['k' => false], $call->result); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testHasHitTrace() - { - $pool = $this->createSimpleCache(); - $pool->set('k', 'foo'); - $pool->has('k'); - $calls = $pool->getCalls(); - $this->assertCount(2, $calls); - - $call = $calls[1]; - $this->assertSame('has', $call->name); - $this->assertSame(['k' => true], $call->result); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testDeleteTrace() - { - $pool = $this->createSimpleCache(); - $pool->delete('k'); - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('delete', $call->name); - $this->assertSame(['k' => true], $call->result); - $this->assertSame(0, $call->hits); - $this->assertSame(0, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testDeleteMultipleTrace() - { - $pool = $this->createSimpleCache(); - $arg = ['k0', 'k1']; - $pool->deleteMultiple($arg); - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('deleteMultiple', $call->name); - $this->assertSame(['keys' => $arg, 'result' => true], $call->result); - $this->assertSame(0, $call->hits); - $this->assertSame(0, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testTraceSetTrace() - { - $pool = $this->createSimpleCache(); - $pool->set('k', 'foo'); - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('set', $call->name); - $this->assertSame(['k' => true], $call->result); - $this->assertSame(0, $call->hits); - $this->assertSame(0, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } - - public function testSetMultipleTrace() - { - $pool = $this->createSimpleCache(); - $pool->setMultiple(['k' => 'foo']); - $calls = $pool->getCalls(); - $this->assertCount(1, $calls); - - $call = $calls[0]; - $this->assertSame('setMultiple', $call->name); - $this->assertSame(['keys' => ['k'], 'result' => true], $call->result); - $this->assertSame(0, $call->hits); - $this->assertSame(0, $call->misses); - $this->assertNotEmpty($call->start); - $this->assertNotEmpty($call->end); - } -} diff --git a/lib/symfony/cache/Tests/Traits/PdoPruneableTrait.php b/lib/symfony/cache/Tests/Traits/PdoPruneableTrait.php deleted file mode 100644 index 3b1e1128b..000000000 --- a/lib/symfony/cache/Tests/Traits/PdoPruneableTrait.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Cache\Tests\Traits; - -trait PdoPruneableTrait -{ - protected function isPruned($cache, $name) - { - $o = new \ReflectionObject($cache); - - if (!$o->hasMethod('getConnection')) { - self::fail('Cache does not have "getConnection()" method.'); - } - - $getPdoConn = $o->getMethod('getConnection'); - $getPdoConn->setAccessible(true); - - /** @var \Doctrine\DBAL\Statement $select */ - $select = $getPdoConn->invoke($cache)->prepare('SELECT 1 FROM cache_items WHERE item_id LIKE :id'); - $select->bindValue(':id', sprintf('%%%s', $name)); - $select->execute(); - - return 0 === \count($select->fetchAll(\PDO::FETCH_COLUMN)); - } -} diff --git a/lib/symfony/class-loader/Tests/ApcClassLoaderTest.php b/lib/symfony/class-loader/Tests/ApcClassLoaderTest.php deleted file mode 100644 index 6706acbd3..000000000 --- a/lib/symfony/class-loader/Tests/ApcClassLoaderTest.php +++ /dev/null @@ -1,200 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ClassLoader\Tests; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\ClassLoader\ApcClassLoader; -use Symfony\Component\ClassLoader\ClassLoader; - -/** - * @group legacy - */ -class ApcClassLoaderTest extends TestCase -{ - protected function setUp() - { - if (!(filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) && filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN))) { - $this->markTestSkipped('The apc extension is not enabled.'); - } else { - apcu_clear_cache(); - } - } - - protected function tearDown() - { - if (filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) && filter_var(ini_get('apc.enable_cli'), FILTER_VALIDATE_BOOLEAN)) { - apcu_clear_cache(); - } - } - - public function testConstructor() - { - $loader = new ClassLoader(); - $loader->addPrefix('Apc\Namespaced', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - - $loader = new ApcClassLoader('test.prefix.', $loader); - - $this->assertEquals($loader->findFile('\Apc\Namespaced\FooBar'), apcu_fetch('test.prefix.\Apc\Namespaced\FooBar'), '__construct() takes a prefix as its first argument'); - } - - /** - * @dataProvider getLoadClassTests - */ - public function testLoadClass($className, $testClassName, $message) - { - $loader = new ClassLoader(); - $loader->addPrefix('Apc\Namespaced', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix('Apc_Pearlike_', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - - $loader = new ApcClassLoader('test.prefix.', $loader); - $loader->loadClass($testClassName); - $this->assertTrue(class_exists($className), $message); - } - - public function getLoadClassTests() - { - return [ - ['\\Apc\\Namespaced\\Foo', 'Apc\\Namespaced\\Foo', '->loadClass() loads Apc\Namespaced\Foo class'], - ['Apc_Pearlike_Foo', 'Apc_Pearlike_Foo', '->loadClass() loads Apc_Pearlike_Foo class'], - ]; - } - - /** - * @dataProvider getLoadClassFromFallbackTests - */ - public function testLoadClassFromFallback($className, $testClassName, $message) - { - $loader = new ClassLoader(); - $loader->addPrefix('Apc\Namespaced', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix('Apc_Pearlike_', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix('', [__DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/fallback']); - - $loader = new ApcClassLoader('test.prefix.fallback', $loader); - $loader->loadClass($testClassName); - - $this->assertTrue(class_exists($className), $message); - } - - public function getLoadClassFromFallbackTests() - { - return [ - ['\\Apc\\Namespaced\\Baz', 'Apc\\Namespaced\\Baz', '->loadClass() loads Apc\Namespaced\Baz class'], - ['Apc_Pearlike_Baz', 'Apc_Pearlike_Baz', '->loadClass() loads Apc_Pearlike_Baz class'], - ['\\Apc\\Namespaced\\FooBar', 'Apc\\Namespaced\\FooBar', '->loadClass() loads Apc\Namespaced\Baz class from fallback dir'], - ['Apc_Pearlike_FooBar', 'Apc_Pearlike_FooBar', '->loadClass() loads Apc_Pearlike_Baz class from fallback dir'], - ]; - } - - /** - * @dataProvider getLoadClassNamespaceCollisionTests - */ - public function testLoadClassNamespaceCollision($namespaces, $className, $message) - { - $loader = new ClassLoader(); - $loader->addPrefixes($namespaces); - - $loader = new ApcClassLoader('test.prefix.collision.', $loader); - $loader->loadClass($className); - - $this->assertTrue(class_exists($className), $message); - } - - public function getLoadClassNamespaceCollisionTests() - { - return [ - [ - [ - 'Apc\\NamespaceCollision\\A' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', - 'Apc\\NamespaceCollision\\A\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta', - ], - 'Apc\NamespaceCollision\A\Foo', - '->loadClass() loads NamespaceCollision\A\Foo from alpha.', - ], - [ - [ - 'Apc\\NamespaceCollision\\A\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta', - 'Apc\\NamespaceCollision\\A' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', - ], - 'Apc\NamespaceCollision\A\Bar', - '->loadClass() loads NamespaceCollision\A\Bar from alpha.', - ], - [ - [ - 'Apc\\NamespaceCollision\\A' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', - 'Apc\\NamespaceCollision\\A\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta', - ], - 'Apc\NamespaceCollision\A\B\Foo', - '->loadClass() loads NamespaceCollision\A\B\Foo from beta.', - ], - [ - [ - 'Apc\\NamespaceCollision\\A\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta', - 'Apc\\NamespaceCollision\\A' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha', - ], - 'Apc\NamespaceCollision\A\B\Bar', - '->loadClass() loads NamespaceCollision\A\B\Bar from beta.', - ], - ]; - } - - /** - * @dataProvider getLoadClassPrefixCollisionTests - */ - public function testLoadClassPrefixCollision($prefixes, $className, $message) - { - $loader = new ClassLoader(); - $loader->addPrefixes($prefixes); - - $loader = new ApcClassLoader('test.prefix.collision.', $loader); - $loader->loadClass($className); - - $this->assertTrue(class_exists($className), $message); - } - - public function getLoadClassPrefixCollisionTests() - { - return [ - [ - [ - 'ApcPrefixCollision_A_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', - 'ApcPrefixCollision_A_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta/Apc', - ], - 'ApcPrefixCollision_A_Foo', - '->loadClass() loads ApcPrefixCollision_A_Foo from alpha.', - ], - [ - [ - 'ApcPrefixCollision_A_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta/Apc', - 'ApcPrefixCollision_A_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', - ], - 'ApcPrefixCollision_A_Bar', - '->loadClass() loads ApcPrefixCollision_A_Bar from alpha.', - ], - [ - [ - 'ApcPrefixCollision_A_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', - 'ApcPrefixCollision_A_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta/Apc', - ], - 'ApcPrefixCollision_A_B_Foo', - '->loadClass() loads ApcPrefixCollision_A_B_Foo from beta.', - ], - [ - [ - 'ApcPrefixCollision_A_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/beta/Apc', - 'ApcPrefixCollision_A_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/Apc/alpha/Apc', - ], - 'ApcPrefixCollision_A_B_Bar', - '->loadClass() loads ApcPrefixCollision_A_B_Bar from beta.', - ], - ]; - } -} diff --git a/lib/symfony/class-loader/Tests/ClassCollectionLoaderTest.php b/lib/symfony/class-loader/Tests/ClassCollectionLoaderTest.php deleted file mode 100644 index e1d5f56de..000000000 --- a/lib/symfony/class-loader/Tests/ClassCollectionLoaderTest.php +++ /dev/null @@ -1,317 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ClassLoader\Tests; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\ClassLoader\ClassCollectionLoader; -use Symfony\Component\ClassLoader\Tests\Fixtures\DeclaredClass; -use Symfony\Component\ClassLoader\Tests\Fixtures\WarmedClass; - -require_once __DIR__.'/Fixtures/ClassesWithParents/GInterface.php'; -require_once __DIR__.'/Fixtures/ClassesWithParents/CInterface.php'; -require_once __DIR__.'/Fixtures/ClassesWithParents/B.php'; -require_once __DIR__.'/Fixtures/ClassesWithParents/A.php'; - -/** - * @group legacy - */ -class ClassCollectionLoaderTest extends TestCase -{ - public function testTraitDependencies() - { - require_once __DIR__.'/Fixtures/deps/traits.php'; - - $r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader'); - $m = $r->getMethod('getOrderedClasses'); - $m->setAccessible(true); - - $ordered = $m->invoke(null, ['CTFoo']); - - $this->assertEquals( - ['TD', 'TC', 'TB', 'TA', 'TZ', 'CTFoo'], - array_map(function ($class) { return $class->getName(); }, $ordered) - ); - - $ordered = $m->invoke(null, ['CTBar']); - - $this->assertEquals( - ['TD', 'TZ', 'TC', 'TB', 'TA', 'CTBar'], - array_map(function ($class) { return $class->getName(); }, $ordered) - ); - } - - /** - * @dataProvider getDifferentOrders - */ - public function testClassReordering(array $classes) - { - $expected = [ - 'ClassesWithParents\\GInterface', - 'ClassesWithParents\\CInterface', - 'ClassesWithParents\\B', - 'ClassesWithParents\\A', - ]; - - $r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader'); - $m = $r->getMethod('getOrderedClasses'); - $m->setAccessible(true); - - $ordered = $m->invoke(null, $classes); - - $this->assertEquals($expected, array_map(function ($class) { return $class->getName(); }, $ordered)); - } - - public function getDifferentOrders() - { - return [ - [[ - 'ClassesWithParents\\A', - 'ClassesWithParents\\CInterface', - 'ClassesWithParents\\GInterface', - 'ClassesWithParents\\B', - ]], - [[ - 'ClassesWithParents\\B', - 'ClassesWithParents\\A', - 'ClassesWithParents\\CInterface', - ]], - [[ - 'ClassesWithParents\\CInterface', - 'ClassesWithParents\\B', - 'ClassesWithParents\\A', - ]], - [[ - 'ClassesWithParents\\A', - ]], - ]; - } - - /** - * @dataProvider getDifferentOrdersForTraits - */ - public function testClassWithTraitsReordering(array $classes) - { - require_once __DIR__.'/Fixtures/ClassesWithParents/ATrait.php'; - require_once __DIR__.'/Fixtures/ClassesWithParents/BTrait.php'; - require_once __DIR__.'/Fixtures/ClassesWithParents/CTrait.php'; - require_once __DIR__.'/Fixtures/ClassesWithParents/D.php'; - require_once __DIR__.'/Fixtures/ClassesWithParents/E.php'; - - $expected = [ - 'ClassesWithParents\\GInterface', - 'ClassesWithParents\\CInterface', - 'ClassesWithParents\\ATrait', - 'ClassesWithParents\\BTrait', - 'ClassesWithParents\\CTrait', - 'ClassesWithParents\\B', - 'ClassesWithParents\\A', - 'ClassesWithParents\\D', - 'ClassesWithParents\\E', - ]; - - $r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader'); - $m = $r->getMethod('getOrderedClasses'); - $m->setAccessible(true); - - $ordered = $m->invoke(null, $classes); - - $this->assertEquals($expected, array_map(function ($class) { return $class->getName(); }, $ordered)); - } - - public function getDifferentOrdersForTraits() - { - return [ - [[ - 'ClassesWithParents\\E', - 'ClassesWithParents\\ATrait', - ]], - [[ - 'ClassesWithParents\\E', - ]], - ]; - } - - public function testFixClassWithTraitsOrdering() - { - require_once __DIR__.'/Fixtures/ClassesWithParents/CTrait.php'; - require_once __DIR__.'/Fixtures/ClassesWithParents/F.php'; - require_once __DIR__.'/Fixtures/ClassesWithParents/G.php'; - - $classes = [ - 'ClassesWithParents\\F', - 'ClassesWithParents\\G', - ]; - - $expected = [ - 'ClassesWithParents\\CTrait', - 'ClassesWithParents\\F', - 'ClassesWithParents\\G', - ]; - - $r = new \ReflectionClass('Symfony\Component\ClassLoader\ClassCollectionLoader'); - $m = $r->getMethod('getOrderedClasses'); - $m->setAccessible(true); - - $ordered = $m->invoke(null, $classes); - - $this->assertEquals($expected, array_map(function ($class) { return $class->getName(); }, $ordered)); - } - - /** - * @dataProvider getFixNamespaceDeclarationsData - */ - public function testFixNamespaceDeclarations($source, $expected) - { - $this->assertEquals('assertEquals('expectException('InvalidArgumentException'); - if (is_file($file = sys_get_temp_dir().'/foo.php')) { - unlink($file); - } - - ClassCollectionLoader::load(['SomeNotExistingClass'], sys_get_temp_dir(), 'foo', false); - } - - public function testCommentStripping() - { - if (is_file($file = __DIR__.'/bar.php')) { - unlink($file); - } - spl_autoload_register($r = function ($class) { - if (0 === strpos($class, 'Namespaced') || 0 === strpos($class, 'Pearlike_')) { - @require_once __DIR__.'/Fixtures/'.str_replace(['\\', '_'], '/', $class).'.php'; - } - }); - - $strictTypes = \defined('HHVM_VERSION') ? '' : "\nnamespace {require __DIR__.'/Fixtures/Namespaced/WithStrictTypes.php';}"; - - ClassCollectionLoader::load( - ['Namespaced\\WithComments', 'Pearlike_WithComments', 'Namespaced\\WithDirMagic', 'Namespaced\\WithFileMagic', 'Namespaced\\WithHaltCompiler', $strictTypes ? 'Namespaced\\WithStrictTypes' : 'Namespaced\\WithComments'], - __DIR__, - 'bar', - false - ); - - spl_autoload_unregister($r); - - $this->assertEquals(<<<'EOF' -namespace Namespaced -{ -class WithComments -{ -public static $loaded = true; -} -$string ='string should not be modified {$string}'; -$heredoc = (<<assertTrue(class_exists(WarmedClass::class, true)); - - @unlink($cache = sys_get_temp_dir().'/inline.php'); - - $classes = [WarmedClass::class]; - $excluded = [DeclaredClass::class]; - - ClassCollectionLoader::inline($classes, $cache, $excluded); - - $this->assertSame(<<<'EOTXT' - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ClassLoader\Tests; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\ClassLoader\ClassLoader; - -/** - * @group legacy - */ -class ClassLoaderTest extends TestCase -{ - public function testGetPrefixes() - { - $loader = new ClassLoader(); - $loader->addPrefix('Foo', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix('Bar', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix('Bas', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $prefixes = $loader->getPrefixes(); - $this->assertArrayHasKey('Foo', $prefixes); - $this->assertArrayNotHasKey('Foo1', $prefixes); - $this->assertArrayHasKey('Bar', $prefixes); - $this->assertArrayHasKey('Bas', $prefixes); - } - - public function testGetFallbackDirs() - { - $loader = new ClassLoader(); - $loader->addPrefix(null, __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix(null, __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $fallback_dirs = $loader->getFallbackDirs(); - $this->assertCount(2, $fallback_dirs); - } - - /** - * @dataProvider getLoadClassTests - */ - public function testLoadClass($className, $testClassName, $message) - { - $loader = new ClassLoader(); - $loader->addPrefix('Namespaced2\\', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix('Pearlike2_', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->loadClass($testClassName); - $this->assertTrue(class_exists($className), $message); - } - - public function getLoadClassTests() - { - return [ - ['\\Namespaced2\\Foo', 'Namespaced2\\Foo', '->loadClass() loads Namespaced2\Foo class'], - ['\\Pearlike2_Foo', 'Pearlike2_Foo', '->loadClass() loads Pearlike2_Foo class'], - ]; - } - - /** - * @dataProvider getLoadNonexistentClassTests - */ - public function testLoadNonexistentClass($className, $testClassName, $message) - { - $loader = new ClassLoader(); - $loader->addPrefix('Namespaced2\\', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix('Pearlike2_', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->loadClass($testClassName); - $this->assertFalse(class_exists($className), $message); - } - - public function getLoadNonexistentClassTests() - { - return [ - ['\\Pearlike3_Bar', '\\Pearlike3_Bar', '->loadClass() loads non existing Pearlike3_Bar class with a leading slash'], - ]; - } - - public function testAddPrefixSingle() - { - $loader = new ClassLoader(); - $loader->addPrefix('Foo', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix('Foo', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $prefixes = $loader->getPrefixes(); - $this->assertArrayHasKey('Foo', $prefixes); - $this->assertCount(1, $prefixes['Foo']); - } - - public function testAddPrefixesSingle() - { - $loader = new ClassLoader(); - $loader->addPrefixes(['Foo' => ['foo', 'foo']]); - $loader->addPrefixes(['Foo' => ['foo']]); - $prefixes = $loader->getPrefixes(); - $this->assertArrayHasKey('Foo', $prefixes); - $this->assertCount(1, $prefixes['Foo'], print_r($prefixes, true)); - } - - public function testAddPrefixMulti() - { - $loader = new ClassLoader(); - $loader->addPrefix('Foo', 'foo'); - $loader->addPrefix('Foo', 'bar'); - $prefixes = $loader->getPrefixes(); - $this->assertArrayHasKey('Foo', $prefixes); - $this->assertCount(2, $prefixes['Foo']); - $this->assertContains('foo', $prefixes['Foo']); - $this->assertContains('bar', $prefixes['Foo']); - } - - public function testUseIncludePath() - { - $loader = new ClassLoader(); - $this->assertFalse($loader->getUseIncludePath()); - - $this->assertNull($loader->findFile('Foo')); - - $includePath = get_include_path(); - - $loader->setUseIncludePath(true); - $this->assertTrue($loader->getUseIncludePath()); - - set_include_path(__DIR__.'/Fixtures/includepath'.PATH_SEPARATOR.$includePath); - - $this->assertEquals(__DIR__.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.'includepath'.\DIRECTORY_SEPARATOR.'Foo.php', $loader->findFile('Foo')); - - set_include_path($includePath); - } - - /** - * @dataProvider getLoadClassFromFallbackTests - */ - public function testLoadClassFromFallback($className, $testClassName, $message) - { - $loader = new ClassLoader(); - $loader->addPrefix('Namespaced2\\', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix('Pearlike2_', __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'); - $loader->addPrefix('', [__DIR__.\DIRECTORY_SEPARATOR.'Fixtures/fallback']); - $loader->loadClass($testClassName); - $this->assertTrue(class_exists($className), $message); - } - - public function getLoadClassFromFallbackTests() - { - return [ - ['\\Namespaced2\\Baz', 'Namespaced2\\Baz', '->loadClass() loads Namespaced2\Baz class'], - ['\\Pearlike2_Baz', 'Pearlike2_Baz', '->loadClass() loads Pearlike2_Baz class'], - ['\\Namespaced2\\FooBar', 'Namespaced2\\FooBar', '->loadClass() loads Namespaced2\Baz class from fallback dir'], - ['\\Pearlike2_FooBar', 'Pearlike2_FooBar', '->loadClass() loads Pearlike2_Baz class from fallback dir'], - ]; - } - - /** - * @dataProvider getLoadClassNamespaceCollisionTests - */ - public function testLoadClassNamespaceCollision($namespaces, $className, $message) - { - $loader = new ClassLoader(); - $loader->addPrefixes($namespaces); - - $loader->loadClass($className); - $this->assertTrue(class_exists($className), $message); - } - - public function getLoadClassNamespaceCollisionTests() - { - return [ - [ - [ - 'NamespaceCollision\\C' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', - 'NamespaceCollision\\C\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', - ], - 'NamespaceCollision\C\Foo', - '->loadClass() loads NamespaceCollision\C\Foo from alpha.', - ], - [ - [ - 'NamespaceCollision\\C\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', - 'NamespaceCollision\\C' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', - ], - 'NamespaceCollision\C\Bar', - '->loadClass() loads NamespaceCollision\C\Bar from alpha.', - ], - [ - [ - 'NamespaceCollision\\C' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', - 'NamespaceCollision\\C\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', - ], - 'NamespaceCollision\C\B\Foo', - '->loadClass() loads NamespaceCollision\C\B\Foo from beta.', - ], - [ - [ - 'NamespaceCollision\\C\\B' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', - 'NamespaceCollision\\C' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', - ], - 'NamespaceCollision\C\B\Bar', - '->loadClass() loads NamespaceCollision\C\B\Bar from beta.', - ], - [ - [ - 'PrefixCollision_C_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', - 'PrefixCollision_C_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', - ], - 'PrefixCollision_C_Foo', - '->loadClass() loads PrefixCollision_C_Foo from alpha.', - ], - [ - [ - 'PrefixCollision_C_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', - 'PrefixCollision_C_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', - ], - 'PrefixCollision_C_Bar', - '->loadClass() loads PrefixCollision_C_Bar from alpha.', - ], - [ - [ - 'PrefixCollision_C_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', - 'PrefixCollision_C_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', - ], - 'PrefixCollision_C_B_Foo', - '->loadClass() loads PrefixCollision_C_B_Foo from beta.', - ], - [ - [ - 'PrefixCollision_C_B_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/beta', - 'PrefixCollision_C_' => __DIR__.\DIRECTORY_SEPARATOR.'Fixtures/alpha', - ], - 'PrefixCollision_C_B_Bar', - '->loadClass() loads PrefixCollision_C_B_Bar from beta.', - ], - ]; - } -} diff --git a/lib/symfony/class-loader/Tests/ClassMapGeneratorTest.php b/lib/symfony/class-loader/Tests/ClassMapGeneratorTest.php deleted file mode 100644 index 911066018..000000000 --- a/lib/symfony/class-loader/Tests/ClassMapGeneratorTest.php +++ /dev/null @@ -1,151 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ClassLoader\Tests; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\ClassLoader\ClassMapGenerator; - -/** - * @group legacy - */ -class ClassMapGeneratorTest extends TestCase -{ - /** - * @var string|null - */ - private $workspace = null; - - public function prepare_workspace() - { - $this->workspace = sys_get_temp_dir().'/'.microtime(true).'.'.mt_rand(); - mkdir($this->workspace, 0777, true); - $this->workspace = realpath($this->workspace); - } - - /** - * @param string $file - */ - private function clean($file) - { - if (is_dir($file) && !is_link($file)) { - $dir = new \FilesystemIterator($file); - foreach ($dir as $childFile) { - $this->clean($childFile); - } - - rmdir($file); - } else { - unlink($file); - } - } - - /** - * @dataProvider getTestCreateMapTests - */ - public function testDump($directory) - { - $this->prepare_workspace(); - - $file = $this->workspace.'/file'; - - $generator = new ClassMapGenerator(); - $generator->dump($directory, $file); - $this->assertFileExists($file); - - $this->clean($this->workspace); - } - - /** - * @dataProvider getTestCreateMapTests - */ - public function testCreateMap($directory, $expected) - { - $this->assertEqualsNormalized($expected, ClassMapGenerator::createMap($directory)); - } - - public function getTestCreateMapTests() - { - $data = [ - [__DIR__.'/Fixtures/Namespaced', [ - 'Namespaced\\Bar' => realpath(__DIR__).'/Fixtures/Namespaced/Bar.php', - 'Namespaced\\Foo' => realpath(__DIR__).'/Fixtures/Namespaced/Foo.php', - 'Namespaced\\Baz' => realpath(__DIR__).'/Fixtures/Namespaced/Baz.php', - 'Namespaced\\WithComments' => realpath(__DIR__).'/Fixtures/Namespaced/WithComments.php', - 'Namespaced\\WithStrictTypes' => realpath(__DIR__).'/Fixtures/Namespaced/WithStrictTypes.php', - 'Namespaced\\WithHaltCompiler' => realpath(__DIR__).'/Fixtures/Namespaced/WithHaltCompiler.php', - 'Namespaced\\WithDirMagic' => realpath(__DIR__).'/Fixtures/Namespaced/WithDirMagic.php', - 'Namespaced\\WithFileMagic' => realpath(__DIR__).'/Fixtures/Namespaced/WithFileMagic.php', - ]], - [__DIR__.'/Fixtures/beta/NamespaceCollision', [ - 'NamespaceCollision\\A\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Bar.php', - 'NamespaceCollision\\A\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Foo.php', - 'NamespaceCollision\\C\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Bar.php', - 'NamespaceCollision\\C\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Foo.php', - ]], - [__DIR__.'/Fixtures/Pearlike', [ - 'Pearlike_Foo' => realpath(__DIR__).'/Fixtures/Pearlike/Foo.php', - 'Pearlike_Bar' => realpath(__DIR__).'/Fixtures/Pearlike/Bar.php', - 'Pearlike_Baz' => realpath(__DIR__).'/Fixtures/Pearlike/Baz.php', - 'Pearlike_WithComments' => realpath(__DIR__).'/Fixtures/Pearlike/WithComments.php', - ]], - [__DIR__.'/Fixtures/classmap', [ - 'Foo\\Bar\\A' => realpath(__DIR__).'/Fixtures/classmap/sameNsMultipleClasses.php', - 'Foo\\Bar\\B' => realpath(__DIR__).'/Fixtures/classmap/sameNsMultipleClasses.php', - 'A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', - 'Alpha\\A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', - 'Alpha\\B' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', - 'Beta\\A' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', - 'Beta\\B' => realpath(__DIR__).'/Fixtures/classmap/multipleNs.php', - 'ClassMap\\SomeInterface' => realpath(__DIR__).'/Fixtures/classmap/SomeInterface.php', - 'ClassMap\\SomeParent' => realpath(__DIR__).'/Fixtures/classmap/SomeParent.php', - 'ClassMap\\SomeClass' => realpath(__DIR__).'/Fixtures/classmap/SomeClass.php', - ]], - [__DIR__.'/Fixtures/php5.4', [ - 'TFoo' => __DIR__.'/Fixtures/php5.4/traits.php', - 'CFoo' => __DIR__.'/Fixtures/php5.4/traits.php', - 'Foo\\TBar' => __DIR__.'/Fixtures/php5.4/traits.php', - 'Foo\\IBar' => __DIR__.'/Fixtures/php5.4/traits.php', - 'Foo\\TFooBar' => __DIR__.'/Fixtures/php5.4/traits.php', - 'Foo\\CBar' => __DIR__.'/Fixtures/php5.4/traits.php', - ]], - [__DIR__.'/Fixtures/php5.5', [ - 'ClassCons\\Foo' => __DIR__.'/Fixtures/php5.5/class_cons.php', - ]], - ]; - - return $data; - } - - public function testCreateMapFinderSupport() - { - $finder = new \Symfony\Component\Finder\Finder(); - $finder->files()->in(__DIR__.'/Fixtures/beta/NamespaceCollision'); - - $this->assertEqualsNormalized([ - 'NamespaceCollision\\A\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Bar.php', - 'NamespaceCollision\\A\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/A/B/Foo.php', - 'NamespaceCollision\\C\\B\\Bar' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Bar.php', - 'NamespaceCollision\\C\\B\\Foo' => realpath(__DIR__).'/Fixtures/beta/NamespaceCollision/C/B/Foo.php', - ], ClassMapGenerator::createMap($finder)); - } - - protected function assertEqualsNormalized($expected, $actual, $message = '') - { - foreach ($expected as $ns => $path) { - $expected[$ns] = str_replace('\\', '/', $path); - } - foreach ($actual as $ns => $path) { - $actual[$ns] = str_replace('\\', '/', $path); - } - $this->assertEquals($expected, $actual, $message); - } -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/Bar.php b/lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/Bar.php deleted file mode 100644 index 4259f1451..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/Bar.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Apc\Namespaced; - -class Bar -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/Baz.php b/lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/Baz.php deleted file mode 100644 index 3ddb595e2..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/Baz.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Apc\Namespaced; - -class Baz -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/Foo.php b/lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/Foo.php deleted file mode 100644 index cf0a4b741..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/Foo.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Apc\Namespaced; - -class Foo -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/FooBar.php b/lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/FooBar.php deleted file mode 100644 index bbbc81515..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Apc/Namespaced/FooBar.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Apc\Namespaced; - -class FooBar -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Apc/Pearlike/Bar.php b/lib/symfony/class-loader/Tests/Fixtures/Apc/Pearlike/Bar.php deleted file mode 100644 index e774cb9bf..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Apc/Pearlike/Bar.php +++ /dev/null @@ -1,6 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Apc\NamespaceCollision\A; - -class Bar -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Foo.php b/lib/symfony/class-loader/Tests/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Foo.php deleted file mode 100644 index 184a1b1da..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Apc/alpha/Apc/NamespaceCollision/A/Foo.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Apc\NamespaceCollision\A; - -class Foo -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Bar.php b/lib/symfony/class-loader/Tests/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Bar.php deleted file mode 100644 index 3892f7068..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Apc/beta/Apc/ApcPrefixCollision/A/B/Bar.php +++ /dev/null @@ -1,6 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Apc\NamespaceCollision\A\B; - -class Bar -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Foo.php b/lib/symfony/class-loader/Tests/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Foo.php deleted file mode 100644 index 450eeb50b..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Apc/beta/Apc/NamespaceCollision/A/B/Foo.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Apc\NamespaceCollision\A\B; - -class Foo -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Apc/fallback/Apc/Pearlike/FooBar.php b/lib/symfony/class-loader/Tests/Fixtures/Apc/fallback/Apc/Pearlike/FooBar.php deleted file mode 100644 index 96f2f76c6..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Apc/fallback/Apc/Pearlike/FooBar.php +++ /dev/null @@ -1,6 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Apc\Namespaced; - -class FooBar -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/A.php b/lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/A.php deleted file mode 100644 index b0f942595..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/ClassesWithParents/A.php +++ /dev/null @@ -1,7 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Namespaced; - -class Bar -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Namespaced/Baz.php b/lib/symfony/class-loader/Tests/Fixtures/Namespaced/Baz.php deleted file mode 100644 index 0b0bbd057..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Namespaced/Baz.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Namespaced; - -class Baz -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Namespaced/Foo.php b/lib/symfony/class-loader/Tests/Fixtures/Namespaced/Foo.php deleted file mode 100644 index df5e1f4ce..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Namespaced/Foo.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Namespaced; - -class Foo -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Namespaced/WithComments.php b/lib/symfony/class-loader/Tests/Fixtures/Namespaced/WithComments.php deleted file mode 100644 index 361e53de1..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Namespaced/WithComments.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Namespaced; - -class WithComments -{ - /** @Boolean */ - public static $loaded = true; -} - -$string = 'string should not be modified {$string}'; - -$heredoc = (<< - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -class Pearlike_WithComments -{ - /** @Boolean */ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/Pearlike2/Bar.php b/lib/symfony/class-loader/Tests/Fixtures/Pearlike2/Bar.php deleted file mode 100644 index 7f5f79773..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/Pearlike2/Bar.php +++ /dev/null @@ -1,6 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace NamespaceCollision\A; - -class Bar -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/alpha/NamespaceCollision/A/Foo.php b/lib/symfony/class-loader/Tests/Fixtures/alpha/NamespaceCollision/A/Foo.php deleted file mode 100644 index aee6a080d..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/alpha/NamespaceCollision/A/Foo.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace NamespaceCollision\A; - -class Foo -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/alpha/NamespaceCollision/C/Bar.php b/lib/symfony/class-loader/Tests/Fixtures/alpha/NamespaceCollision/C/Bar.php deleted file mode 100644 index c1b8dd65d..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/alpha/NamespaceCollision/C/Bar.php +++ /dev/null @@ -1,8 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace NamespaceCollision\A\B; - -class Bar -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/beta/NamespaceCollision/A/B/Foo.php b/lib/symfony/class-loader/Tests/Fixtures/beta/NamespaceCollision/A/B/Foo.php deleted file mode 100644 index f5f2d727e..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/beta/NamespaceCollision/A/B/Foo.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace NamespaceCollision\A\B; - -class Foo -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/beta/NamespaceCollision/C/B/Bar.php b/lib/symfony/class-loader/Tests/Fixtures/beta/NamespaceCollision/C/B/Bar.php deleted file mode 100644 index 4bb03dc7f..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/beta/NamespaceCollision/C/B/Bar.php +++ /dev/null @@ -1,8 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace ClassMap; - -class SomeClass extends SomeParent implements SomeInterface -{ -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/classmap/SomeInterface.php b/lib/symfony/class-loader/Tests/Fixtures/classmap/SomeInterface.php deleted file mode 100644 index 1fe5e09aa..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/classmap/SomeInterface.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace ClassMap; - -interface SomeInterface -{ -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/classmap/SomeParent.php b/lib/symfony/class-loader/Tests/Fixtures/classmap/SomeParent.php deleted file mode 100644 index ce2f9fc6c..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/classmap/SomeParent.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace ClassMap; - -abstract class SomeParent -{ -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/classmap/multipleNs.php b/lib/symfony/class-loader/Tests/Fixtures/classmap/multipleNs.php deleted file mode 100644 index c7cec646f..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/classmap/multipleNs.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Foo\Bar; - -class A -{ -} -class B -{ -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/deps/traits.php b/lib/symfony/class-loader/Tests/Fixtures/deps/traits.php deleted file mode 100644 index 82b30a6f9..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/deps/traits.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Namespaced; - -class FooBar -{ - public static $loaded = true; -} diff --git a/lib/symfony/class-loader/Tests/Fixtures/fallback/Namespaced2/FooBar.php b/lib/symfony/class-loader/Tests/Fixtures/fallback/Namespaced2/FooBar.php deleted file mode 100644 index 1036d4359..000000000 --- a/lib/symfony/class-loader/Tests/Fixtures/fallback/Namespaced2/FooBar.php +++ /dev/null @@ -1,8 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\ClassLoader\Tests; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\ClassLoader\Psr4ClassLoader; - -/** - * @group legacy - */ -class Psr4ClassLoaderTest extends TestCase -{ - /** - * @param string $className - * @dataProvider getLoadClassTests - */ - public function testLoadClass($className) - { - $loader = new Psr4ClassLoader(); - $loader->addPrefix( - 'Acme\\DemoLib', - __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.'psr-4' - ); - $loader->loadClass($className); - $this->assertTrue(class_exists($className), sprintf('loadClass() should load %s', $className)); - } - - /** - * @return array - */ - public function getLoadClassTests() - { - return [ - ['Acme\\DemoLib\\Foo'], - ['Acme\\DemoLib\\Class_With_Underscores'], - ['Acme\\DemoLib\\Lets\\Go\\Deeper\\Foo'], - ['Acme\\DemoLib\\Lets\\Go\\Deeper\\Class_With_Underscores'], - ]; - } - - /** - * @param string $className - * @dataProvider getLoadNonexistentClassTests - */ - public function testLoadNonexistentClass($className) - { - $loader = new Psr4ClassLoader(); - $loader->addPrefix( - 'Acme\\DemoLib', - __DIR__.\DIRECTORY_SEPARATOR.'Fixtures'.\DIRECTORY_SEPARATOR.'psr-4' - ); - $loader->loadClass($className); - $this->assertFalse(class_exists($className), sprintf('loadClass() should not load %s', $className)); - } - - /** - * @return array - */ - public function getLoadNonexistentClassTests() - { - return [ - ['Acme\\DemoLib\\I_Do_Not_Exist'], - ['UnknownVendor\\SomeLib\\I_Do_Not_Exist'], - ]; - } -} diff --git a/lib/symfony/config/Tests/ConfigCacheFactoryTest.php b/lib/symfony/config/Tests/ConfigCacheFactoryTest.php deleted file mode 100644 index 6190b9b45..000000000 --- a/lib/symfony/config/Tests/ConfigCacheFactoryTest.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\ConfigCacheFactory; - -class ConfigCacheFactoryTest extends TestCase -{ - public function testCacheWithInvalidCallback() - { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage('Invalid type for callback argument. Expected callable, but got "object".'); - $cacheFactory = new ConfigCacheFactory(true); - - $cacheFactory->cache('file', new \stdClass()); - } -} diff --git a/lib/symfony/config/Tests/ConfigCacheTest.php b/lib/symfony/config/Tests/ConfigCacheTest.php deleted file mode 100644 index d0b70899b..000000000 --- a/lib/symfony/config/Tests/ConfigCacheTest.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\ConfigCache; -use Symfony\Component\Config\Tests\Resource\ResourceStub; - -class ConfigCacheTest extends TestCase -{ - private $cacheFile = null; - - protected function setUp() - { - $this->cacheFile = tempnam(sys_get_temp_dir(), 'config_'); - } - - protected function tearDown() - { - $files = [$this->cacheFile, $this->cacheFile.'.meta']; - - foreach ($files as $file) { - if (file_exists($file)) { - unlink($file); - } - } - } - - /** - * @dataProvider debugModes - */ - public function testCacheIsNotValidIfNothingHasBeenCached($debug) - { - unlink($this->cacheFile); // remove tempnam() side effect - $cache = new ConfigCache($this->cacheFile, $debug); - - $this->assertFalse($cache->isFresh()); - } - - public function testIsAlwaysFreshInProduction() - { - $staleResource = new ResourceStub(); - $staleResource->setFresh(false); - - $cache = new ConfigCache($this->cacheFile, false); - $cache->write('', [$staleResource]); - - $this->assertTrue($cache->isFresh()); - } - - /** - * @dataProvider debugModes - */ - public function testIsFreshWhenNoResourceProvided($debug) - { - $cache = new ConfigCache($this->cacheFile, $debug); - $cache->write('', []); - $this->assertTrue($cache->isFresh()); - } - - public function testFreshResourceInDebug() - { - $freshResource = new ResourceStub(); - $freshResource->setFresh(true); - - $cache = new ConfigCache($this->cacheFile, true); - $cache->write('', [$freshResource]); - - $this->assertTrue($cache->isFresh()); - } - - public function testStaleResourceInDebug() - { - $staleResource = new ResourceStub(); - $staleResource->setFresh(false); - - $cache = new ConfigCache($this->cacheFile, true); - $cache->write('', [$staleResource]); - - $this->assertFalse($cache->isFresh()); - } - - public function debugModes() - { - return [ - [true], - [false], - ]; - } -} diff --git a/lib/symfony/config/Tests/Definition/ArrayNodeTest.php b/lib/symfony/config/Tests/Definition/ArrayNodeTest.php deleted file mode 100644 index 25c2cfc69..000000000 --- a/lib/symfony/config/Tests/Definition/ArrayNodeTest.php +++ /dev/null @@ -1,237 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\ArrayNode; -use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException; -use Symfony\Component\Config\Definition\ScalarNode; - -class ArrayNodeTest extends TestCase -{ - public function testNormalizeThrowsExceptionWhenFalseIsNotAllowed() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException'); - $node = new ArrayNode('root'); - $node->normalize(false); - } - - public function testExceptionThrownOnUnrecognizedChild() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException'); - $this->expectExceptionMessage('Unrecognized option "foo" under "root"'); - $node = new ArrayNode('root'); - $node->normalize(['foo' => 'bar']); - } - - public function ignoreAndRemoveMatrixProvider() - { - $unrecognizedOptionException = new InvalidConfigurationException('Unrecognized option "foo" under "root"'); - - return [ - [true, true, [], 'no exception is thrown for an unrecognized child if the ignoreExtraKeys option is set to true'], - [true, false, ['foo' => 'bar'], 'extra keys are not removed when ignoreExtraKeys second option is set to false'], - [false, true, $unrecognizedOptionException], - [false, false, $unrecognizedOptionException], - ]; - } - - /** - * @dataProvider ignoreAndRemoveMatrixProvider - */ - public function testIgnoreAndRemoveBehaviors($ignore, $remove, $expected, $message = '') - { - if ($expected instanceof \Exception) { - $this->expectException(\get_class($expected)); - $this->expectExceptionMessage($expected->getMessage()); - } - $node = new ArrayNode('root'); - $node->setIgnoreExtraKeys($ignore, $remove); - $result = $node->normalize(['foo' => 'bar']); - $this->assertSame($expected, $result, $message); - } - - /** - * @dataProvider getPreNormalizationTests - */ - public function testPreNormalize($denormalized, $normalized) - { - $node = new ArrayNode('foo'); - - $r = new \ReflectionMethod($node, 'preNormalize'); - $r->setAccessible(true); - - $this->assertSame($normalized, $r->invoke($node, $denormalized)); - } - - public function getPreNormalizationTests() - { - return [ - [ - ['foo-bar' => 'foo'], - ['foo_bar' => 'foo'], - ], - [ - ['foo-bar_moo' => 'foo'], - ['foo-bar_moo' => 'foo'], - ], - [ - ['anything-with-dash-and-no-underscore' => 'first', 'no_dash' => 'second'], - ['anything_with_dash_and_no_underscore' => 'first', 'no_dash' => 'second'], - ], - [ - ['foo-bar' => null, 'foo_bar' => 'foo'], - ['foo-bar' => null, 'foo_bar' => 'foo'], - ], - ]; - } - - /** - * @dataProvider getZeroNamedNodeExamplesData - */ - public function testNodeNameCanBeZero($denormalized, $normalized) - { - $zeroNode = new ArrayNode(0); - $zeroNode->addChild(new ScalarNode('name')); - $fiveNode = new ArrayNode(5); - $fiveNode->addChild(new ScalarNode(0)); - $fiveNode->addChild(new ScalarNode('new_key')); - $rootNode = new ArrayNode('root'); - $rootNode->addChild($zeroNode); - $rootNode->addChild($fiveNode); - $rootNode->addChild(new ScalarNode('string_key')); - $r = new \ReflectionMethod($rootNode, 'normalizeValue'); - $r->setAccessible(true); - - $this->assertSame($normalized, $r->invoke($rootNode, $denormalized)); - } - - public function getZeroNamedNodeExamplesData() - { - return [ - [ - [ - 0 => [ - 'name' => 'something', - ], - 5 => [ - 0 => 'this won\'t work too', - 'new_key' => 'some other value', - ], - 'string_key' => 'just value', - ], - [ - 0 => [ - 'name' => 'something', - ], - 5 => [ - 0 => 'this won\'t work too', - 'new_key' => 'some other value', - ], - 'string_key' => 'just value', - ], - ], - ]; - } - - /** - * @dataProvider getPreNormalizedNormalizedOrderedData - */ - public function testChildrenOrderIsMaintainedOnNormalizeValue($prenormalized, $normalized) - { - $scalar1 = new ScalarNode('1'); - $scalar2 = new ScalarNode('2'); - $scalar3 = new ScalarNode('3'); - $node = new ArrayNode('foo'); - $node->addChild($scalar1); - $node->addChild($scalar3); - $node->addChild($scalar2); - - $r = new \ReflectionMethod($node, 'normalizeValue'); - $r->setAccessible(true); - - $this->assertSame($normalized, $r->invoke($node, $prenormalized)); - } - - public function getPreNormalizedNormalizedOrderedData() - { - return [ - [ - ['2' => 'two', '1' => 'one', '3' => 'three'], - ['2' => 'two', '1' => 'one', '3' => 'three'], - ], - ]; - } - - public function testAddChildEmptyName() - { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage('Child nodes must be named.'); - $node = new ArrayNode('root'); - - $childNode = new ArrayNode(''); - $node->addChild($childNode); - } - - public function testAddChildNameAlreadyExists() - { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage('A child node named "foo" already exists.'); - $node = new ArrayNode('root'); - - $childNode = new ArrayNode('foo'); - $node->addChild($childNode); - - $childNodeWithSameName = new ArrayNode('foo'); - $node->addChild($childNodeWithSameName); - } - - public function testGetDefaultValueWithoutDefaultValue() - { - $this->expectException('RuntimeException'); - $this->expectExceptionMessage('The node at path "foo" has no default value.'); - $node = new ArrayNode('foo'); - $node->getDefaultValue(); - } - - public function testSetDeprecated() - { - $childNode = new ArrayNode('foo'); - $childNode->setDeprecated('"%node%" is deprecated'); - - $this->assertTrue($childNode->isDeprecated()); - $this->assertSame('"foo" is deprecated', $childNode->getDeprecationMessage($childNode->getName(), $childNode->getPath())); - - $node = new ArrayNode('root'); - $node->addChild($childNode); - - $deprecationTriggered = false; - $deprecationHandler = function ($level, $message, $file, $line) use (&$prevErrorHandler, &$deprecationTriggered) { - if (E_USER_DEPRECATED === $level) { - return $deprecationTriggered = true; - } - - return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false; - }; - - $prevErrorHandler = set_error_handler($deprecationHandler); - $node->finalize([]); - restore_error_handler(); - - $this->assertFalse($deprecationTriggered, '->finalize() should not trigger if the deprecated node is not set'); - - $prevErrorHandler = set_error_handler($deprecationHandler); - $node->finalize(['foo' => []]); - restore_error_handler(); - $this->assertTrue($deprecationTriggered, '->finalize() should trigger if the deprecated node is set'); - } -} diff --git a/lib/symfony/config/Tests/Definition/BooleanNodeTest.php b/lib/symfony/config/Tests/Definition/BooleanNodeTest.php deleted file mode 100644 index 8552eeba3..000000000 --- a/lib/symfony/config/Tests/Definition/BooleanNodeTest.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\BooleanNode; - -class BooleanNodeTest extends TestCase -{ - /** - * @dataProvider getValidValues - */ - public function testNormalize($value) - { - $node = new BooleanNode('test'); - $this->assertSame($value, $node->normalize($value)); - } - - /** - * @dataProvider getValidValues - * - * @param bool $value - */ - public function testValidNonEmptyValues($value) - { - $node = new BooleanNode('test'); - $node->setAllowEmptyValue(false); - - $this->assertSame($value, $node->finalize($value)); - } - - public function getValidValues() - { - return [ - [false], - [true], - ]; - } - - /** - * @dataProvider getInvalidValues - */ - public function testNormalizeThrowsExceptionOnInvalidValues($value) - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException'); - $node = new BooleanNode('test'); - $node->normalize($value); - } - - public function getInvalidValues() - { - return [ - [null], - [''], - ['foo'], - [0], - [1], - [0.0], - [0.1], - [[]], - [['foo' => 'bar']], - [new \stdClass()], - ]; - } -} diff --git a/lib/symfony/config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php b/lib/symfony/config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php deleted file mode 100644 index 1123b4159..000000000 --- a/lib/symfony/config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php +++ /dev/null @@ -1,362 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition\Builder; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; -use Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition; -use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; -use Symfony\Component\Config\Definition\Processor; - -class ArrayNodeDefinitionTest extends TestCase -{ - public function testAppendingSomeNode() - { - $parent = new ArrayNodeDefinition('root'); - $child = new ScalarNodeDefinition('child'); - - $parent - ->children() - ->scalarNode('foo')->end() - ->scalarNode('bar')->end() - ->end() - ->append($child); - - $this->assertCount(3, $this->getField($parent, 'children')); - $this->assertContains($child, $this->getField($parent, 'children')); - } - - /** - * @dataProvider providePrototypeNodeSpecificCalls - */ - public function testPrototypeNodeSpecificOption($method, $args) - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidDefinitionException'); - $node = new ArrayNodeDefinition('root'); - - \call_user_func_array([$node, $method], $args); - - $node->getNode(); - } - - public function providePrototypeNodeSpecificCalls() - { - return [ - ['defaultValue', [[]]], - ['addDefaultChildrenIfNoneSet', []], - ['requiresAtLeastOneElement', []], - ['useAttributeAsKey', ['foo']], - ]; - } - - public function testConcreteNodeSpecificOption() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidDefinitionException'); - $node = new ArrayNodeDefinition('root'); - $node - ->addDefaultsIfNotSet() - ->prototype('array') - ; - $node->getNode(); - } - - public function testPrototypeNodesCantHaveADefaultValueWhenUsingDefaultChildren() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidDefinitionException'); - $node = new ArrayNodeDefinition('root'); - $node - ->defaultValue([]) - ->addDefaultChildrenIfNoneSet('foo') - ->prototype('array') - ; - $node->getNode(); - } - - public function testPrototypedArrayNodeDefaultWhenUsingDefaultChildren() - { - $node = new ArrayNodeDefinition('root'); - $node - ->addDefaultChildrenIfNoneSet() - ->prototype('array') - ; - $tree = $node->getNode(); - $this->assertEquals([[]], $tree->getDefaultValue()); - } - - /** - * @dataProvider providePrototypedArrayNodeDefaults - */ - public function testPrototypedArrayNodeDefault($args, $shouldThrowWhenUsingAttrAsKey, $shouldThrowWhenNotUsingAttrAsKey, $defaults) - { - $node = new ArrayNodeDefinition('root'); - $node - ->addDefaultChildrenIfNoneSet($args) - ->prototype('array') - ; - - try { - $tree = $node->getNode(); - $this->assertFalse($shouldThrowWhenNotUsingAttrAsKey); - $this->assertEquals($defaults, $tree->getDefaultValue()); - } catch (InvalidDefinitionException $e) { - $this->assertTrue($shouldThrowWhenNotUsingAttrAsKey); - } - - $node = new ArrayNodeDefinition('root'); - $node - ->useAttributeAsKey('attr') - ->addDefaultChildrenIfNoneSet($args) - ->prototype('array') - ; - - try { - $tree = $node->getNode(); - $this->assertFalse($shouldThrowWhenUsingAttrAsKey); - $this->assertEquals($defaults, $tree->getDefaultValue()); - } catch (InvalidDefinitionException $e) { - $this->assertTrue($shouldThrowWhenUsingAttrAsKey); - } - } - - public function providePrototypedArrayNodeDefaults() - { - return [ - [null, true, false, [[]]], - [2, true, false, [[], []]], - ['2', false, true, ['2' => []]], - ['foo', false, true, ['foo' => []]], - [['foo'], false, true, ['foo' => []]], - [['foo', 'bar'], false, true, ['foo' => [], 'bar' => []]], - ]; - } - - public function testNestedPrototypedArrayNodes() - { - $nodeDefinition = new ArrayNodeDefinition('root'); - $nodeDefinition - ->addDefaultChildrenIfNoneSet() - ->prototype('array') - ->prototype('array') - ; - $node = $nodeDefinition->getNode(); - - $this->assertInstanceOf('Symfony\Component\Config\Definition\PrototypedArrayNode', $node); - $this->assertInstanceOf('Symfony\Component\Config\Definition\PrototypedArrayNode', $node->getPrototype()); - } - - public function testEnabledNodeDefaults() - { - $node = new ArrayNodeDefinition('root'); - $node - ->canBeEnabled() - ->children() - ->scalarNode('foo')->defaultValue('bar')->end() - ; - - $this->assertEquals(['enabled' => false, 'foo' => 'bar'], $node->getNode()->getDefaultValue()); - } - - /** - * @dataProvider getEnableableNodeFixtures - */ - public function testTrueEnableEnabledNode($expected, $config, $message) - { - $processor = new Processor(); - $node = new ArrayNodeDefinition('root'); - $node - ->canBeEnabled() - ->children() - ->scalarNode('foo')->defaultValue('bar')->end() - ; - - $this->assertEquals( - $expected, - $processor->process($node->getNode(), $config), - $message - ); - } - - public function testCanBeDisabled() - { - $node = new ArrayNodeDefinition('root'); - $node->canBeDisabled(); - - $this->assertTrue($this->getField($node, 'addDefaults')); - $this->assertEquals(['enabled' => false], $this->getField($node, 'falseEquivalent')); - $this->assertEquals(['enabled' => true], $this->getField($node, 'trueEquivalent')); - $this->assertEquals(['enabled' => true], $this->getField($node, 'nullEquivalent')); - - $nodeChildren = $this->getField($node, 'children'); - $this->assertArrayHasKey('enabled', $nodeChildren); - - $enabledNode = $nodeChildren['enabled']; - $this->assertTrue($this->getField($enabledNode, 'default')); - $this->assertTrue($this->getField($enabledNode, 'defaultValue')); - } - - public function testIgnoreExtraKeys() - { - $node = new ArrayNodeDefinition('root'); - - $this->assertFalse($this->getField($node, 'ignoreExtraKeys')); - - $result = $node->ignoreExtraKeys(); - - $this->assertEquals($node, $result); - $this->assertTrue($this->getField($node, 'ignoreExtraKeys')); - } - - public function testNormalizeKeys() - { - $node = new ArrayNodeDefinition('root'); - - $this->assertTrue($this->getField($node, 'normalizeKeys')); - - $result = $node->normalizeKeys(false); - - $this->assertEquals($node, $result); - $this->assertFalse($this->getField($node, 'normalizeKeys')); - } - - public function testUnsetChild() - { - $node = new ArrayNodeDefinition('root'); - $node - ->children() - ->scalarNode('value') - ->beforeNormalization() - ->ifTrue(function ($value) { - return empty($value); - }) - ->thenUnset() - ->end() - ->end() - ->end() - ; - - $this->assertSame([], $node->getNode()->normalize(['value' => null])); - } - - public function testPrototypeVariable() - { - $node = new ArrayNodeDefinition('root'); - $this->assertEquals($node->prototype('variable'), $node->variablePrototype()); - } - - public function testPrototypeScalar() - { - $node = new ArrayNodeDefinition('root'); - $this->assertEquals($node->prototype('scalar'), $node->scalarPrototype()); - } - - public function testPrototypeBoolean() - { - $node = new ArrayNodeDefinition('root'); - $this->assertEquals($node->prototype('boolean'), $node->booleanPrototype()); - } - - public function testPrototypeInteger() - { - $node = new ArrayNodeDefinition('root'); - $this->assertEquals($node->prototype('integer'), $node->integerPrototype()); - } - - public function testPrototypeFloat() - { - $node = new ArrayNodeDefinition('root'); - $this->assertEquals($node->prototype('float'), $node->floatPrototype()); - } - - public function testPrototypeArray() - { - $node = new ArrayNodeDefinition('root'); - $this->assertEquals($node->prototype('array'), $node->arrayPrototype()); - } - - public function testPrototypeEnum() - { - $node = new ArrayNodeDefinition('root'); - $this->assertEquals($node->prototype('enum'), $node->enumPrototype()); - } - - public function getEnableableNodeFixtures() - { - return [ - [['enabled' => true, 'foo' => 'bar'], [true], 'true enables an enableable node'], - [['enabled' => true, 'foo' => 'bar'], [null], 'null enables an enableable node'], - [['enabled' => true, 'foo' => 'bar'], [['enabled' => true]], 'An enableable node can be enabled'], - [['enabled' => true, 'foo' => 'baz'], [['foo' => 'baz']], 'any configuration enables an enableable node'], - [['enabled' => false, 'foo' => 'baz'], [['foo' => 'baz', 'enabled' => false]], 'An enableable node can be disabled'], - [['enabled' => false, 'foo' => 'bar'], [false], 'false disables an enableable node'], - ]; - } - - public function testRequiresAtLeastOneElement() - { - $node = new ArrayNodeDefinition('root'); - $node - ->requiresAtLeastOneElement() - ->integerPrototype(); - - $node->getNode()->finalize([1]); - - $this->addToAssertionCount(1); - } - - /** - * @group legacy - * @expectedDeprecation Using Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition::cannotBeEmpty() at path "root" has no effect, consider requiresAtLeastOneElement() instead. In 4.0 both methods will behave the same. - */ - public function testCannotBeEmpty() - { - $node = new ArrayNodeDefinition('root'); - $node - ->cannotBeEmpty() - ->integerPrototype(); - - $node->getNode()->finalize([]); - } - - public function testSetDeprecated() - { - $node = new ArrayNodeDefinition('root'); - $node - ->children() - ->arrayNode('foo')->setDeprecated('The "%path%" node is deprecated.')->end() - ->end() - ; - $deprecatedNode = $node->getNode()->getChildren()['foo']; - - $this->assertTrue($deprecatedNode->isDeprecated()); - $this->assertSame('The "root.foo" node is deprecated.', $deprecatedNode->getDeprecationMessage($deprecatedNode->getName(), $deprecatedNode->getPath())); - } - - /** - * @group legacy - * @expectedDeprecation ->cannotBeEmpty() is not applicable to concrete nodes at path "root". In 4.0 it will throw an exception. - */ - public function testCannotBeEmptyOnConcreteNode() - { - $node = new ArrayNodeDefinition('root'); - $node->cannotBeEmpty(); - - $node->getNode()->finalize([]); - } - - protected function getField($object, $field) - { - $reflection = new \ReflectionProperty($object, $field); - $reflection->setAccessible(true); - - return $reflection->getValue($object); - } -} diff --git a/lib/symfony/config/Tests/Definition/Builder/BooleanNodeDefinitionTest.php b/lib/symfony/config/Tests/Definition/Builder/BooleanNodeDefinitionTest.php deleted file mode 100644 index 6f568a2df..000000000 --- a/lib/symfony/config/Tests/Definition/Builder/BooleanNodeDefinitionTest.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition\Builder; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition; - -class BooleanNodeDefinitionTest extends TestCase -{ - public function testCannotBeEmptyThrowsAnException() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidDefinitionException'); - $this->expectExceptionMessage('->cannotBeEmpty() is not applicable to BooleanNodeDefinition.'); - $def = new BooleanNodeDefinition('foo'); - $def->cannotBeEmpty(); - } - - public function testSetDeprecated() - { - $def = new BooleanNodeDefinition('foo'); - $def->setDeprecated('The "%path%" node is deprecated.'); - - $node = $def->getNode(); - - $this->assertTrue($node->isDeprecated()); - $this->assertSame('The "foo" node is deprecated.', $node->getDeprecationMessage($node->getName(), $node->getPath())); - } -} diff --git a/lib/symfony/config/Tests/Definition/Builder/EnumNodeDefinitionTest.php b/lib/symfony/config/Tests/Definition/Builder/EnumNodeDefinitionTest.php deleted file mode 100644 index 2e43a1354..000000000 --- a/lib/symfony/config/Tests/Definition/Builder/EnumNodeDefinitionTest.php +++ /dev/null @@ -1,73 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition\Builder; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\Builder\EnumNodeDefinition; - -class EnumNodeDefinitionTest extends TestCase -{ - public function testWithOneValue() - { - $def = new EnumNodeDefinition('foo'); - $def->values(['foo']); - - $node = $def->getNode(); - $this->assertEquals(['foo'], $node->getValues()); - } - - public function testWithOneDistinctValue() - { - $def = new EnumNodeDefinition('foo'); - $def->values(['foo', 'foo']); - - $node = $def->getNode(); - $this->assertEquals(['foo'], $node->getValues()); - } - - public function testNoValuesPassed() - { - $this->expectException('RuntimeException'); - $this->expectExceptionMessage('You must call ->values() on enum nodes.'); - $def = new EnumNodeDefinition('foo'); - $def->getNode(); - } - - public function testWithNoValues() - { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage('->values() must be called with at least one value.'); - $def = new EnumNodeDefinition('foo'); - $def->values([]); - } - - public function testGetNode() - { - $def = new EnumNodeDefinition('foo'); - $def->values(['foo', 'bar']); - - $node = $def->getNode(); - $this->assertEquals(['foo', 'bar'], $node->getValues()); - } - - public function testSetDeprecated() - { - $def = new EnumNodeDefinition('foo'); - $def->values(['foo', 'bar']); - $def->setDeprecated('The "%path%" node is deprecated.'); - - $node = $def->getNode(); - - $this->assertTrue($node->isDeprecated()); - $this->assertSame('The "foo" node is deprecated.', $def->getNode()->getDeprecationMessage($node->getName(), $node->getPath())); - } -} diff --git a/lib/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php b/lib/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php deleted file mode 100644 index 85d0d3631..000000000 --- a/lib/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php +++ /dev/null @@ -1,264 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition\Builder; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\Builder\TreeBuilder; - -class ExprBuilderTest extends TestCase -{ - public function testAlwaysExpression() - { - $test = $this->getTestBuilder() - ->always($this->returnClosure('new_value')) - ->end(); - - $this->assertFinalizedValueIs('new_value', $test); - } - - public function testIfTrueExpression() - { - $test = $this->getTestBuilder() - ->ifTrue() - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('new_value', $test, ['key' => true]); - - $test = $this->getTestBuilder() - ->ifTrue(function ($v) { return true; }) - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('new_value', $test); - - $test = $this->getTestBuilder() - ->ifTrue(function ($v) { return false; }) - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('value', $test); - } - - public function testIfStringExpression() - { - $test = $this->getTestBuilder() - ->ifString() - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('new_value', $test); - - $test = $this->getTestBuilder() - ->ifString() - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs(45, $test, ['key' => 45]); - } - - public function testIfNullExpression() - { - $test = $this->getTestBuilder() - ->ifNull() - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('new_value', $test, ['key' => null]); - - $test = $this->getTestBuilder() - ->ifNull() - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('value', $test); - } - - public function testIfEmptyExpression() - { - $test = $this->getTestBuilder() - ->ifEmpty() - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('new_value', $test, ['key' => []]); - - $test = $this->getTestBuilder() - ->ifEmpty() - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('value', $test); - } - - public function testIfArrayExpression() - { - $test = $this->getTestBuilder() - ->ifArray() - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('new_value', $test, ['key' => []]); - - $test = $this->getTestBuilder() - ->ifArray() - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('value', $test); - } - - public function testIfInArrayExpression() - { - $test = $this->getTestBuilder() - ->ifInArray(['foo', 'bar', 'value']) - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('new_value', $test); - - $test = $this->getTestBuilder() - ->ifInArray(['foo', 'bar']) - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('value', $test); - } - - public function testIfNotInArrayExpression() - { - $test = $this->getTestBuilder() - ->ifNotInArray(['foo', 'bar']) - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('new_value', $test); - - $test = $this->getTestBuilder() - ->ifNotInArray(['foo', 'bar', 'value_from_config']) - ->then($this->returnClosure('new_value')) - ->end(); - $this->assertFinalizedValueIs('new_value', $test); - } - - public function testThenEmptyArrayExpression() - { - $test = $this->getTestBuilder() - ->ifString() - ->thenEmptyArray() - ->end(); - $this->assertFinalizedValueIs([], $test); - } - - /** - * @dataProvider castToArrayValues - */ - public function testcastToArrayExpression($configValue, $expectedValue) - { - $test = $this->getTestBuilder() - ->castToArray() - ->end(); - $this->assertFinalizedValueIs($expectedValue, $test, ['key' => $configValue]); - } - - public function castToArrayValues() - { - yield ['value', ['value']]; - yield [-3.14, [-3.14]]; - yield [null, [null]]; - yield [['value'], ['value']]; - } - - public function testThenInvalid() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException'); - $test = $this->getTestBuilder() - ->ifString() - ->thenInvalid('Invalid value') - ->end(); - $this->finalizeTestBuilder($test); - } - - public function testThenUnsetExpression() - { - $test = $this->getTestBuilder() - ->ifString() - ->thenUnset() - ->end(); - $this->assertEquals([], $this->finalizeTestBuilder($test)); - } - - public function testEndIfPartNotSpecified() - { - $this->expectException('RuntimeException'); - $this->expectExceptionMessage('You must specify an if part.'); - $this->getTestBuilder()->end(); - } - - public function testEndThenPartNotSpecified() - { - $this->expectException('RuntimeException'); - $this->expectExceptionMessage('You must specify a then part.'); - $builder = $this->getTestBuilder(); - $builder->ifPart = 'test'; - $builder->end(); - } - - /** - * Create a test treebuilder with a variable node, and init the validation. - * - * @return TreeBuilder - */ - protected function getTestBuilder() - { - $builder = new TreeBuilder(); - - return $builder - ->root('test') - ->children() - ->variableNode('key') - ->validate() - ; - } - - /** - * Close the validation process and finalize with the given config. - * - * @param TreeBuilder $testBuilder The tree builder to finalize - * @param array $config The config you want to use for the finalization, if nothing provided - * a simple ['key'=>'value'] will be used - * - * @return array The finalized config values - */ - protected function finalizeTestBuilder($testBuilder, $config = null) - { - return $testBuilder - ->end() - ->end() - ->end() - ->buildTree() - ->finalize(null === $config ? ['key' => 'value'] : $config) - ; - } - - /** - * Return a closure that will return the given value. - * - * @param mixed $val The value that the closure must return - * - * @return \Closure - */ - protected function returnClosure($val) - { - return function ($v) use ($val) { - return $val; - }; - } - - /** - * Assert that the given test builder, will return the given value. - * - * @param mixed $value The value to test - * @param TreeBuilder $treeBuilder The tree builder to finalize - * @param mixed $config The config values that new to be finalized - */ - protected function assertFinalizedValueIs($value, $treeBuilder, $config = null) - { - $this->assertEquals(['key' => $value], $this->finalizeTestBuilder($treeBuilder, $config)); - } -} diff --git a/lib/symfony/config/Tests/Definition/Builder/NodeBuilderTest.php b/lib/symfony/config/Tests/Definition/Builder/NodeBuilderTest.php deleted file mode 100644 index 5cc7cfea4..000000000 --- a/lib/symfony/config/Tests/Definition/Builder/NodeBuilderTest.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition\Builder; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\Builder\NodeBuilder as BaseNodeBuilder; -use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVariableNodeDefinition; - -class NodeBuilderTest extends TestCase -{ - public function testThrowsAnExceptionWhenTryingToCreateANonRegisteredNodeType() - { - $this->expectException('RuntimeException'); - $builder = new BaseNodeBuilder(); - $builder->node('', 'foobar'); - } - - public function testThrowsAnExceptionWhenTheNodeClassIsNotFound() - { - $this->expectException('RuntimeException'); - $builder = new BaseNodeBuilder(); - $builder - ->setNodeClass('noclasstype', '\\foo\\bar\\noclass') - ->node('', 'noclasstype'); - } - - public function testAddingANewNodeType() - { - $class = __NAMESPACE__.'\\SomeNodeDefinition'; - - $builder = new BaseNodeBuilder(); - $node = $builder - ->setNodeClass('newtype', $class) - ->node('', 'newtype'); - - $this->assertInstanceOf($class, $node); - } - - public function testOverridingAnExistingNodeType() - { - $class = __NAMESPACE__.'\\SomeNodeDefinition'; - - $builder = new BaseNodeBuilder(); - $node = $builder - ->setNodeClass('variable', $class) - ->node('', 'variable'); - - $this->assertInstanceOf($class, $node); - } - - public function testNodeTypesAreNotCaseSensitive() - { - $builder = new BaseNodeBuilder(); - - $node1 = $builder->node('', 'VaRiAbLe'); - $node2 = $builder->node('', 'variable'); - - $this->assertInstanceOf(\get_class($node1), $node2); - - $builder->setNodeClass('CuStOm', __NAMESPACE__.'\\SomeNodeDefinition'); - - $node1 = $builder->node('', 'CUSTOM'); - $node2 = $builder->node('', 'custom'); - - $this->assertInstanceOf(\get_class($node1), $node2); - } - - public function testNumericNodeCreation() - { - $builder = new BaseNodeBuilder(); - - $node = $builder->integerNode('foo')->min(3)->max(5); - $this->assertInstanceOf('Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition', $node); - - $node = $builder->floatNode('bar')->min(3.0)->max(5.0); - $this->assertInstanceOf('Symfony\Component\Config\Definition\Builder\FloatNodeDefinition', $node); - } -} - -class SomeNodeDefinition extends BaseVariableNodeDefinition -{ -} diff --git a/lib/symfony/config/Tests/Definition/Builder/NumericNodeDefinitionTest.php b/lib/symfony/config/Tests/Definition/Builder/NumericNodeDefinitionTest.php deleted file mode 100644 index aa938bbaa..000000000 --- a/lib/symfony/config/Tests/Definition/Builder/NumericNodeDefinitionTest.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition\Builder; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\Builder\FloatNodeDefinition; -use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition; - -class NumericNodeDefinitionTest extends TestCase -{ - public function testIncoherentMinAssertion() - { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage('You cannot define a min(4) as you already have a max(3)'); - $def = new IntegerNodeDefinition('foo'); - $def->max(3)->min(4); - } - - public function testIncoherentMaxAssertion() - { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage('You cannot define a max(2) as you already have a min(3)'); - $node = new IntegerNodeDefinition('foo'); - $node->min(3)->max(2); - } - - public function testIntegerMinAssertion() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException'); - $this->expectExceptionMessage('The value 4 is too small for path "foo". Should be greater than or equal to 5'); - $def = new IntegerNodeDefinition('foo'); - $def->min(5)->getNode()->finalize(4); - } - - public function testIntegerMaxAssertion() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException'); - $this->expectExceptionMessage('The value 4 is too big for path "foo". Should be less than or equal to 3'); - $def = new IntegerNodeDefinition('foo'); - $def->max(3)->getNode()->finalize(4); - } - - public function testIntegerValidMinMaxAssertion() - { - $def = new IntegerNodeDefinition('foo'); - $node = $def->min(3)->max(7)->getNode(); - $this->assertEquals(4, $node->finalize(4)); - } - - public function testFloatMinAssertion() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException'); - $this->expectExceptionMessage('The value 400 is too small for path "foo". Should be greater than or equal to 500'); - $def = new FloatNodeDefinition('foo'); - $def->min(5E2)->getNode()->finalize(4e2); - } - - public function testFloatMaxAssertion() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException'); - $this->expectExceptionMessage('The value 4.3 is too big for path "foo". Should be less than or equal to 0.3'); - $def = new FloatNodeDefinition('foo'); - $def->max(0.3)->getNode()->finalize(4.3); - } - - public function testFloatValidMinMaxAssertion() - { - $def = new FloatNodeDefinition('foo'); - $node = $def->min(3.0)->max(7e2)->getNode(); - $this->assertEquals(4.5, $node->finalize(4.5)); - } - - public function testCannotBeEmptyThrowsAnException() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidDefinitionException'); - $this->expectExceptionMessage('->cannotBeEmpty() is not applicable to NumericNodeDefinition.'); - $def = new IntegerNodeDefinition('foo'); - $def->cannotBeEmpty(); - } -} diff --git a/lib/symfony/config/Tests/Definition/Builder/TreeBuilderTest.php b/lib/symfony/config/Tests/Definition/Builder/TreeBuilderTest.php deleted file mode 100644 index 53c9c256b..000000000 --- a/lib/symfony/config/Tests/Definition/Builder/TreeBuilderTest.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition\Builder; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder as CustomNodeBuilder; - -class TreeBuilderTest extends TestCase -{ - public function testUsingACustomNodeBuilder() - { - $builder = new TreeBuilder(); - $root = $builder->root('custom', 'array', new CustomNodeBuilder()); - - $nodeBuilder = $root->children(); - - $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder', $nodeBuilder); - - $nodeBuilder = $nodeBuilder->arrayNode('deeper')->children(); - - $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder', $nodeBuilder); - } - - public function testOverrideABuiltInNodeType() - { - $builder = new TreeBuilder(); - $root = $builder->root('override', 'array', new CustomNodeBuilder()); - - $definition = $root->children()->variableNode('variable'); - - $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\VariableNodeDefinition', $definition); - } - - public function testAddANodeType() - { - $builder = new TreeBuilder(); - $root = $builder->root('override', 'array', new CustomNodeBuilder()); - - $definition = $root->children()->barNode('variable'); - - $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\BarNodeDefinition', $definition); - } - - public function testCreateABuiltInNodeTypeWithACustomNodeBuilder() - { - $builder = new TreeBuilder(); - $root = $builder->root('builtin', 'array', new CustomNodeBuilder()); - - $definition = $root->children()->booleanNode('boolean'); - - $this->assertInstanceOf('Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition', $definition); - } - - public function testPrototypedArrayNodeUseTheCustomNodeBuilder() - { - $builder = new TreeBuilder(); - $root = $builder->root('override', 'array', new CustomNodeBuilder()); - - $root->prototype('bar')->end(); - - $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\BarNode', $root->getNode(true)->getPrototype()); - } - - public function testAnExtendedNodeBuilderGetsPropagatedToTheChildren() - { - $builder = new TreeBuilder(); - - $builder->root('propagation') - ->children() - ->setNodeClass('extended', 'Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition') - ->node('foo', 'extended')->end() - ->arrayNode('child') - ->children() - ->node('foo', 'extended') - ->end() - ->end() - ->end() - ->end(); - - $node = $builder->buildTree(); - $children = $node->getChildren(); - - $this->assertInstanceOf('Symfony\Component\Config\Definition\BooleanNode', $children['foo']); - - $childChildren = $children['child']->getChildren(); - - $this->assertInstanceOf('Symfony\Component\Config\Definition\BooleanNode', $childChildren['foo']); - } - - public function testDefinitionInfoGetsTransferredToNode() - { - $builder = new TreeBuilder(); - - $builder->root('test')->info('root info') - ->children() - ->node('child', 'variable')->info('child info')->defaultValue('default') - ->end() - ->end(); - - $tree = $builder->buildTree(); - $children = $tree->getChildren(); - - $this->assertEquals('root info', $tree->getInfo()); - $this->assertEquals('child info', $children['child']->getInfo()); - } - - public function testDefinitionExampleGetsTransferredToNode() - { - $builder = new TreeBuilder(); - - $builder->root('test') - ->example(['key' => 'value']) - ->children() - ->node('child', 'variable')->info('child info')->defaultValue('default')->example('example') - ->end() - ->end(); - - $tree = $builder->buildTree(); - $children = $tree->getChildren(); - - $this->assertIsArray($tree->getExample()); - $this->assertEquals('example', $children['child']->getExample()); - } -} diff --git a/lib/symfony/config/Tests/Definition/Dumper/XmlReferenceDumperTest.php b/lib/symfony/config/Tests/Definition/Dumper/XmlReferenceDumperTest.php deleted file mode 100644 index 5bc961bab..000000000 --- a/lib/symfony/config/Tests/Definition/Dumper/XmlReferenceDumperTest.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition\Dumper; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\Dumper\XmlReferenceDumper; -use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration; - -class XmlReferenceDumperTest extends TestCase -{ - public function testDumper() - { - $configuration = new ExampleConfiguration(); - - $dumper = new XmlReferenceDumper(); - $this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration)); - } - - public function testNamespaceDumper() - { - $configuration = new ExampleConfiguration(); - - $dumper = new XmlReferenceDumper(); - $this->assertEquals(str_replace('http://example.org/schema/dic/acme_root', 'http://symfony.com/schema/dic/symfony', $this->getConfigurationAsString()), $dumper->dump($configuration, 'http://symfony.com/schema/dic/symfony')); - } - - private function getConfigurationAsString() - { - return str_replace("\n", PHP_EOL, <<<'EOL' - - - - - - - - - - - - - - scalar value - - - scalar value - - - - - - - - - - - - - - - - - - - - - - - - -EOL - ); - } -} diff --git a/lib/symfony/config/Tests/Definition/Dumper/YamlReferenceDumperTest.php b/lib/symfony/config/Tests/Definition/Dumper/YamlReferenceDumperTest.php deleted file mode 100644 index 3cb9121ba..000000000 --- a/lib/symfony/config/Tests/Definition/Dumper/YamlReferenceDumperTest.php +++ /dev/null @@ -1,143 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition\Dumper; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper; -use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration; - -class YamlReferenceDumperTest extends TestCase -{ - public function testDumper() - { - $configuration = new ExampleConfiguration(); - - $dumper = new YamlReferenceDumper(); - - $this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration)); - } - - public function provideDumpAtPath() - { - return [ - 'Regular node' => ['scalar_true', << ['array', << ['array.child2', << ['cms_pages.page', << ['cms_pages.page.locale', <<assertSame(trim($expected), trim($dumper->dumpAtPath($configuration, $path))); - } - - private function getConfigurationAsString() - { - return <<<'EOL' -acme_root: - boolean: true - scalar_empty: ~ - scalar_null: null - scalar_true: true - scalar_false: false - scalar_default: default - scalar_array_empty: [] - scalar_array_defaults: - - # Defaults: - - elem1 - - elem2 - scalar_required: ~ # Required - scalar_deprecated: ~ # Deprecated (The child node "scalar_deprecated" at path "acme_root" is deprecated.) - scalar_deprecated_with_message: ~ # Deprecated (Deprecation custom message for "scalar_deprecated_with_message" at "acme_root") - node_with_a_looong_name: ~ - enum_with_default: this # One of "this"; "that" - enum: ~ # One of "this"; "that" - - # some info - array: - child1: ~ - child2: ~ - - # this is a long - # multi-line info text - # which should be indented - child3: ~ # Example: example setting - scalar_prototyped: [] - parameters: - - # Prototype: Parameter name - name: ~ - connections: - - # Prototype - - - user: ~ - pass: ~ - cms_pages: - - # Prototype - page: - - # Prototype - locale: - title: ~ # Required - path: ~ # Required - pipou: - - # Prototype - name: [] - -EOL; - } -} diff --git a/lib/symfony/config/Tests/Definition/EnumNodeTest.php b/lib/symfony/config/Tests/Definition/EnumNodeTest.php deleted file mode 100644 index fa89eea23..000000000 --- a/lib/symfony/config/Tests/Definition/EnumNodeTest.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\EnumNode; - -class EnumNodeTest extends TestCase -{ - public function testFinalizeValue() - { - $node = new EnumNode('foo', null, ['foo', 'bar']); - $this->assertSame('foo', $node->finalize('foo')); - } - - public function testConstructionWithNoValues() - { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage('$values must contain at least one element.'); - new EnumNode('foo', null, []); - } - - public function testConstructionWithOneValue() - { - $node = new EnumNode('foo', null, ['foo']); - $this->assertSame('foo', $node->finalize('foo')); - } - - public function testConstructionWithOneDistinctValue() - { - $node = new EnumNode('foo', null, ['foo', 'foo']); - $this->assertSame('foo', $node->finalize('foo')); - } - - public function testFinalizeWithInvalidValue() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException'); - $this->expectExceptionMessage('The value "foobar" is not allowed for path "foo". Permissible values: "foo", "bar"'); - $node = new EnumNode('foo', null, ['foo', 'bar']); - $node->finalize('foobar'); - } -} diff --git a/lib/symfony/config/Tests/Definition/FinalizationTest.php b/lib/symfony/config/Tests/Definition/FinalizationTest.php deleted file mode 100644 index be68a27c6..000000000 --- a/lib/symfony/config/Tests/Definition/FinalizationTest.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\NodeInterface; -use Symfony\Component\Config\Definition\Processor; - -class FinalizationTest extends TestCase -{ - public function testUnsetKeyWithDeepHierarchy() - { - $tb = new TreeBuilder(); - $tree = $tb - ->root('config', 'array') - ->children() - ->node('level1', 'array') - ->canBeUnset() - ->children() - ->node('level2', 'array') - ->canBeUnset() - ->children() - ->node('somevalue', 'scalar')->end() - ->node('anothervalue', 'scalar')->end() - ->end() - ->end() - ->node('level1_scalar', 'scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->buildTree() - ; - - $a = [ - 'level1' => [ - 'level2' => [ - 'somevalue' => 'foo', - 'anothervalue' => 'bar', - ], - 'level1_scalar' => 'foo', - ], - ]; - - $b = [ - 'level1' => [ - 'level2' => false, - ], - ]; - - $this->assertEquals([ - 'level1' => [ - 'level1_scalar' => 'foo', - ], - ], $this->process($tree, [$a, $b])); - } - - protected function process(NodeInterface $tree, array $configs) - { - $processor = new Processor(); - - return $processor->process($tree, $configs); - } -} diff --git a/lib/symfony/config/Tests/Definition/FloatNodeTest.php b/lib/symfony/config/Tests/Definition/FloatNodeTest.php deleted file mode 100644 index fed9f013d..000000000 --- a/lib/symfony/config/Tests/Definition/FloatNodeTest.php +++ /dev/null @@ -1,78 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\FloatNode; - -class FloatNodeTest extends TestCase -{ - /** - * @dataProvider getValidValues - */ - public function testNormalize($value) - { - $node = new FloatNode('test'); - $this->assertSame($value, $node->normalize($value)); - } - - /** - * @dataProvider getValidValues - * - * @param int $value - */ - public function testValidNonEmptyValues($value) - { - $node = new FloatNode('test'); - $node->setAllowEmptyValue(false); - - $this->assertSame($value, $node->finalize($value)); - } - - public function getValidValues() - { - return [ - [1798.0], - [-678.987], - [12.56E45], - [0.0], - // Integer are accepted too, they will be cast - [17], - [-10], - [0], - ]; - } - - /** - * @dataProvider getInvalidValues - */ - public function testNormalizeThrowsExceptionOnInvalidValues($value) - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException'); - $node = new FloatNode('test'); - $node->normalize($value); - } - - public function getInvalidValues() - { - return [ - [null], - [''], - ['foo'], - [true], - [false], - [[]], - [['foo' => 'bar']], - [new \stdClass()], - ]; - } -} diff --git a/lib/symfony/config/Tests/Definition/IntegerNodeTest.php b/lib/symfony/config/Tests/Definition/IntegerNodeTest.php deleted file mode 100644 index 3fb1b771e..000000000 --- a/lib/symfony/config/Tests/Definition/IntegerNodeTest.php +++ /dev/null @@ -1,75 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\IntegerNode; - -class IntegerNodeTest extends TestCase -{ - /** - * @dataProvider getValidValues - */ - public function testNormalize($value) - { - $node = new IntegerNode('test'); - $this->assertSame($value, $node->normalize($value)); - } - - /** - * @dataProvider getValidValues - * - * @param int $value - */ - public function testValidNonEmptyValues($value) - { - $node = new IntegerNode('test'); - $node->setAllowEmptyValue(false); - - $this->assertSame($value, $node->finalize($value)); - } - - public function getValidValues() - { - return [ - [1798], - [-678], - [0], - ]; - } - - /** - * @dataProvider getInvalidValues - */ - public function testNormalizeThrowsExceptionOnInvalidValues($value) - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException'); - $node = new IntegerNode('test'); - $node->normalize($value); - } - - public function getInvalidValues() - { - return [ - [null], - [''], - ['foo'], - [true], - [false], - [0.0], - [0.1], - [[]], - [['foo' => 'bar']], - [new \stdClass()], - ]; - } -} diff --git a/lib/symfony/config/Tests/Definition/MergeTest.php b/lib/symfony/config/Tests/Definition/MergeTest.php deleted file mode 100644 index 8fee2635c..000000000 --- a/lib/symfony/config/Tests/Definition/MergeTest.php +++ /dev/null @@ -1,192 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\Builder\TreeBuilder; - -class MergeTest extends TestCase -{ - public function testForbiddenOverwrite() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException'); - $tb = new TreeBuilder(); - $tree = $tb - ->root('root', 'array') - ->children() - ->node('foo', 'scalar') - ->cannotBeOverwritten() - ->end() - ->end() - ->end() - ->buildTree() - ; - - $a = [ - 'foo' => 'bar', - ]; - - $b = [ - 'foo' => 'moo', - ]; - - $tree->merge($a, $b); - } - - public function testUnsetKey() - { - $tb = new TreeBuilder(); - $tree = $tb - ->root('root', 'array') - ->children() - ->node('foo', 'scalar')->end() - ->node('bar', 'scalar')->end() - ->node('unsettable', 'array') - ->canBeUnset() - ->children() - ->node('foo', 'scalar')->end() - ->node('bar', 'scalar')->end() - ->end() - ->end() - ->node('unsetted', 'array') - ->canBeUnset() - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->buildTree() - ; - - $a = [ - 'foo' => 'bar', - 'unsettable' => [ - 'foo' => 'a', - 'bar' => 'b', - ], - 'unsetted' => false, - ]; - - $b = [ - 'foo' => 'moo', - 'bar' => 'b', - 'unsettable' => false, - 'unsetted' => ['a', 'b'], - ]; - - $this->assertEquals([ - 'foo' => 'moo', - 'bar' => 'b', - 'unsettable' => false, - 'unsetted' => ['a', 'b'], - ], $tree->merge($a, $b)); - } - - public function testDoesNotAllowNewKeysInSubsequentConfigs() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException'); - $tb = new TreeBuilder(); - $tree = $tb - ->root('config', 'array') - ->children() - ->node('test', 'array') - ->disallowNewKeysInSubsequentConfigs() - ->useAttributeAsKey('key') - ->prototype('array') - ->children() - ->node('value', 'scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->buildTree(); - - $a = [ - 'test' => [ - 'a' => ['value' => 'foo'], - ], - ]; - - $b = [ - 'test' => [ - 'b' => ['value' => 'foo'], - ], - ]; - - $tree->merge($a, $b); - } - - public function testPerformsNoDeepMerging() - { - $tb = new TreeBuilder(); - - $tree = $tb - ->root('config', 'array') - ->children() - ->node('no_deep_merging', 'array') - ->performNoDeepMerging() - ->children() - ->node('foo', 'scalar')->end() - ->node('bar', 'scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->buildTree() - ; - - $a = [ - 'no_deep_merging' => [ - 'foo' => 'a', - 'bar' => 'b', - ], - ]; - - $b = [ - 'no_deep_merging' => [ - 'c' => 'd', - ], - ]; - - $this->assertEquals([ - 'no_deep_merging' => [ - 'c' => 'd', - ], - ], $tree->merge($a, $b)); - } - - public function testPrototypeWithoutAKeyAttribute() - { - $tb = new TreeBuilder(); - - $tree = $tb - ->root('config', 'array') - ->children() - ->arrayNode('append_elements') - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->buildTree() - ; - - $a = [ - 'append_elements' => ['a', 'b'], - ]; - - $b = [ - 'append_elements' => ['c', 'd'], - ]; - - $this->assertEquals(['append_elements' => ['a', 'b', 'c', 'd']], $tree->merge($a, $b)); - } -} diff --git a/lib/symfony/config/Tests/Definition/NormalizationTest.php b/lib/symfony/config/Tests/Definition/NormalizationTest.php deleted file mode 100644 index 200a98594..000000000 --- a/lib/symfony/config/Tests/Definition/NormalizationTest.php +++ /dev/null @@ -1,228 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\NodeInterface; - -class NormalizationTest extends TestCase -{ - /** - * @dataProvider getEncoderTests - */ - public function testNormalizeEncoders($denormalized) - { - $tb = new TreeBuilder(); - $tree = $tb - ->root('root_name', 'array') - ->fixXmlConfig('encoder') - ->children() - ->node('encoders', 'array') - ->useAttributeAsKey('class') - ->prototype('array') - ->beforeNormalization()->ifString()->then(function ($v) { return ['algorithm' => $v]; })->end() - ->children() - ->node('algorithm', 'scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->buildTree() - ; - - $normalized = [ - 'encoders' => [ - 'foo' => ['algorithm' => 'plaintext'], - ], - ]; - - $this->assertNormalized($tree, $denormalized, $normalized); - } - - public function getEncoderTests() - { - $configs = []; - - // XML - $configs[] = [ - 'encoder' => [ - ['class' => 'foo', 'algorithm' => 'plaintext'], - ], - ]; - - // XML when only one element of this type - $configs[] = [ - 'encoder' => ['class' => 'foo', 'algorithm' => 'plaintext'], - ]; - - // YAML/PHP - $configs[] = [ - 'encoders' => [ - ['class' => 'foo', 'algorithm' => 'plaintext'], - ], - ]; - - // YAML/PHP - $configs[] = [ - 'encoders' => [ - 'foo' => 'plaintext', - ], - ]; - - // YAML/PHP - $configs[] = [ - 'encoders' => [ - 'foo' => ['algorithm' => 'plaintext'], - ], - ]; - - return array_map(function ($v) { - return [$v]; - }, $configs); - } - - /** - * @dataProvider getAnonymousKeysTests - */ - public function testAnonymousKeysArray($denormalized) - { - $tb = new TreeBuilder(); - $tree = $tb - ->root('root', 'array') - ->children() - ->node('logout', 'array') - ->fixXmlConfig('handler') - ->children() - ->node('handlers', 'array') - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ->buildTree() - ; - - $normalized = ['logout' => ['handlers' => ['a', 'b', 'c']]]; - - $this->assertNormalized($tree, $denormalized, $normalized); - } - - public function getAnonymousKeysTests() - { - $configs = []; - - $configs[] = [ - 'logout' => [ - 'handlers' => ['a', 'b', 'c'], - ], - ]; - - $configs[] = [ - 'logout' => [ - 'handler' => ['a', 'b', 'c'], - ], - ]; - - return array_map(function ($v) { return [$v]; }, $configs); - } - - /** - * @dataProvider getNumericKeysTests - */ - public function testNumericKeysAsAttributes($denormalized) - { - $normalized = [ - 'thing' => [42 => ['foo', 'bar'], 1337 => ['baz', 'qux']], - ]; - - $this->assertNormalized($this->getNumericKeysTestTree(), $denormalized, $normalized); - } - - public function getNumericKeysTests() - { - $configs = []; - - $configs[] = [ - 'thing' => [ - 42 => ['foo', 'bar'], 1337 => ['baz', 'qux'], - ], - ]; - - $configs[] = [ - 'thing' => [ - ['foo', 'bar', 'id' => 42], ['baz', 'qux', 'id' => 1337], - ], - ]; - - return array_map(function ($v) { return [$v]; }, $configs); - } - - public function testNonAssociativeArrayThrowsExceptionIfAttributeNotSet() - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException'); - $this->expectExceptionMessage('The attribute "id" must be set for path "root.thing".'); - $denormalized = [ - 'thing' => [ - ['foo', 'bar'], ['baz', 'qux'], - ], - ]; - - $this->assertNormalized($this->getNumericKeysTestTree(), $denormalized, []); - } - - public function testAssociativeArrayPreserveKeys() - { - $tb = new TreeBuilder(); - $tree = $tb - ->root('root', 'array') - ->prototype('array') - ->children() - ->node('foo', 'scalar')->end() - ->end() - ->end() - ->end() - ->buildTree() - ; - - $data = ['first' => ['foo' => 'bar']]; - - $this->assertNormalized($tree, $data, $data); - } - - public static function assertNormalized(NodeInterface $tree, $denormalized, $normalized) - { - self::assertSame($normalized, $tree->normalize($denormalized)); - } - - private function getNumericKeysTestTree() - { - $tb = new TreeBuilder(); - $tree = $tb - ->root('root', 'array') - ->children() - ->node('thing', 'array') - ->useAttributeAsKey('id') - ->prototype('array') - ->prototype('scalar')->end() - ->end() - ->end() - ->end() - ->end() - ->buildTree() - ; - - return $tree; - } -} diff --git a/lib/symfony/config/Tests/Definition/PrototypedArrayNodeTest.php b/lib/symfony/config/Tests/Definition/PrototypedArrayNodeTest.php deleted file mode 100644 index 7a58ead8d..000000000 --- a/lib/symfony/config/Tests/Definition/PrototypedArrayNodeTest.php +++ /dev/null @@ -1,341 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\ArrayNode; -use Symfony\Component\Config\Definition\PrototypedArrayNode; -use Symfony\Component\Config\Definition\ScalarNode; -use Symfony\Component\Config\Definition\VariableNode; - -class PrototypedArrayNodeTest extends TestCase -{ - public function testGetDefaultValueReturnsAnEmptyArrayForPrototypes() - { - $node = new PrototypedArrayNode('root'); - $prototype = new ArrayNode(null, $node); - $node->setPrototype($prototype); - $this->assertEmpty($node->getDefaultValue()); - } - - public function testGetDefaultValueReturnsDefaultValueForPrototypes() - { - $node = new PrototypedArrayNode('root'); - $prototype = new ArrayNode(null, $node); - $node->setPrototype($prototype); - $node->setDefaultValue(['test']); - $this->assertEquals(['test'], $node->getDefaultValue()); - } - - // a remapped key (e.g. "mapping" -> "mappings") should be unset after being used - public function testRemappedKeysAreUnset() - { - $node = new ArrayNode('root'); - $mappingsNode = new PrototypedArrayNode('mappings'); - $node->addChild($mappingsNode); - - // each item under mappings is just a scalar - $prototype = new ScalarNode(null, $mappingsNode); - $mappingsNode->setPrototype($prototype); - - $remappings = []; - $remappings[] = ['mapping', 'mappings']; - $node->setXmlRemappings($remappings); - - $normalized = $node->normalize(['mapping' => ['foo', 'bar']]); - $this->assertEquals(['mappings' => ['foo', 'bar']], $normalized); - } - - /** - * Tests that when a key attribute is mapped, that key is removed from the array. - * - * - * - * - * The above should finally be mapped to an array that looks like this - * (because "id" is the key attribute). - * - * [ - * 'things' => [ - * 'option1' => 'foo', - * 'option2' => 'bar', - * ] - * ] - */ - public function testMappedAttributeKeyIsRemoved() - { - $node = new PrototypedArrayNode('root'); - $node->setKeyAttribute('id', true); - - // each item under the root is an array, with one scalar item - $prototype = new ArrayNode(null, $node); - $prototype->addChild(new ScalarNode('foo')); - $node->setPrototype($prototype); - - $children = []; - $children[] = ['id' => 'item_name', 'foo' => 'bar']; - $normalized = $node->normalize($children); - - $expected = []; - $expected['item_name'] = ['foo' => 'bar']; - $this->assertEquals($expected, $normalized); - } - - /** - * Tests the opposite of the testMappedAttributeKeyIsRemoved because - * the removal can be toggled with an option. - */ - public function testMappedAttributeKeyNotRemoved() - { - $node = new PrototypedArrayNode('root'); - $node->setKeyAttribute('id', false); - - // each item under the root is an array, with two scalar items - $prototype = new ArrayNode(null, $node); - $prototype->addChild(new ScalarNode('foo')); - $prototype->addChild(new ScalarNode('id')); // the key attribute will remain - $node->setPrototype($prototype); - - $children = []; - $children[] = ['id' => 'item_name', 'foo' => 'bar']; - $normalized = $node->normalize($children); - - $expected = []; - $expected['item_name'] = ['id' => 'item_name', 'foo' => 'bar']; - $this->assertEquals($expected, $normalized); - } - - public function testAddDefaultChildren() - { - $node = $this->getPrototypeNodeWithDefaultChildren(); - $node->setAddChildrenIfNoneSet(); - $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals([['foo' => 'bar']], $node->getDefaultValue()); - - $node = $this->getPrototypeNodeWithDefaultChildren(); - $node->setKeyAttribute('foobar'); - $node->setAddChildrenIfNoneSet(); - $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals(['defaults' => ['foo' => 'bar']], $node->getDefaultValue()); - - $node = $this->getPrototypeNodeWithDefaultChildren(); - $node->setKeyAttribute('foobar'); - $node->setAddChildrenIfNoneSet('defaultkey'); - $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals(['defaultkey' => ['foo' => 'bar']], $node->getDefaultValue()); - - $node = $this->getPrototypeNodeWithDefaultChildren(); - $node->setKeyAttribute('foobar'); - $node->setAddChildrenIfNoneSet(['defaultkey']); - $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals(['defaultkey' => ['foo' => 'bar']], $node->getDefaultValue()); - - $node = $this->getPrototypeNodeWithDefaultChildren(); - $node->setKeyAttribute('foobar'); - $node->setAddChildrenIfNoneSet(['dk1', 'dk2']); - $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals(['dk1' => ['foo' => 'bar'], 'dk2' => ['foo' => 'bar']], $node->getDefaultValue()); - - $node = $this->getPrototypeNodeWithDefaultChildren(); - $node->setAddChildrenIfNoneSet([5, 6]); - $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals([0 => ['foo' => 'bar'], 1 => ['foo' => 'bar']], $node->getDefaultValue()); - - $node = $this->getPrototypeNodeWithDefaultChildren(); - $node->setAddChildrenIfNoneSet(2); - $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals([['foo' => 'bar'], ['foo' => 'bar']], $node->getDefaultValue()); - } - - public function testDefaultChildrenWinsOverDefaultValue() - { - $node = $this->getPrototypeNodeWithDefaultChildren(); - $node->setAddChildrenIfNoneSet(); - $node->setDefaultValue(['bar' => 'foo']); - $this->assertTrue($node->hasDefaultValue()); - $this->assertEquals([['foo' => 'bar']], $node->getDefaultValue()); - } - - protected function getPrototypeNodeWithDefaultChildren() - { - $node = new PrototypedArrayNode('root'); - $prototype = new ArrayNode(null, $node); - $child = new ScalarNode('foo'); - $child->setDefaultValue('bar'); - $prototype->addChild($child); - $prototype->setAddIfNotSet(true); - $node->setPrototype($prototype); - - return $node; - } - - /** - * Tests that when a key attribute is mapped, that key is removed from the array. - * And if only 'value' element is left in the array, it will replace its wrapper array. - * - * - * - * - * The above should finally be mapped to an array that looks like this - * (because "id" is the key attribute). - * - * [ - * 'things' => [ - * 'option1' => 'value1' - * ] - * ] - * - * It's also possible to mix 'value-only' and 'non-value-only' elements in the array. - * - * - * - * - * The above should finally be mapped to an array as follows - * - * [ - * 'things' => [ - * 'option1' => 'value1', - * 'option2' => [ - * 'value' => 'value2', - * 'foo' => 'foo2' - * ] - * ] - * ] - * - * The 'value' element can also be ArrayNode: - * - * - * - * - * - * The above should be finally be mapped to an array as follows - * - * [ - * 'things' => [ - * 'option1' => [ - * 'foo' => 'foo1', - * 'bar' => 'bar1' - * ] - * ] - * ] - * - * If using VariableNode for value node, it's also possible to mix different types of value nodes: - * - * - * - * - * - * The above should be finally mapped to an array as follows - * - * [ - * 'things' => [ - * 'option1' => [ - * 'foo' => 'foo1', - * 'bar' => 'bar1' - * ], - * 'option2' => 'value2' - * ] - * ] - * - * @dataProvider getDataForKeyRemovedLeftValueOnly - */ - public function testMappedAttributeKeyIsRemovedLeftValueOnly($value, $children, $expected) - { - $node = new PrototypedArrayNode('root'); - $node->setKeyAttribute('id', true); - - // each item under the root is an array, with one scalar item - $prototype = new ArrayNode(null, $node); - $prototype->addChild(new ScalarNode('id')); - $prototype->addChild(new ScalarNode('foo')); - $prototype->addChild($value); - $node->setPrototype($prototype); - - $normalized = $node->normalize($children); - $this->assertEquals($expected, $normalized); - } - - public function getDataForKeyRemovedLeftValueOnly() - { - $scalarValue = new ScalarNode('value'); - - $arrayValue = new ArrayNode('value'); - $arrayValue->addChild(new ScalarNode('foo')); - $arrayValue->addChild(new ScalarNode('bar')); - - $variableValue = new VariableNode('value'); - - return [ - [ - $scalarValue, - [ - ['id' => 'option1', 'value' => 'value1'], - ], - ['option1' => 'value1'], - ], - - [ - $scalarValue, - [ - ['id' => 'option1', 'value' => 'value1'], - ['id' => 'option2', 'value' => 'value2', 'foo' => 'foo2'], - ], - [ - 'option1' => 'value1', - 'option2' => ['value' => 'value2', 'foo' => 'foo2'], - ], - ], - - [ - $arrayValue, - [ - [ - 'id' => 'option1', - 'value' => ['foo' => 'foo1', 'bar' => 'bar1'], - ], - ], - [ - 'option1' => ['foo' => 'foo1', 'bar' => 'bar1'], - ], - ], - - [$variableValue, - [ - [ - 'id' => 'option1', 'value' => ['foo' => 'foo1', 'bar' => 'bar1'], - ], - ['id' => 'option2', 'value' => 'value2'], - ], - [ - 'option1' => ['foo' => 'foo1', 'bar' => 'bar1'], - 'option2' => 'value2', - ], - ], - ]; - } -} diff --git a/lib/symfony/config/Tests/Definition/ScalarNodeTest.php b/lib/symfony/config/Tests/Definition/ScalarNodeTest.php deleted file mode 100644 index 4413baf3c..000000000 --- a/lib/symfony/config/Tests/Definition/ScalarNodeTest.php +++ /dev/null @@ -1,161 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Definition; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Definition\ArrayNode; -use Symfony\Component\Config\Definition\ScalarNode; - -class ScalarNodeTest extends TestCase -{ - /** - * @dataProvider getValidValues - */ - public function testNormalize($value) - { - $node = new ScalarNode('test'); - $this->assertSame($value, $node->normalize($value)); - } - - public function getValidValues() - { - return [ - [false], - [true], - [null], - [''], - ['foo'], - [0], - [1], - [0.0], - [0.1], - ]; - } - - public function testSetDeprecated() - { - $childNode = new ScalarNode('foo'); - $childNode->setDeprecated('"%node%" is deprecated'); - - $this->assertTrue($childNode->isDeprecated()); - $this->assertSame('"foo" is deprecated', $childNode->getDeprecationMessage($childNode->getName(), $childNode->getPath())); - - $node = new ArrayNode('root'); - $node->addChild($childNode); - - $deprecationTriggered = 0; - $deprecationHandler = function ($level, $message, $file, $line) use (&$prevErrorHandler, &$deprecationTriggered) { - if (E_USER_DEPRECATED === $level) { - return ++$deprecationTriggered; - } - - return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false; - }; - - $prevErrorHandler = set_error_handler($deprecationHandler); - $node->finalize([]); - restore_error_handler(); - $this->assertSame(0, $deprecationTriggered, '->finalize() should not trigger if the deprecated node is not set'); - - $prevErrorHandler = set_error_handler($deprecationHandler); - $node->finalize(['foo' => '']); - restore_error_handler(); - $this->assertSame(1, $deprecationTriggered, '->finalize() should trigger if the deprecated node is set'); - } - - /** - * @dataProvider getInvalidValues - */ - public function testNormalizeThrowsExceptionOnInvalidValues($value) - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException'); - $node = new ScalarNode('test'); - $node->normalize($value); - } - - public function getInvalidValues() - { - return [ - [[]], - [['foo' => 'bar']], - [new \stdClass()], - ]; - } - - public function testNormalizeThrowsExceptionWithoutHint() - { - $node = new ScalarNode('test'); - - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException'); - $this->expectExceptionMessage('Invalid type for path "test". Expected scalar, but got array.'); - - $node->normalize([]); - } - - public function testNormalizeThrowsExceptionWithErrorMessage() - { - $node = new ScalarNode('test'); - $node->setInfo('"the test value"'); - - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException'); - $this->expectExceptionMessage("Invalid type for path \"test\". Expected scalar, but got array.\nHint: \"the test value\""); - - $node->normalize([]); - } - - /** - * @dataProvider getValidNonEmptyValues - * - * @param mixed $value - */ - public function testValidNonEmptyValues($value) - { - $node = new ScalarNode('test'); - $node->setAllowEmptyValue(false); - - $this->assertSame($value, $node->finalize($value)); - } - - public function getValidNonEmptyValues() - { - return [ - [false], - [true], - ['foo'], - [0], - [1], - [0.0], - [0.1], - ]; - } - - /** - * @dataProvider getEmptyValues - * - * @param mixed $value - */ - public function testNotAllowedEmptyValuesThrowException($value) - { - $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException'); - $node = new ScalarNode('test'); - $node->setAllowEmptyValue(false); - $node->finalize($value); - } - - public function getEmptyValues() - { - return [ - [null], - [''], - ]; - } -} diff --git a/lib/symfony/config/Tests/DependencyInjection/ConfigCachePassTest.php b/lib/symfony/config/Tests/DependencyInjection/ConfigCachePassTest.php deleted file mode 100644 index c2b95195d..000000000 --- a/lib/symfony/config/Tests/DependencyInjection/ConfigCachePassTest.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\DependencyInjection; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\DependencyInjection\ConfigCachePass; -use Symfony\Component\DependencyInjection\Argument\IteratorArgument; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Reference; - -/** - * @group legacy - */ -class ConfigCachePassTest extends TestCase -{ - public function testThatCheckersAreProcessedInPriorityOrder() - { - $container = new ContainerBuilder(); - - $definition = $container->register('config_cache_factory')->addArgument(null); - $container->register('checker_2')->addTag('config_cache.resource_checker', ['priority' => 100]); - $container->register('checker_1')->addTag('config_cache.resource_checker', ['priority' => 200]); - $container->register('checker_3')->addTag('config_cache.resource_checker'); - - $pass = new ConfigCachePass(); - $pass->process($container); - - $expected = new IteratorArgument([ - new Reference('checker_1'), - new Reference('checker_2'), - new Reference('checker_3'), - ]); - $this->assertEquals($expected, $definition->getArgument(0)); - } - - public function testThatCheckersCanBeMissing() - { - $container = new ContainerBuilder(); - - $definitionsBefore = \count($container->getDefinitions()); - $aliasesBefore = \count($container->getAliases()); - - $pass = new ConfigCachePass(); - $pass->process($container); - - // the container is untouched (i.e. no new definitions or aliases) - $this->assertCount($definitionsBefore, $container->getDefinitions()); - $this->assertCount($aliasesBefore, $container->getAliases()); - } -} diff --git a/lib/symfony/config/Tests/Exception/FileLoaderLoadExceptionTest.php b/lib/symfony/config/Tests/Exception/FileLoaderLoadExceptionTest.php deleted file mode 100644 index 8363084c1..000000000 --- a/lib/symfony/config/Tests/Exception/FileLoaderLoadExceptionTest.php +++ /dev/null @@ -1,98 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Exception; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Exception\FileLoaderLoadException; - -class FileLoaderLoadExceptionTest extends TestCase -{ - public function testMessageCannotLoadResource() - { - $exception = new FileLoaderLoadException('resource', null); - $this->assertEquals('Cannot load resource "resource".', $exception->getMessage()); - } - - public function testMessageCannotLoadResourceWithType() - { - $exception = new FileLoaderLoadException('resource', null, null, null, 'foobar'); - $this->assertEquals('Cannot load resource "resource". Make sure there is a loader supporting the "foobar" type.', $exception->getMessage()); - } - - public function testMessageCannotLoadResourceWithAnnotationType() - { - $exception = new FileLoaderLoadException('resource', null, null, null, 'annotation'); - $this->assertEquals('Cannot load resource "resource". Make sure annotations are installed and enabled.', $exception->getMessage()); - } - - public function testMessageCannotImportResourceFromSource() - { - $exception = new FileLoaderLoadException('resource', 'sourceResource'); - $this->assertEquals('Cannot import resource "resource" from "sourceResource".', $exception->getMessage()); - } - - public function testMessageCannotImportBundleResource() - { - $exception = new FileLoaderLoadException('@resource', 'sourceResource'); - $this->assertEquals( - 'Cannot import resource "@resource" from "sourceResource". '. - 'Make sure the "resource" bundle is correctly registered and loaded in the application kernel class. '. - 'If the bundle is registered, make sure the bundle path "@resource" is not empty.', - $exception->getMessage() - ); - } - - public function testMessageHasPreviousErrorWithDotAndUnableToLoad() - { - $exception = new FileLoaderLoadException( - 'resource', - null, - null, - new \Exception('There was a previous error with an ending dot.') - ); - $this->assertEquals( - 'There was a previous error with an ending dot in resource (which is loaded in resource "resource").', - $exception->getMessage() - ); - } - - public function testMessageHasPreviousErrorWithoutDotAndUnableToLoad() - { - $exception = new FileLoaderLoadException( - 'resource', - null, - null, - new \Exception('There was a previous error with no ending dot') - ); - $this->assertEquals( - 'There was a previous error with no ending dot in resource (which is loaded in resource "resource").', - $exception->getMessage() - ); - } - - public function testMessageHasPreviousErrorAndUnableToLoadBundle() - { - $exception = new FileLoaderLoadException( - '@resource', - null, - null, - new \Exception('There was a previous error with an ending dot.') - ); - $this->assertEquals( - 'There was a previous error with an ending dot in @resource '. - '(which is loaded in resource "@resource"). '. - 'Make sure the "resource" bundle is correctly registered and loaded in the application kernel class. '. - 'If the bundle is registered, make sure the bundle path "@resource" is not empty.', - $exception->getMessage() - ); - } -} diff --git a/lib/symfony/config/Tests/FileLocatorTest.php b/lib/symfony/config/Tests/FileLocatorTest.php deleted file mode 100644 index e931916af..000000000 --- a/lib/symfony/config/Tests/FileLocatorTest.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\FileLocator; - -class FileLocatorTest extends TestCase -{ - /** - * @dataProvider getIsAbsolutePathTests - */ - public function testIsAbsolutePath($path) - { - $loader = new FileLocator([]); - $r = new \ReflectionObject($loader); - $m = $r->getMethod('isAbsolutePath'); - $m->setAccessible(true); - - $this->assertTrue($m->invoke($loader, $path), '->isAbsolutePath() returns true for an absolute path'); - } - - public function getIsAbsolutePathTests() - { - return [ - ['/foo.xml'], - ['c:\\\\foo.xml'], - ['c:/foo.xml'], - ['\\server\\foo.xml'], - ['https://server/foo.xml'], - ['phar://server/foo.xml'], - ]; - } - - public function testLocate() - { - $loader = new FileLocator(__DIR__.'/Fixtures'); - - $this->assertEquals( - __DIR__.\DIRECTORY_SEPARATOR.'FileLocatorTest.php', - $loader->locate('FileLocatorTest.php', __DIR__), - '->locate() returns the absolute filename if the file exists in the given path' - ); - - $this->assertEquals( - __DIR__.'/Fixtures'.\DIRECTORY_SEPARATOR.'foo.xml', - $loader->locate('foo.xml', __DIR__), - '->locate() returns the absolute filename if the file exists in one of the paths given in the constructor' - ); - - $this->assertEquals( - __DIR__.'/Fixtures'.\DIRECTORY_SEPARATOR.'foo.xml', - $loader->locate(__DIR__.'/Fixtures'.\DIRECTORY_SEPARATOR.'foo.xml', __DIR__), - '->locate() returns the absolute filename if the file exists in one of the paths given in the constructor' - ); - - $loader = new FileLocator([__DIR__.'/Fixtures', __DIR__.'/Fixtures/Again']); - - $this->assertEquals( - [__DIR__.'/Fixtures'.\DIRECTORY_SEPARATOR.'foo.xml', __DIR__.'/Fixtures/Again'.\DIRECTORY_SEPARATOR.'foo.xml'], - $loader->locate('foo.xml', __DIR__, false), - '->locate() returns an array of absolute filenames' - ); - - $this->assertEquals( - [__DIR__.'/Fixtures'.\DIRECTORY_SEPARATOR.'foo.xml', __DIR__.'/Fixtures/Again'.\DIRECTORY_SEPARATOR.'foo.xml'], - $loader->locate('foo.xml', __DIR__.'/Fixtures', false), - '->locate() returns an array of absolute filenames' - ); - - $loader = new FileLocator(__DIR__.'/Fixtures/Again'); - - $this->assertEquals( - [__DIR__.'/Fixtures'.\DIRECTORY_SEPARATOR.'foo.xml', __DIR__.'/Fixtures/Again'.\DIRECTORY_SEPARATOR.'foo.xml'], - $loader->locate('foo.xml', __DIR__.'/Fixtures', false), - '->locate() returns an array of absolute filenames' - ); - } - - public function testLocateThrowsAnExceptionIfTheFileDoesNotExists() - { - $this->expectException('Symfony\Component\Config\Exception\FileLocatorFileNotFoundException'); - $this->expectExceptionMessage('The file "foobar.xml" does not exist'); - $loader = new FileLocator([__DIR__.'/Fixtures']); - - $loader->locate('foobar.xml', __DIR__); - } - - public function testLocateThrowsAnExceptionIfTheFileDoesNotExistsInAbsolutePath() - { - $this->expectException('Symfony\Component\Config\Exception\FileLocatorFileNotFoundException'); - $loader = new FileLocator([__DIR__.'/Fixtures']); - - $loader->locate(__DIR__.'/Fixtures/foobar.xml', __DIR__); - } - - public function testLocateEmpty() - { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage('An empty file name is not valid to be located.'); - $loader = new FileLocator([__DIR__.'/Fixtures']); - - $loader->locate(null, __DIR__); - } -} diff --git a/lib/symfony/config/Tests/Fixtures/Again/foo.xml b/lib/symfony/config/Tests/Fixtures/Again/foo.xml deleted file mode 100644 index e69de29bb..000000000 diff --git a/lib/symfony/config/Tests/Fixtures/BadParent.php b/lib/symfony/config/Tests/Fixtures/BadParent.php deleted file mode 100644 index 68d7296ed..000000000 --- a/lib/symfony/config/Tests/Fixtures/BadParent.php +++ /dev/null @@ -1,7 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Fixtures; - -use Symfony\Component\Config\Definition\ArrayNode; - -class BarNode extends ArrayNode -{ -} diff --git a/lib/symfony/config/Tests/Fixtures/Builder/BarNodeDefinition.php b/lib/symfony/config/Tests/Fixtures/Builder/BarNodeDefinition.php deleted file mode 100644 index b9c62e537..000000000 --- a/lib/symfony/config/Tests/Fixtures/Builder/BarNodeDefinition.php +++ /dev/null @@ -1,23 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Fixtures\Builder; - -use Symfony\Component\Config\Definition\Builder\NodeDefinition; -use Symfony\Component\Config\Tests\Fixtures\BarNode; - -class BarNodeDefinition extends NodeDefinition -{ - protected function createNode() - { - return new BarNode($this->name); - } -} diff --git a/lib/symfony/config/Tests/Fixtures/Builder/NodeBuilder.php b/lib/symfony/config/Tests/Fixtures/Builder/NodeBuilder.php deleted file mode 100644 index 22b8b32fb..000000000 --- a/lib/symfony/config/Tests/Fixtures/Builder/NodeBuilder.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Fixtures\Builder; - -use Symfony\Component\Config\Definition\Builder\NodeBuilder as BaseNodeBuilder; - -class NodeBuilder extends BaseNodeBuilder -{ - public function barNode($name) - { - return $this->node($name, 'bar'); - } - - protected function getNodeClass($type) - { - switch ($type) { - case 'variable': - return __NAMESPACE__.'\\'.ucfirst($type).'NodeDefinition'; - case 'bar': - return __NAMESPACE__.'\\'.ucfirst($type).'NodeDefinition'; - default: - return parent::getNodeClass($type); - } - } -} diff --git a/lib/symfony/config/Tests/Fixtures/Builder/VariableNodeDefinition.php b/lib/symfony/config/Tests/Fixtures/Builder/VariableNodeDefinition.php deleted file mode 100644 index 6126ed434..000000000 --- a/lib/symfony/config/Tests/Fixtures/Builder/VariableNodeDefinition.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Fixtures\Builder; - -use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVariableNodeDefinition; - -class VariableNodeDefinition extends BaseVariableNodeDefinition -{ -} diff --git a/lib/symfony/config/Tests/Fixtures/Configuration/ExampleConfiguration.php b/lib/symfony/config/Tests/Fixtures/Configuration/ExampleConfiguration.php deleted file mode 100644 index 3f02700a1..000000000 --- a/lib/symfony/config/Tests/Fixtures/Configuration/ExampleConfiguration.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Fixtures\Configuration; - -use Symfony\Component\Config\Definition\Builder\TreeBuilder; -use Symfony\Component\Config\Definition\ConfigurationInterface; - -class ExampleConfiguration implements ConfigurationInterface -{ - public function getConfigTreeBuilder() - { - $treeBuilder = new TreeBuilder(); - $rootNode = $treeBuilder->root('acme_root'); - - $rootNode - ->fixXmlConfig('parameter') - ->fixXmlConfig('connection') - ->fixXmlConfig('cms_page') - ->children() - ->booleanNode('boolean')->defaultTrue()->end() - ->scalarNode('scalar_empty')->end() - ->scalarNode('scalar_null')->defaultNull()->end() - ->scalarNode('scalar_true')->defaultTrue()->end() - ->scalarNode('scalar_false')->defaultFalse()->end() - ->scalarNode('scalar_default')->defaultValue('default')->end() - ->scalarNode('scalar_array_empty')->defaultValue([])->end() - ->scalarNode('scalar_array_defaults')->defaultValue(['elem1', 'elem2'])->end() - ->scalarNode('scalar_required')->isRequired()->end() - ->scalarNode('scalar_deprecated')->setDeprecated()->end() - ->scalarNode('scalar_deprecated_with_message')->setDeprecated('Deprecation custom message for "%node%" at "%path%"')->end() - ->scalarNode('node_with_a_looong_name')->end() - ->enumNode('enum_with_default')->values(['this', 'that'])->defaultValue('this')->end() - ->enumNode('enum')->values(['this', 'that'])->end() - ->arrayNode('array') - ->info('some info') - ->canBeUnset() - ->children() - ->scalarNode('child1')->end() - ->scalarNode('child2')->end() - ->scalarNode('child3') - ->info( - "this is a long\n". - "multi-line info text\n". - 'which should be indented' - ) - ->example('example setting') - ->end() - ->end() - ->end() - ->arrayNode('scalar_prototyped') - ->prototype('scalar')->end() - ->end() - ->arrayNode('parameters') - ->useAttributeAsKey('name') - ->prototype('scalar')->info('Parameter name')->end() - ->end() - ->arrayNode('connections') - ->prototype('array') - ->children() - ->scalarNode('user')->end() - ->scalarNode('pass')->end() - ->end() - ->end() - ->end() - ->arrayNode('cms_pages') - ->useAttributeAsKey('page') - ->prototype('array') - ->useAttributeAsKey('locale') - ->prototype('array') - ->children() - ->scalarNode('title')->isRequired()->end() - ->scalarNode('path')->isRequired()->end() - ->end() - ->end() - ->end() - ->end() - ->arrayNode('pipou') - ->useAttributeAsKey('name') - ->prototype('array') - ->prototype('array') - ->children() - ->scalarNode('didou') - ->end() - ->end() - ->end() - ->end() - ->end() - ->end() - ; - - return $treeBuilder; - } -} diff --git a/lib/symfony/config/Tests/Fixtures/Resource/.hiddenFile b/lib/symfony/config/Tests/Fixtures/Resource/.hiddenFile deleted file mode 100644 index e69de29bb..000000000 diff --git a/lib/symfony/config/Tests/Fixtures/Resource/ConditionalClass.php b/lib/symfony/config/Tests/Fixtures/Resource/ConditionalClass.php deleted file mode 100644 index 2ba48c5b0..000000000 --- a/lib/symfony/config/Tests/Fixtures/Resource/ConditionalClass.php +++ /dev/null @@ -1,9 +0,0 @@ - -]> - diff --git a/lib/symfony/config/Tests/Fixtures/Util/invalid.xml b/lib/symfony/config/Tests/Fixtures/Util/invalid.xml deleted file mode 100644 index a07af9fd8..000000000 --- a/lib/symfony/config/Tests/Fixtures/Util/invalid.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/lib/symfony/config/Tests/Fixtures/Util/invalid_schema.xml b/lib/symfony/config/Tests/Fixtures/Util/invalid_schema.xml deleted file mode 100644 index e2725a2c2..000000000 --- a/lib/symfony/config/Tests/Fixtures/Util/invalid_schema.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/lib/symfony/config/Tests/Fixtures/Util/schema.xsd b/lib/symfony/config/Tests/Fixtures/Util/schema.xsd deleted file mode 100644 index e56820f69..000000000 --- a/lib/symfony/config/Tests/Fixtures/Util/schema.xsd +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/lib/symfony/config/Tests/Fixtures/Util/valid.xml b/lib/symfony/config/Tests/Fixtures/Util/valid.xml deleted file mode 100644 index a96bb3826..000000000 --- a/lib/symfony/config/Tests/Fixtures/Util/valid.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/lib/symfony/config/Tests/Fixtures/foo.xml b/lib/symfony/config/Tests/Fixtures/foo.xml deleted file mode 100644 index e69de29bb..000000000 diff --git a/lib/symfony/config/Tests/Loader/DelegatingLoaderTest.php b/lib/symfony/config/Tests/Loader/DelegatingLoaderTest.php deleted file mode 100644 index 38ae6ff7b..000000000 --- a/lib/symfony/config/Tests/Loader/DelegatingLoaderTest.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Loader; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Loader\DelegatingLoader; -use Symfony\Component\Config\Loader\LoaderResolver; - -class DelegatingLoaderTest extends TestCase -{ - public function testConstructor() - { - new DelegatingLoader($resolver = new LoaderResolver()); - $this->assertTrue(true, '__construct() takes a loader resolver as its first argument'); - } - - public function testGetSetResolver() - { - $resolver = new LoaderResolver(); - $loader = new DelegatingLoader($resolver); - $this->assertSame($resolver, $loader->getResolver(), '->getResolver() gets the resolver loader'); - $loader->setResolver($resolver = new LoaderResolver()); - $this->assertSame($resolver, $loader->getResolver(), '->setResolver() sets the resolver loader'); - } - - public function testSupports() - { - $loader1 = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); - $loader1->expects($this->once())->method('supports')->willReturn(true); - $loader = new DelegatingLoader(new LoaderResolver([$loader1])); - $this->assertTrue($loader->supports('foo.xml'), '->supports() returns true if the resource is loadable'); - - $loader1 = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); - $loader1->expects($this->once())->method('supports')->willReturn(false); - $loader = new DelegatingLoader(new LoaderResolver([$loader1])); - $this->assertFalse($loader->supports('foo.foo'), '->supports() returns false if the resource is not loadable'); - } - - public function testLoad() - { - $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); - $loader->expects($this->once())->method('supports')->willReturn(true); - $loader->expects($this->once())->method('load'); - $resolver = new LoaderResolver([$loader]); - $loader = new DelegatingLoader($resolver); - - $loader->load('foo'); - } - - public function testLoadThrowsAnExceptionIfTheResourceCannotBeLoaded() - { - $this->expectException('Symfony\Component\Config\Exception\FileLoaderLoadException'); - $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); - $loader->expects($this->once())->method('supports')->willReturn(false); - $resolver = new LoaderResolver([$loader]); - $loader = new DelegatingLoader($resolver); - - $loader->load('foo'); - } -} diff --git a/lib/symfony/config/Tests/Loader/FileLoaderTest.php b/lib/symfony/config/Tests/Loader/FileLoaderTest.php deleted file mode 100644 index b59ace46f..000000000 --- a/lib/symfony/config/Tests/Loader/FileLoaderTest.php +++ /dev/null @@ -1,128 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Loader; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\FileLocator; -use Symfony\Component\Config\Loader\FileLoader; -use Symfony\Component\Config\Loader\LoaderResolver; - -class FileLoaderTest extends TestCase -{ - public function testImportWithFileLocatorDelegation() - { - $locatorMock = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); - - $locatorMockForAdditionalLoader = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); - $locatorMockForAdditionalLoader->expects($this->any())->method('locate')->will($this->onConsecutiveCalls( - ['path/to/file1'], // Default - ['path/to/file1', 'path/to/file2'], // First is imported - ['path/to/file1', 'path/to/file2'], // Second is imported - ['path/to/file1'], // Exception - ['path/to/file1', 'path/to/file2'] // Exception - )); - - $fileLoader = new TestFileLoader($locatorMock); - $fileLoader->setSupports(false); - $fileLoader->setCurrentDir('.'); - - $additionalLoader = new TestFileLoader($locatorMockForAdditionalLoader); - $additionalLoader->setCurrentDir('.'); - - $fileLoader->setResolver($loaderResolver = new LoaderResolver([$fileLoader, $additionalLoader])); - - // Default case - $this->assertSame('path/to/file1', $fileLoader->import('my_resource')); - - // Check first file is imported if not already loading - $this->assertSame('path/to/file1', $fileLoader->import('my_resource')); - - // Check second file is imported if first is already loading - $fileLoader->addLoading('path/to/file1'); - $this->assertSame('path/to/file2', $fileLoader->import('my_resource')); - - // Check exception throws if first (and only available) file is already loading - try { - $fileLoader->import('my_resource'); - $this->fail('->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading'); - } catch (\Exception $e) { - $this->assertInstanceOf('Symfony\Component\Config\Exception\FileLoaderImportCircularReferenceException', $e, '->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading'); - } - - // Check exception throws if all files are already loading - try { - $fileLoader->addLoading('path/to/file2'); - $fileLoader->import('my_resource'); - $this->fail('->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading'); - } catch (\Exception $e) { - $this->assertInstanceOf('Symfony\Component\Config\Exception\FileLoaderImportCircularReferenceException', $e, '->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading'); - } - } - - public function testImportWithGlobLikeResource() - { - $locatorMock = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); - $loader = new TestFileLoader($locatorMock); - - $this->assertSame('[foo]', $loader->import('[foo]')); - } - - public function testImportWithNoGlobMatch() - { - $locatorMock = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock(); - $loader = new TestFileLoader($locatorMock); - - $this->assertNull($loader->import('./*.abc')); - } - - public function testImportWithSimpleGlob() - { - $loader = new TestFileLoader(new FileLocator(__DIR__)); - - $this->assertSame(__FILE__, strtr($loader->import('FileLoaderTest.*'), '/', \DIRECTORY_SEPARATOR)); - } -} - -class TestFileLoader extends FileLoader -{ - private $supports = true; - - public function load($resource, $type = null) - { - return $resource; - } - - public function supports($resource, $type = null) - { - return $this->supports; - } - - public function addLoading($resource) - { - self::$loading[$resource] = true; - } - - public function removeLoading($resource) - { - unset(self::$loading[$resource]); - } - - public function clearLoading() - { - self::$loading = []; - } - - public function setSupports($supports) - { - $this->supports = $supports; - } -} diff --git a/lib/symfony/config/Tests/Loader/LoaderResolverTest.php b/lib/symfony/config/Tests/Loader/LoaderResolverTest.php deleted file mode 100644 index aabc2a600..000000000 --- a/lib/symfony/config/Tests/Loader/LoaderResolverTest.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Loader; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Loader\LoaderResolver; - -class LoaderResolverTest extends TestCase -{ - public function testConstructor() - { - $resolver = new LoaderResolver([ - $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(), - ]); - - $this->assertEquals([$loader], $resolver->getLoaders(), '__construct() takes an array of loaders as its first argument'); - } - - public function testResolve() - { - $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); - $resolver = new LoaderResolver([$loader]); - $this->assertFalse($resolver->resolve('foo.foo'), '->resolve() returns false if no loader is able to load the resource'); - - $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); - $loader->expects($this->once())->method('supports')->willReturn(true); - $resolver = new LoaderResolver([$loader]); - $this->assertEquals($loader, $resolver->resolve(function () {}), '->resolve() returns the loader for the given resource'); - } - - public function testLoaders() - { - $resolver = new LoaderResolver(); - $resolver->addLoader($loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock()); - - $this->assertEquals([$loader], $resolver->getLoaders(), 'addLoader() adds a loader'); - } -} diff --git a/lib/symfony/config/Tests/Loader/LoaderTest.php b/lib/symfony/config/Tests/Loader/LoaderTest.php deleted file mode 100644 index 35a911ef3..000000000 --- a/lib/symfony/config/Tests/Loader/LoaderTest.php +++ /dev/null @@ -1,116 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Loader; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Loader\Loader; - -class LoaderTest extends TestCase -{ - public function testGetSetResolver() - { - $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock(); - - $loader = new ProjectLoader1(); - $loader->setResolver($resolver); - - $this->assertSame($resolver, $loader->getResolver(), '->setResolver() sets the resolver loader'); - } - - public function testResolve() - { - $resolvedLoader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); - - $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock(); - $resolver->expects($this->once()) - ->method('resolve') - ->with('foo.xml') - ->willReturn($resolvedLoader); - - $loader = new ProjectLoader1(); - $loader->setResolver($resolver); - - $this->assertSame($loader, $loader->resolve('foo.foo'), '->resolve() finds a loader'); - $this->assertSame($resolvedLoader, $loader->resolve('foo.xml'), '->resolve() finds a loader'); - } - - public function testResolveWhenResolverCannotFindLoader() - { - $this->expectException('Symfony\Component\Config\Exception\FileLoaderLoadException'); - $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock(); - $resolver->expects($this->once()) - ->method('resolve') - ->with('FOOBAR') - ->willReturn(false); - - $loader = new ProjectLoader1(); - $loader->setResolver($resolver); - - $loader->resolve('FOOBAR'); - } - - public function testImport() - { - $resolvedLoader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); - $resolvedLoader->expects($this->once()) - ->method('load') - ->with('foo') - ->willReturn('yes'); - - $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock(); - $resolver->expects($this->once()) - ->method('resolve') - ->with('foo') - ->willReturn($resolvedLoader); - - $loader = new ProjectLoader1(); - $loader->setResolver($resolver); - - $this->assertEquals('yes', $loader->import('foo')); - } - - public function testImportWithType() - { - $resolvedLoader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock(); - $resolvedLoader->expects($this->once()) - ->method('load') - ->with('foo', 'bar') - ->willReturn('yes'); - - $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock(); - $resolver->expects($this->once()) - ->method('resolve') - ->with('foo', 'bar') - ->willReturn($resolvedLoader); - - $loader = new ProjectLoader1(); - $loader->setResolver($resolver); - - $this->assertEquals('yes', $loader->import('foo', 'bar')); - } -} - -class ProjectLoader1 extends Loader -{ - public function load($resource, $type = null) - { - } - - public function supports($resource, $type = null) - { - return \is_string($resource) && 'foo' === pathinfo($resource, PATHINFO_EXTENSION); - } - - public function getType() - { - } -} diff --git a/lib/symfony/config/Tests/Resource/ClassExistenceResourceTest.php b/lib/symfony/config/Tests/Resource/ClassExistenceResourceTest.php deleted file mode 100644 index b7ae81eaa..000000000 --- a/lib/symfony/config/Tests/Resource/ClassExistenceResourceTest.php +++ /dev/null @@ -1,99 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Resource; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Resource\ClassExistenceResource; -use Symfony\Component\Config\Tests\Fixtures\BadParent; -use Symfony\Component\Config\Tests\Fixtures\Resource\ConditionalClass; - -class ClassExistenceResourceTest extends TestCase -{ - public function testToString() - { - $res = new ClassExistenceResource('BarClass'); - $this->assertSame('BarClass', (string) $res); - } - - public function testGetResource() - { - $res = new ClassExistenceResource('BarClass'); - $this->assertSame('BarClass', $res->getResource()); - } - - public function testIsFreshWhenClassDoesNotExist() - { - $res = new ClassExistenceResource('Symfony\Component\Config\Tests\Fixtures\BarClass'); - - $this->assertTrue($res->isFresh(time())); - - eval(<<assertFalse($res->isFresh(time())); - } - - public function testIsFreshWhenClassExists() - { - $res = new ClassExistenceResource('Symfony\Component\Config\Tests\Resource\ClassExistenceResourceTest'); - - $this->assertTrue($res->isFresh(time())); - } - - public function testExistsKo() - { - spl_autoload_register($autoloader = function ($class) use (&$loadedClass) { $loadedClass = $class; }); - - try { - $res = new ClassExistenceResource('MissingFooClass'); - $this->assertTrue($res->isFresh(0)); - - $this->assertSame('MissingFooClass', $loadedClass); - - $loadedClass = 123; - - new ClassExistenceResource('MissingFooClass', false); - - $this->assertSame(123, $loadedClass); - } finally { - spl_autoload_unregister($autoloader); - } - } - - public function testBadParentWithTimestamp() - { - $res = new ClassExistenceResource(BadParent::class, false); - $this->assertTrue($res->isFresh(time())); - } - - public function testBadParentWithNoTimestamp() - { - $this->expectException('ReflectionException'); - $this->expectExceptionMessage('Class "Symfony\Component\Config\Tests\Fixtures\MissingParent" not found while loading "Symfony\Component\Config\Tests\Fixtures\BadParent".'); - - $res = new ClassExistenceResource(BadParent::class, false); - $res->isFresh(0); - } - - public function testConditionalClass() - { - $res = new ClassExistenceResource(ConditionalClass::class, false); - - $this->assertFalse($res->isFresh(0)); - } -} diff --git a/lib/symfony/config/Tests/Resource/ComposerResourceTest.php b/lib/symfony/config/Tests/Resource/ComposerResourceTest.php deleted file mode 100644 index 6857c766d..000000000 --- a/lib/symfony/config/Tests/Resource/ComposerResourceTest.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Resource; - -use Composer\Autoload\ClassLoader; -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Resource\ComposerResource; - -class ComposerResourceTest extends TestCase -{ - public function testGetVendor() - { - $res = new ComposerResource(); - - $r = new \ReflectionClass(ClassLoader::class); - $found = false; - - foreach ($res->getVendors() as $vendor) { - if ($vendor && 0 === strpos($r->getFileName(), $vendor)) { - $found = true; - break; - } - } - - $this->assertTrue($found); - } - - public function testSerializeUnserialize() - { - $res = new ComposerResource(); - $ser = unserialize(serialize($res)); - - $this->assertTrue($res->isFresh(0)); - $this->assertTrue($ser->isFresh(0)); - - $this->assertEquals($res, $ser); - } -} diff --git a/lib/symfony/config/Tests/Resource/DirectoryResourceTest.php b/lib/symfony/config/Tests/Resource/DirectoryResourceTest.php deleted file mode 100644 index 40b179010..000000000 --- a/lib/symfony/config/Tests/Resource/DirectoryResourceTest.php +++ /dev/null @@ -1,181 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Resource; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Resource\DirectoryResource; - -class DirectoryResourceTest extends TestCase -{ - protected $directory; - - protected function setUp() - { - $this->directory = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'symfonyDirectoryIterator'; - if (!file_exists($this->directory)) { - mkdir($this->directory); - } - touch($this->directory.'/tmp.xml'); - } - - protected function tearDown() - { - if (!is_dir($this->directory)) { - return; - } - $this->removeDirectory($this->directory); - } - - protected function removeDirectory($directory) - { - $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($directory), \RecursiveIteratorIterator::CHILD_FIRST); - foreach ($iterator as $path) { - if (preg_match('#[/\\\\]\.\.?$#', $path->__toString())) { - continue; - } - if ($path->isDir()) { - rmdir($path->__toString()); - } else { - unlink($path->__toString()); - } - } - rmdir($directory); - } - - public function testGetResource() - { - $resource = new DirectoryResource($this->directory); - $this->assertSame(realpath($this->directory), $resource->getResource(), '->getResource() returns the path to the resource'); - } - - public function testGetPattern() - { - $resource = new DirectoryResource($this->directory, 'bar'); - $this->assertEquals('bar', $resource->getPattern()); - } - - public function testResourceDoesNotExist() - { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessageRegExp('/The directory ".*" does not exist./'); - new DirectoryResource('/____foo/foobar'.mt_rand(1, 999999)); - } - - public function testIsFresh() - { - $resource = new DirectoryResource($this->directory); - $this->assertTrue($resource->isFresh(time() + 10), '->isFresh() returns true if the resource has not changed'); - $this->assertFalse($resource->isFresh(time() - 86400), '->isFresh() returns false if the resource has been updated'); - } - - public function testIsFreshForDeletedResources() - { - $resource = new DirectoryResource($this->directory); - $this->removeDirectory($this->directory); - - $this->assertFalse($resource->isFresh(time()), '->isFresh() returns false if the resource does not exist'); - } - - public function testIsFreshUpdateFile() - { - $resource = new DirectoryResource($this->directory); - touch($this->directory.'/tmp.xml', time() + 20); - $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if an existing file is modified'); - } - - public function testIsFreshNewFile() - { - $resource = new DirectoryResource($this->directory); - touch($this->directory.'/new.xml', time() + 20); - $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if a new file is added'); - } - - public function testIsFreshNewFileWithDifferentPattern() - { - $resource = new DirectoryResource($this->directory, '/.xml$/'); - touch($this->directory.'/new.yaml', time() + 20); - $this->assertTrue($resource->isFresh(time() + 10), '->isFresh() returns true if a new file with a non-matching pattern is added'); - } - - public function testIsFreshDeleteFile() - { - $resource = new DirectoryResource($this->directory); - $time = time(); - sleep(1); - unlink($this->directory.'/tmp.xml'); - $this->assertFalse($resource->isFresh($time), '->isFresh() returns false if an existing file is removed'); - } - - public function testIsFreshDeleteDirectory() - { - $resource = new DirectoryResource($this->directory); - $this->removeDirectory($this->directory); - $this->assertFalse($resource->isFresh(time()), '->isFresh() returns false if the whole resource is removed'); - } - - public function testIsFreshCreateFileInSubdirectory() - { - $subdirectory = $this->directory.'/subdirectory'; - mkdir($subdirectory); - - $resource = new DirectoryResource($this->directory); - $this->assertTrue($resource->isFresh(time() + 10), '->isFresh() returns true if an unmodified subdirectory exists'); - - touch($subdirectory.'/newfile.xml', time() + 20); - $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if a new file in a subdirectory is added'); - } - - public function testIsFreshModifySubdirectory() - { - $resource = new DirectoryResource($this->directory); - - $subdirectory = $this->directory.'/subdirectory'; - mkdir($subdirectory); - touch($subdirectory, time() + 20); - - $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if a subdirectory is modified (e.g. a file gets deleted)'); - } - - public function testFilterRegexListNoMatch() - { - $resource = new DirectoryResource($this->directory, '/\.(foo|xml)$/'); - - touch($this->directory.'/new.bar', time() + 20); - $this->assertTrue($resource->isFresh(time() + 10), '->isFresh() returns true if a new file not matching the filter regex is created'); - } - - public function testFilterRegexListMatch() - { - $resource = new DirectoryResource($this->directory, '/\.(foo|xml)$/'); - - touch($this->directory.'/new.xml', time() + 20); - $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if an new file matching the filter regex is created '); - } - - public function testSerializeUnserialize() - { - $resource = new DirectoryResource($this->directory, '/\.(foo|xml)$/'); - - unserialize(serialize($resource)); - - $this->assertSame(realpath($this->directory), $resource->getResource()); - $this->assertSame('/\.(foo|xml)$/', $resource->getPattern()); - } - - public function testResourcesWithDifferentPatternsAreDifferent() - { - $resourceA = new DirectoryResource($this->directory, '/.xml$/'); - $resourceB = new DirectoryResource($this->directory, '/.yaml$/'); - - $this->assertCount(2, array_unique([$resourceA, $resourceB])); - } -} diff --git a/lib/symfony/config/Tests/Resource/FileExistenceResourceTest.php b/lib/symfony/config/Tests/Resource/FileExistenceResourceTest.php deleted file mode 100644 index 433f65e82..000000000 --- a/lib/symfony/config/Tests/Resource/FileExistenceResourceTest.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Resource; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Resource\FileExistenceResource; - -class FileExistenceResourceTest extends TestCase -{ - protected $resource; - protected $file; - protected $time; - - protected function setUp() - { - $this->file = realpath(sys_get_temp_dir()).'/tmp.xml'; - $this->time = time(); - $this->resource = new FileExistenceResource($this->file); - } - - protected function tearDown() - { - if (file_exists($this->file)) { - unlink($this->file); - } - } - - public function testToString() - { - $this->assertSame($this->file, (string) $this->resource); - } - - public function testGetResource() - { - $this->assertSame($this->file, $this->resource->getResource(), '->getResource() returns the path to the resource'); - } - - public function testIsFreshWithExistingResource() - { - touch($this->file, $this->time); - $serialized = serialize(new FileExistenceResource($this->file)); - - $resource = unserialize($serialized); - $this->assertTrue($resource->isFresh($this->time), '->isFresh() returns true if the resource is still present'); - - unlink($this->file); - $resource = unserialize($serialized); - $this->assertFalse($resource->isFresh($this->time), '->isFresh() returns false if the resource has been deleted'); - } - - public function testIsFreshWithAbsentResource() - { - $serialized = serialize(new FileExistenceResource($this->file)); - - $resource = unserialize($serialized); - $this->assertTrue($resource->isFresh($this->time), '->isFresh() returns true if the resource is still absent'); - - touch($this->file, $this->time); - $resource = unserialize($serialized); - $this->assertFalse($resource->isFresh($this->time), '->isFresh() returns false if the resource has been created'); - } -} diff --git a/lib/symfony/config/Tests/Resource/FileResourceTest.php b/lib/symfony/config/Tests/Resource/FileResourceTest.php deleted file mode 100644 index 968c7e926..000000000 --- a/lib/symfony/config/Tests/Resource/FileResourceTest.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Resource; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Resource\FileResource; - -class FileResourceTest extends TestCase -{ - protected $resource; - protected $file; - protected $time; - - protected function setUp() - { - $this->file = sys_get_temp_dir().'/tmp.xml'; - $this->time = time(); - touch($this->file, $this->time); - $this->resource = new FileResource($this->file); - } - - protected function tearDown() - { - if (!file_exists($this->file)) { - return; - } - - unlink($this->file); - } - - public function testGetResource() - { - $this->assertSame(realpath($this->file), $this->resource->getResource(), '->getResource() returns the path to the resource'); - } - - public function testGetResourceWithScheme() - { - $resource = new FileResource('file://'.$this->file); - $this->assertSame('file://'.$this->file, $resource->getResource(), '->getResource() returns the path to the schemed resource'); - } - - public function testToString() - { - $this->assertSame(realpath($this->file), (string) $this->resource); - } - - public function testResourceDoesNotExist() - { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessageRegExp('/The file ".*" does not exist./'); - new FileResource('/____foo/foobar'.mt_rand(1, 999999)); - } - - public function testIsFresh() - { - $this->assertTrue($this->resource->isFresh($this->time), '->isFresh() returns true if the resource has not changed in same second'); - $this->assertTrue($this->resource->isFresh($this->time + 10), '->isFresh() returns true if the resource has not changed'); - $this->assertFalse($this->resource->isFresh($this->time - 86400), '->isFresh() returns false if the resource has been updated'); - } - - public function testIsFreshForDeletedResources() - { - unlink($this->file); - - $this->assertFalse($this->resource->isFresh($this->time), '->isFresh() returns false if the resource does not exist'); - } - - public function testSerializeUnserialize() - { - unserialize(serialize($this->resource)); - - $this->assertSame(realpath($this->file), $this->resource->getResource()); - } -} diff --git a/lib/symfony/config/Tests/Resource/GlobResourceTest.php b/lib/symfony/config/Tests/Resource/GlobResourceTest.php deleted file mode 100644 index cfbfd2b45..000000000 --- a/lib/symfony/config/Tests/Resource/GlobResourceTest.php +++ /dev/null @@ -1,114 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Resource; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Resource\GlobResource; - -class GlobResourceTest extends TestCase -{ - protected function tearDown() - { - $dir = \dirname(__DIR__).'/Fixtures'; - @rmdir($dir.'/TmpGlob'); - @unlink($dir.'/TmpGlob'); - @unlink($dir.'/Resource/TmpGlob'); - touch($dir.'/Resource/.hiddenFile'); - } - - public function testIterator() - { - $dir = \dirname(__DIR__).\DIRECTORY_SEPARATOR.'Fixtures'; - $resource = new GlobResource($dir, '/Resource', true); - - $paths = iterator_to_array($resource); - - $file = $dir.'/Resource'.\DIRECTORY_SEPARATOR.'ConditionalClass.php'; - $this->assertEquals([$file => new \SplFileInfo($file)], $paths); - $this->assertInstanceOf('SplFileInfo', current($paths)); - $this->assertSame($dir, $resource->getPrefix()); - - $resource = new GlobResource($dir, '/**/Resource', true); - - $paths = iterator_to_array($resource); - - $file = $dir.\DIRECTORY_SEPARATOR.'Resource'.\DIRECTORY_SEPARATOR.'ConditionalClass.php'; - $this->assertEquals([$file => $file], $paths); - $this->assertInstanceOf('SplFileInfo', current($paths)); - $this->assertSame($dir, $resource->getPrefix()); - } - - public function testIsFreshNonRecursiveDetectsNewFile() - { - $dir = \dirname(__DIR__).'/Fixtures'; - $resource = new GlobResource($dir, '/*', false); - - $this->assertTrue($resource->isFresh(0)); - - mkdir($dir.'/TmpGlob'); - $this->assertTrue($resource->isFresh(0)); - - rmdir($dir.'/TmpGlob'); - $this->assertTrue($resource->isFresh(0)); - - touch($dir.'/TmpGlob'); - $this->assertFalse($resource->isFresh(0)); - - unlink($dir.'/TmpGlob'); - $this->assertTrue($resource->isFresh(0)); - } - - public function testIsFreshNonRecursiveDetectsRemovedFile() - { - $dir = \dirname(__DIR__).'/Fixtures'; - $resource = new GlobResource($dir, '/*', false); - - touch($dir.'/TmpGlob'); - touch($dir.'/.TmpGlob'); - $this->assertTrue($resource->isFresh(0)); - - unlink($dir.'/.TmpGlob'); - $this->assertTrue($resource->isFresh(0)); - - unlink($dir.'/TmpGlob'); - $this->assertFalse($resource->isFresh(0)); - } - - public function testIsFreshRecursiveDetectsRemovedFile() - { - $dir = \dirname(__DIR__).'/Fixtures'; - $resource = new GlobResource($dir, '/*', true); - - touch($dir.'/Resource/TmpGlob'); - $this->assertTrue($resource->isFresh(0)); - - unlink($dir.'/Resource/TmpGlob'); - $this->assertFalse($resource->isFresh(0)); - - touch($dir.'/Resource/TmpGlob'); - $this->assertTrue($resource->isFresh(0)); - - unlink($dir.'/Resource/.hiddenFile'); - $this->assertTrue($resource->isFresh(0)); - } - - public function testIsFreshRecursiveDetectsNewFile() - { - $dir = \dirname(__DIR__).'/Fixtures'; - $resource = new GlobResource($dir, '/*', true); - - $this->assertTrue($resource->isFresh(0)); - - touch($dir.'/Resource/TmpGlob'); - $this->assertFalse($resource->isFresh(0)); - } -} diff --git a/lib/symfony/config/Tests/Resource/ReflectionClassResourceTest.php b/lib/symfony/config/Tests/Resource/ReflectionClassResourceTest.php deleted file mode 100644 index 74ed6b3ed..000000000 --- a/lib/symfony/config/Tests/Resource/ReflectionClassResourceTest.php +++ /dev/null @@ -1,223 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Resource; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Resource\ReflectionClassResource; -use Symfony\Component\DependencyInjection\ServiceSubscriberInterface; -use Symfony\Component\EventDispatcher\EventSubscriberInterface; - -class ReflectionClassResourceTest extends TestCase -{ - public function testToString() - { - $res = new ReflectionClassResource(new \ReflectionClass('ErrorException')); - - $this->assertSame('reflection.ErrorException', (string) $res); - } - - public function testSerializeUnserialize() - { - $res = new ReflectionClassResource(new \ReflectionClass(DummyInterface::class)); - $ser = unserialize(serialize($res)); - - $this->assertTrue($res->isFresh(0)); - $this->assertTrue($ser->isFresh(0)); - - $this->assertSame((string) $res, (string) $ser); - } - - public function testIsFresh() - { - $res = new ReflectionClassResource(new \ReflectionClass(__CLASS__)); - $mtime = filemtime(__FILE__); - - $this->assertTrue($res->isFresh($mtime), '->isFresh() returns true if the resource has not changed in same second'); - $this->assertTrue($res->isFresh($mtime + 10), '->isFresh() returns true if the resource has not changed'); - $this->assertTrue($res->isFresh($mtime - 86400), '->isFresh() returns true if the resource has not changed'); - } - - public function testIsFreshForDeletedResources() - { - $now = time(); - $tmp = sys_get_temp_dir().'/tmp.php'; - file_put_contents($tmp, 'assertTrue($res->isFresh($now)); - - unlink($tmp); - $this->assertFalse($res->isFresh($now), '->isFresh() returns false if the resource does not exist'); - } - - /** - * @dataProvider provideHashedSignature - */ - public function testHashedSignature($changeExpected, $changedLine, $changedCode, $setContext = null) - { - if ($setContext) { - $setContext(); - } - - $code = <<<'EOPHP' -/* 0*/ -/* 1*/ class %s extends ErrorException -/* 2*/ { -/* 3*/ const FOO = 123; -/* 4*/ -/* 5*/ public $pub = []; -/* 6*/ -/* 7*/ protected $prot; -/* 8*/ -/* 9*/ private $priv; -/*10*/ -/*11*/ public function pub($arg = null) {} -/*12*/ -/*13*/ protected function prot($a = []) {} -/*14*/ -/*15*/ private function priv() {} -/*16*/ -/*17*/ public function ccc($bar = A_CONSTANT_THAT_FOR_SURE_WILL_NEVER_BE_DEFINED_CCCCCC) {} -/*18*/ } -EOPHP; - - static $expectedSignature, $generateSignature; - - if (null === $expectedSignature) { - eval(sprintf($code, $class = 'Foo'.str_replace('.', '_', uniqid('', true)))); - $r = new \ReflectionClass(ReflectionClassResource::class); - $generateSignature = $r->getMethod('generateSignature'); - $generateSignature->setAccessible(true); - $generateSignature = $generateSignature->getClosure($r->newInstanceWithoutConstructor()); - $expectedSignature = implode("\n", iterator_to_array($generateSignature(new \ReflectionClass($class)))); - } - - $code = explode("\n", $code); - if (null !== $changedCode) { - $code[$changedLine] = $changedCode; - } - eval(sprintf(implode("\n", $code), $class = 'Foo'.str_replace('.', '_', uniqid('', true)))); - $signature = implode("\n", iterator_to_array($generateSignature(new \ReflectionClass($class)))); - - if ($changeExpected) { - $this->assertNotSame($expectedSignature, $signature); - } else { - $this->assertSame($expectedSignature, $signature); - } - } - - public function provideHashedSignature() - { - yield [0, 0, "// line change\n\n"]; - yield [1, 0, '/** class docblock */']; - yield [1, 1, 'abstract class %s']; - yield [1, 1, 'final class %s']; - yield [1, 1, 'class %s extends Exception']; - yield [1, 1, 'class %s implements '.DummyInterface::class]; - yield [1, 3, 'const FOO = 456;']; - yield [1, 3, 'const BAR = 123;']; - yield [1, 4, '/** pub docblock */']; - yield [1, 5, 'protected $pub = [];']; - yield [1, 5, 'public $pub = [123];']; - yield [1, 6, '/** prot docblock */']; - yield [1, 7, 'private $prot;']; - yield [0, 8, '/** priv docblock */']; - yield [0, 9, 'private $priv = 123;']; - yield [1, 10, '/** pub docblock */']; - if (\PHP_VERSION_ID >= 50600) { - yield [1, 11, 'public function pub(...$arg) {}']; - } - if (\PHP_VERSION_ID >= 70000) { - yield [1, 11, 'public function pub($arg = null): Foo {}']; - } - yield [0, 11, "public function pub(\$arg = null) {\nreturn 123;\n}"]; - yield [1, 12, '/** prot docblock */']; - yield [1, 13, 'protected function prot($a = [123]) {}']; - yield [0, 14, '/** priv docblock */']; - yield [0, 15, '']; - - if (\PHP_VERSION_ID >= 70400) { - // PHP7.4 typed properties without default value are - // undefined, make sure this doesn't throw an error - yield [1, 5, 'public array $pub;']; - yield [0, 7, 'protected int $prot;']; - yield [0, 9, 'private string $priv;']; - } - - yield [1, 17, 'public function ccc($bar = 187) {}']; - yield [1, 17, 'public function ccc($bar = ANOTHER_ONE_THAT_WILL_NEVER_BE_DEFINED_CCCCCCCCC) {}']; - yield [1, 17, null, static function () { \define('A_CONSTANT_THAT_FOR_SURE_WILL_NEVER_BE_DEFINED_CCCCCC', 'foo'); }]; - } - - public function testEventSubscriber() - { - $res = new ReflectionClassResource(new \ReflectionClass(TestEventSubscriber::class)); - $this->assertTrue($res->isFresh(0)); - - TestEventSubscriber::$subscribedEvents = [123]; - $this->assertFalse($res->isFresh(0)); - - $res = new ReflectionClassResource(new \ReflectionClass(TestEventSubscriber::class)); - $this->assertTrue($res->isFresh(0)); - } - - public function testServiceSubscriber() - { - $res = new ReflectionClassResource(new \ReflectionClass(TestServiceSubscriber::class)); - $this->assertTrue($res->isFresh(0)); - - TestServiceSubscriber::$subscribedServices = [123]; - $this->assertFalse($res->isFresh(0)); - - $res = new ReflectionClassResource(new \ReflectionClass(TestServiceSubscriber::class)); - $this->assertTrue($res->isFresh(0)); - } - - public function testIgnoresObjectsInSignature() - { - $res = new ReflectionClassResource(new \ReflectionClass(TestServiceWithStaticProperty::class)); - $this->assertTrue($res->isFresh(0)); - - TestServiceWithStaticProperty::$initializedObject = new TestServiceWithStaticProperty(); - $this->assertTrue($res->isFresh(0)); - } -} - -interface DummyInterface -{ -} - -class TestEventSubscriber implements EventSubscriberInterface -{ - public static $subscribedEvents = []; - - public static function getSubscribedEvents() - { - return self::$subscribedEvents; - } -} - -class TestServiceSubscriber implements ServiceSubscriberInterface -{ - public static $subscribedServices = []; - - public static function getSubscribedServices() - { - return self::$subscribedServices; - } -} - -class TestServiceWithStaticProperty -{ - public static $initializedObject; -} diff --git a/lib/symfony/config/Tests/Resource/ResourceStub.php b/lib/symfony/config/Tests/Resource/ResourceStub.php deleted file mode 100644 index b01729cbf..000000000 --- a/lib/symfony/config/Tests/Resource/ResourceStub.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Resource; - -use Symfony\Component\Config\Resource\SelfCheckingResourceInterface; - -class ResourceStub implements SelfCheckingResourceInterface -{ - private $fresh = true; - - public function setFresh($isFresh) - { - $this->fresh = $isFresh; - } - - public function __toString() - { - return 'stub'; - } - - public function isFresh($timestamp) - { - return $this->fresh; - } -} diff --git a/lib/symfony/config/Tests/ResourceCheckerConfigCacheTest.php b/lib/symfony/config/Tests/ResourceCheckerConfigCacheTest.php deleted file mode 100644 index a2c2eeb81..000000000 --- a/lib/symfony/config/Tests/ResourceCheckerConfigCacheTest.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Resource\FileResource; -use Symfony\Component\Config\ResourceCheckerConfigCache; -use Symfony\Component\Config\Tests\Resource\ResourceStub; - -class ResourceCheckerConfigCacheTest extends TestCase -{ - private $cacheFile = null; - - protected function setUp() - { - $this->cacheFile = tempnam(sys_get_temp_dir(), 'config_'); - } - - protected function tearDown() - { - $files = [$this->cacheFile, "{$this->cacheFile}.meta"]; - - foreach ($files as $file) { - if (file_exists($file)) { - unlink($file); - } - } - } - - public function testGetPath() - { - $cache = new ResourceCheckerConfigCache($this->cacheFile); - - $this->assertSame($this->cacheFile, $cache->getPath()); - } - - public function testCacheIsNotFreshIfEmpty() - { - $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock() - ->expects($this->never())->method('supports'); - - /* If there is nothing in the cache, it needs to be filled (and thus it's not fresh). - It does not matter if you provide checkers or not. */ - - unlink($this->cacheFile); // remove tempnam() side effect - $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]); - - $this->assertFalse($cache->isFresh()); - } - - public function testCacheIsFreshIfNoCheckerProvided() - { - /* For example in prod mode, you may choose not to run any checkers - at all. In that case, the cache should always be considered fresh. */ - $cache = new ResourceCheckerConfigCache($this->cacheFile); - $this->assertTrue($cache->isFresh()); - } - - public function testCacheIsFreshIfEmptyCheckerIteratorProvided() - { - $cache = new ResourceCheckerConfigCache($this->cacheFile, new \ArrayIterator([])); - $this->assertTrue($cache->isFresh()); - } - - public function testResourcesWithoutcheckersAreIgnoredAndConsideredFresh() - { - /* As in the previous test, but this time we have a resource. */ - $cache = new ResourceCheckerConfigCache($this->cacheFile); - $cache->write('', [new ResourceStub()]); - - $this->assertTrue($cache->isFresh()); // no (matching) ResourceChecker passed - } - - public function testIsFreshWithchecker() - { - $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock(); - - $checker->expects($this->once()) - ->method('supports') - ->willReturn(true); - - $checker->expects($this->once()) - ->method('isFresh') - ->willReturn(true); - - $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]); - $cache->write('', [new ResourceStub()]); - - $this->assertTrue($cache->isFresh()); - } - - public function testIsNotFreshWithchecker() - { - $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock(); - - $checker->expects($this->once()) - ->method('supports') - ->willReturn(true); - - $checker->expects($this->once()) - ->method('isFresh') - ->willReturn(false); - - $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]); - $cache->write('', [new ResourceStub()]); - - $this->assertFalse($cache->isFresh()); - } - - public function testCacheIsNotFreshWhenUnserializeFails() - { - $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock(); - $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]); - $cache->write('foo', [new FileResource(__FILE__)]); - - $metaFile = "{$this->cacheFile}.meta"; - file_put_contents($metaFile, str_replace('FileResource', 'ClassNotHere', file_get_contents($metaFile))); - - $this->assertFalse($cache->isFresh()); - } - - public function testCacheKeepsContent() - { - $cache = new ResourceCheckerConfigCache($this->cacheFile); - $cache->write('FOOBAR'); - - $this->assertSame('FOOBAR', file_get_contents($cache->getPath())); - } - - public function testCacheIsNotFreshIfNotExistsMetaFile() - { - $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock(); - $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]); - $cache->write('foo', [new FileResource(__FILE__)]); - - $metaFile = "{$this->cacheFile}.meta"; - unlink($metaFile); - - $this->assertFalse($cache->isFresh()); - } -} diff --git a/lib/symfony/config/Tests/Util/XmlUtilsTest.php b/lib/symfony/config/Tests/Util/XmlUtilsTest.php deleted file mode 100644 index 4653c8d7c..000000000 --- a/lib/symfony/config/Tests/Util/XmlUtilsTest.php +++ /dev/null @@ -1,211 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Config\Tests\Util; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Config\Util\XmlUtils; - -class XmlUtilsTest extends TestCase -{ - public function testLoadFile() - { - $fixtures = __DIR__.'/../Fixtures/Util/'; - - try { - XmlUtils::loadFile($fixtures.'invalid.xml'); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertStringContainsString('ERROR 77', $e->getMessage()); - } - - try { - XmlUtils::loadFile($fixtures.'document_type.xml'); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertStringContainsString('Document types are not allowed', $e->getMessage()); - } - - try { - XmlUtils::loadFile($fixtures.'invalid_schema.xml', $fixtures.'schema.xsd'); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertStringContainsString('ERROR 1845', $e->getMessage()); - } - - try { - XmlUtils::loadFile($fixtures.'invalid_schema.xml', 'invalid_callback_or_file'); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertStringContainsString('XSD file or callable', $e->getMessage()); - } - - $mock = $this->getMockBuilder(__NAMESPACE__.'\Validator')->getMock(); - $mock->expects($this->exactly(2))->method('validate')->will($this->onConsecutiveCalls(false, true)); - - try { - XmlUtils::loadFile($fixtures.'valid.xml', [$mock, 'validate']); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertRegExp('/The XML file ".+" is not valid\./', $e->getMessage()); - } - - $this->assertInstanceOf('DOMDocument', XmlUtils::loadFile($fixtures.'valid.xml', [$mock, 'validate'])); - $this->assertSame([], libxml_get_errors()); - } - - public function testParseWithInvalidValidatorCallable() - { - $this->expectException('Symfony\Component\Config\Util\Exception\InvalidXmlException'); - $this->expectExceptionMessage('The XML is not valid'); - $fixtures = __DIR__.'/../Fixtures/Util/'; - - $mock = $this->getMockBuilder(__NAMESPACE__.'\Validator')->getMock(); - $mock->expects($this->once())->method('validate')->willReturn(false); - - XmlUtils::parse(file_get_contents($fixtures.'valid.xml'), [$mock, 'validate']); - } - - public function testLoadFileWithInternalErrorsEnabled() - { - $internalErrors = libxml_use_internal_errors(true); - - $this->assertSame([], libxml_get_errors()); - $this->assertInstanceOf('DOMDocument', XmlUtils::loadFile(__DIR__.'/../Fixtures/Util/invalid_schema.xml')); - $this->assertSame([], libxml_get_errors()); - - libxml_clear_errors(); - libxml_use_internal_errors($internalErrors); - } - - /** - * @dataProvider getDataForConvertDomToArray - */ - public function testConvertDomToArray($expected, $xml, $root = false, $checkPrefix = true) - { - $dom = new \DOMDocument(); - $dom->loadXML($root ? $xml : ''.$xml.''); - - $this->assertSame($expected, XmlUtils::convertDomElementToArray($dom->documentElement, $checkPrefix)); - } - - public function getDataForConvertDomToArray() - { - return [ - [null, ''], - ['bar', 'bar'], - [['bar' => 'foobar'], '', true], - [['foo' => null], ''], - [['foo' => 'bar'], 'bar'], - [['foo' => ['foo' => 'bar']], ''], - [['foo' => ['foo' => 0]], '0'], - [['foo' => ['foo' => 'bar']], 'bar'], - [['foo' => ['foo' => 'bar', 'value' => 'text']], 'text'], - [['foo' => ['attr' => 'bar', 'foo' => 'text']], 'text'], - [['foo' => ['bar', 'text']], 'bartext'], - [['foo' => [['foo' => 'bar'], ['foo' => 'text']]], ''], - [['foo' => ['foo' => ['bar', 'text']]], 'text'], - [['foo' => 'bar'], 'bar'], - [['foo' => 'text'], 'text'], - [['foo' => ['bar' => 'bar', 'value' => 'text']], 'text', false, false], - [['attr' => 1, 'b' => 'hello'], 'hello2', true], - ]; - } - - /** - * @dataProvider getDataForPhpize - */ - public function testPhpize($expected, $value) - { - $this->assertSame($expected, XmlUtils::phpize($value)); - } - - public function getDataForPhpize() - { - return [ - ['', ''], - [null, 'null'], - [true, 'true'], - [false, 'false'], - [null, 'Null'], - [true, 'True'], - [false, 'False'], - [0, '0'], - [1, '1'], - [-1, '-1'], - [0777, '0777'], - [255, '0xFF'], - [100.0, '1e2'], - [-120.0, '-1.2E2'], - [-10100.1, '-10100.1'], - ['-10,100.1', '-10,100.1'], - ['1234 5678 9101 1121 3141', '1234 5678 9101 1121 3141'], - ['1,2,3,4', '1,2,3,4'], - ['11,22,33,44', '11,22,33,44'], - ['11,222,333,4', '11,222,333,4'], - ['1,222,333,444', '1,222,333,444'], - ['11,222,333,444', '11,222,333,444'], - ['111,222,333,444', '111,222,333,444'], - ['1111,2222,3333,4444,5555', '1111,2222,3333,4444,5555'], - ['foo', 'foo'], - [6, '0b0110'], - ]; - } - - public function testLoadEmptyXmlFile() - { - $file = __DIR__.'/../Fixtures/foo.xml'; - - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage(sprintf('File %s does not contain valid XML, it is empty.', $file)); - - XmlUtils::loadFile($file); - } - - // test for issue https://github.com/symfony/symfony/issues/9731 - public function testLoadWrongEmptyXMLWithErrorHandler() - { - $originalDisableEntities = libxml_disable_entity_loader(false); - $errorReporting = error_reporting(-1); - - set_error_handler(function ($errno, $errstr) { - throw new \Exception($errstr, $errno); - }); - - $file = __DIR__.'/../Fixtures/foo.xml'; - try { - try { - XmlUtils::loadFile($file); - $this->fail('An exception should have been raised'); - } catch (\InvalidArgumentException $e) { - $this->assertEquals(sprintf('File %s does not contain valid XML, it is empty.', $file), $e->getMessage()); - } - } finally { - restore_error_handler(); - error_reporting($errorReporting); - } - - $disableEntities = libxml_disable_entity_loader(true); - libxml_disable_entity_loader($disableEntities); - - libxml_disable_entity_loader($originalDisableEntities); - - $this->assertFalse($disableEntities); - - // should not throw an exception - XmlUtils::loadFile(__DIR__.'/../Fixtures/Util/valid.xml', __DIR__.'/../Fixtures/Util/schema.xsd'); - } -} - -interface Validator -{ - public function validate(); -} diff --git a/lib/symfony/console/Tests/ApplicationTest.php b/lib/symfony/console/Tests/ApplicationTest.php deleted file mode 100644 index 1ef2ed3d7..000000000 --- a/lib/symfony/console/Tests/ApplicationTest.php +++ /dev/null @@ -1,1744 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\CommandLoader\FactoryCommandLoader; -use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass; -use Symfony\Component\Console\Event\ConsoleCommandEvent; -use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Event\ConsoleExceptionEvent; -use Symfony\Component\Console\Event\ConsoleTerminateEvent; -use Symfony\Component\Console\Exception\CommandNotFoundException; -use Symfony\Component\Console\Helper\FormatterHelper; -use Symfony\Component\Console\Helper\HelperSet; -use Symfony\Component\Console\Input\ArgvInput; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\NullOutput; -use Symfony\Component\Console\Output\Output; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Output\StreamOutput; -use Symfony\Component\Console\Tester\ApplicationTester; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\EventDispatcher\EventDispatcher; - -class ApplicationTest extends TestCase -{ - protected static $fixturesPath; - - private $colSize; - - protected function setUp() - { - $this->colSize = getenv('COLUMNS'); - } - - protected function tearDown() - { - putenv($this->colSize ? 'COLUMNS='.$this->colSize : 'COLUMNS'); - putenv('SHELL_VERBOSITY'); - unset($_ENV['SHELL_VERBOSITY']); - unset($_SERVER['SHELL_VERBOSITY']); - } - - public static function setUpBeforeClass() - { - self::$fixturesPath = realpath(__DIR__.'/Fixtures/'); - require_once self::$fixturesPath.'/FooCommand.php'; - require_once self::$fixturesPath.'/FooOptCommand.php'; - require_once self::$fixturesPath.'/Foo1Command.php'; - require_once self::$fixturesPath.'/Foo2Command.php'; - require_once self::$fixturesPath.'/Foo3Command.php'; - require_once self::$fixturesPath.'/Foo4Command.php'; - require_once self::$fixturesPath.'/Foo5Command.php'; - require_once self::$fixturesPath.'/FooSameCaseUppercaseCommand.php'; - require_once self::$fixturesPath.'/FooSameCaseLowercaseCommand.php'; - require_once self::$fixturesPath.'/FoobarCommand.php'; - require_once self::$fixturesPath.'/BarBucCommand.php'; - require_once self::$fixturesPath.'/FooSubnamespaced1Command.php'; - require_once self::$fixturesPath.'/FooSubnamespaced2Command.php'; - require_once self::$fixturesPath.'/TestAmbiguousCommandRegistering.php'; - require_once self::$fixturesPath.'/TestAmbiguousCommandRegistering2.php'; - require_once self::$fixturesPath.'/FooHiddenCommand.php'; - } - - protected function normalizeLineBreaks($text) - { - return str_replace(PHP_EOL, "\n", $text); - } - - /** - * Replaces the dynamic placeholders of the command help text with a static version. - * The placeholder %command.full_name% includes the script path that is not predictable - * and can not be tested against. - */ - protected function ensureStaticCommandHelp(Application $application) - { - foreach ($application->all() as $command) { - $command->setHelp(str_replace('%command.full_name%', 'app/console %command.name%', $command->getHelp())); - } - } - - public function testConstructor() - { - $application = new Application('foo', 'bar'); - $this->assertEquals('foo', $application->getName(), '__construct() takes the application name as its first argument'); - $this->assertEquals('bar', $application->getVersion(), '__construct() takes the application version as its second argument'); - $this->assertEquals(['help', 'list'], array_keys($application->all()), '__construct() registered the help and list commands by default'); - } - - public function testSetGetName() - { - $application = new Application(); - $application->setName('foo'); - $this->assertEquals('foo', $application->getName(), '->setName() sets the name of the application'); - } - - public function testSetGetVersion() - { - $application = new Application(); - $application->setVersion('bar'); - $this->assertEquals('bar', $application->getVersion(), '->setVersion() sets the version of the application'); - } - - public function testGetLongVersion() - { - $application = new Application('foo', 'bar'); - $this->assertEquals('foo bar', $application->getLongVersion(), '->getLongVersion() returns the long version of the application'); - } - - public function testHelp() - { - $application = new Application(); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_gethelp.txt', $this->normalizeLineBreaks($application->getHelp()), '->getHelp() returns a help message'); - } - - public function testAll() - { - $application = new Application(); - $commands = $application->all(); - $this->assertInstanceOf('Symfony\\Component\\Console\\Command\\HelpCommand', $commands['help'], '->all() returns the registered commands'); - - $application->add(new \FooCommand()); - $commands = $application->all('foo'); - $this->assertCount(1, $commands, '->all() takes a namespace as its first argument'); - } - - public function testAllWithCommandLoader() - { - $application = new Application(); - $commands = $application->all(); - $this->assertInstanceOf('Symfony\\Component\\Console\\Command\\HelpCommand', $commands['help'], '->all() returns the registered commands'); - - $application->add(new \FooCommand()); - $commands = $application->all('foo'); - $this->assertCount(1, $commands, '->all() takes a namespace as its first argument'); - - $application->setCommandLoader(new FactoryCommandLoader([ - 'foo:bar1' => function () { return new \Foo1Command(); }, - ])); - $commands = $application->all('foo'); - $this->assertCount(2, $commands, '->all() takes a namespace as its first argument'); - $this->assertInstanceOf(\FooCommand::class, $commands['foo:bar'], '->all() returns the registered commands'); - $this->assertInstanceOf(\Foo1Command::class, $commands['foo:bar1'], '->all() returns the registered commands'); - } - - public function testRegister() - { - $application = new Application(); - $command = $application->register('foo'); - $this->assertEquals('foo', $command->getName(), '->register() registers a new command'); - } - - public function testRegisterAmbiguous() - { - $code = function (InputInterface $input, OutputInterface $output) { - $output->writeln('It works!'); - }; - - $application = new Application(); - $application->setAutoExit(false); - $application - ->register('test-foo') - ->setAliases(['test']) - ->setCode($code); - - $application - ->register('test-bar') - ->setCode($code); - - $tester = new ApplicationTester($application); - $tester->run(['test']); - $this->assertStringContainsString('It works!', $tester->getDisplay(true)); - } - - public function testAdd() - { - $application = new Application(); - $application->add($foo = new \FooCommand()); - $commands = $application->all(); - $this->assertEquals($foo, $commands['foo:bar'], '->add() registers a command'); - - $application = new Application(); - $application->addCommands([$foo = new \FooCommand(), $foo1 = new \Foo1Command()]); - $commands = $application->all(); - $this->assertEquals([$foo, $foo1], [$commands['foo:bar'], $commands['foo:bar1']], '->addCommands() registers an array of commands'); - } - - public function testAddCommandWithEmptyConstructor() - { - $this->expectException('LogicException'); - $this->expectExceptionMessage('Command class "Foo5Command" is not correctly initialized. You probably forgot to call the parent constructor.'); - $application = new Application(); - $application->add(new \Foo5Command()); - } - - public function testHasGet() - { - $application = new Application(); - $this->assertTrue($application->has('list'), '->has() returns true if a named command is registered'); - $this->assertFalse($application->has('afoobar'), '->has() returns false if a named command is not registered'); - - $application->add($foo = new \FooCommand()); - $this->assertTrue($application->has('afoobar'), '->has() returns true if an alias is registered'); - $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns a command by name'); - $this->assertEquals($foo, $application->get('afoobar'), '->get() returns a command by alias'); - - $application = new Application(); - $application->add($foo = new \FooCommand()); - // simulate --help - $r = new \ReflectionObject($application); - $p = $r->getProperty('wantHelps'); - $p->setAccessible(true); - $p->setValue($application, true); - $command = $application->get('foo:bar'); - $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $command, '->get() returns the help command if --help is provided as the input'); - } - - public function testHasGetWithCommandLoader() - { - $application = new Application(); - $this->assertTrue($application->has('list'), '->has() returns true if a named command is registered'); - $this->assertFalse($application->has('afoobar'), '->has() returns false if a named command is not registered'); - - $application->add($foo = new \FooCommand()); - $this->assertTrue($application->has('afoobar'), '->has() returns true if an alias is registered'); - $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns a command by name'); - $this->assertEquals($foo, $application->get('afoobar'), '->get() returns a command by alias'); - - $application->setCommandLoader(new FactoryCommandLoader([ - 'foo:bar1' => function () { return new \Foo1Command(); }, - ])); - - $this->assertTrue($application->has('afoobar'), '->has() returns true if an instance is registered for an alias even with command loader'); - $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns an instance by name even with command loader'); - $this->assertEquals($foo, $application->get('afoobar'), '->get() returns an instance by alias even with command loader'); - $this->assertTrue($application->has('foo:bar1'), '->has() returns true for commands registered in the loader'); - $this->assertInstanceOf(\Foo1Command::class, $foo1 = $application->get('foo:bar1'), '->get() returns a command by name from the command loader'); - $this->assertTrue($application->has('afoobar1'), '->has() returns true for commands registered in the loader'); - $this->assertEquals($foo1, $application->get('afoobar1'), '->get() returns a command by name from the command loader'); - } - - public function testSilentHelp() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $tester = new ApplicationTester($application); - $tester->run(['-h' => true, '-q' => true], ['decorated' => false]); - - $this->assertEmpty($tester->getDisplay(true)); - } - - public function testGetInvalidCommand() - { - $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); - $this->expectExceptionMessage('The command "foofoo" does not exist.'); - $application = new Application(); - $application->get('foofoo'); - } - - public function testGetNamespaces() - { - $application = new Application(); - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $this->assertEquals(['foo'], $application->getNamespaces(), '->getNamespaces() returns an array of unique used namespaces'); - } - - public function testFindNamespace() - { - $application = new Application(); - $application->add(new \FooCommand()); - $this->assertEquals('foo', $application->findNamespace('foo'), '->findNamespace() returns the given namespace if it exists'); - $this->assertEquals('foo', $application->findNamespace('f'), '->findNamespace() finds a namespace given an abbreviation'); - $application->add(new \Foo2Command()); - $this->assertEquals('foo', $application->findNamespace('foo'), '->findNamespace() returns the given namespace if it exists'); - } - - public function testFindNamespaceWithSubnamespaces() - { - $application = new Application(); - $application->add(new \FooSubnamespaced1Command()); - $application->add(new \FooSubnamespaced2Command()); - $this->assertEquals('foo', $application->findNamespace('foo'), '->findNamespace() returns commands even if the commands are only contained in subnamespaces'); - } - - public function testFindAmbiguousNamespace() - { - $application = new Application(); - $application->add(new \BarBucCommand()); - $application->add(new \FooCommand()); - $application->add(new \Foo2Command()); - - $expectedMsg = "The namespace \"f\" is ambiguous.\nDid you mean one of these?\n foo\n foo1"; - - $this->expectException(CommandNotFoundException::class); - $this->expectExceptionMessage($expectedMsg); - - $application->findNamespace('f'); - } - - public function testFindNonAmbiguous() - { - $application = new Application(); - $application->add(new \TestAmbiguousCommandRegistering()); - $application->add(new \TestAmbiguousCommandRegistering2()); - $this->assertEquals('test-ambiguous', $application->find('test')->getName()); - } - - public function testFindInvalidNamespace() - { - $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); - $this->expectExceptionMessage('There are no commands defined in the "bar" namespace.'); - $application = new Application(); - $application->findNamespace('bar'); - } - - public function testFindUniqueNameButNamespaceName() - { - $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); - $this->expectExceptionMessage('Command "foo1" is not defined'); - $application = new Application(); - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $application->add(new \Foo2Command()); - - $application->find($commandName = 'foo1'); - } - - public function testFind() - { - $application = new Application(); - $application->add(new \FooCommand()); - - $this->assertInstanceOf('FooCommand', $application->find('foo:bar'), '->find() returns a command if its name exists'); - $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $application->find('h'), '->find() returns a command if its name exists'); - $this->assertInstanceOf('FooCommand', $application->find('f:bar'), '->find() returns a command if the abbreviation for the namespace exists'); - $this->assertInstanceOf('FooCommand', $application->find('f:b'), '->find() returns a command if the abbreviation for the namespace and the command name exist'); - $this->assertInstanceOf('FooCommand', $application->find('a'), '->find() returns a command if the abbreviation exists for an alias'); - } - - public function testFindCaseSensitiveFirst() - { - $application = new Application(); - $application->add(new \FooSameCaseUppercaseCommand()); - $application->add(new \FooSameCaseLowercaseCommand()); - - $this->assertInstanceOf('FooSameCaseUppercaseCommand', $application->find('f:B'), '->find() returns a command if the abbreviation is the correct case'); - $this->assertInstanceOf('FooSameCaseUppercaseCommand', $application->find('f:BAR'), '->find() returns a command if the abbreviation is the correct case'); - $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:b'), '->find() returns a command if the abbreviation is the correct case'); - $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:bar'), '->find() returns a command if the abbreviation is the correct case'); - } - - public function testFindCaseInsensitiveAsFallback() - { - $application = new Application(); - $application->add(new \FooSameCaseLowercaseCommand()); - - $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:b'), '->find() returns a command if the abbreviation is the correct case'); - $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:B'), '->find() will fallback to case insensitivity'); - $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('FoO:BaR'), '->find() will fallback to case insensitivity'); - } - - public function testFindCaseInsensitiveSuggestions() - { - $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); - $this->expectExceptionMessage('Command "FoO:BaR" is ambiguous'); - $application = new Application(); - $application->add(new \FooSameCaseLowercaseCommand()); - $application->add(new \FooSameCaseUppercaseCommand()); - - $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('FoO:BaR'), '->find() will find two suggestions with case insensitivity'); - } - - public function testFindWithCommandLoader() - { - $application = new Application(); - $application->setCommandLoader(new FactoryCommandLoader([ - 'foo:bar' => $f = function () { return new \FooCommand(); }, - ])); - - $this->assertInstanceOf('FooCommand', $application->find('foo:bar'), '->find() returns a command if its name exists'); - $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $application->find('h'), '->find() returns a command if its name exists'); - $this->assertInstanceOf('FooCommand', $application->find('f:bar'), '->find() returns a command if the abbreviation for the namespace exists'); - $this->assertInstanceOf('FooCommand', $application->find('f:b'), '->find() returns a command if the abbreviation for the namespace and the command name exist'); - $this->assertInstanceOf('FooCommand', $application->find('a'), '->find() returns a command if the abbreviation exists for an alias'); - } - - /** - * @dataProvider provideAmbiguousAbbreviations - */ - public function testFindWithAmbiguousAbbreviations($abbreviation, $expectedExceptionMessage) - { - putenv('COLUMNS=120'); - $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); - $this->expectExceptionMessage($expectedExceptionMessage); - - $application = new Application(); - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $application->add(new \Foo2Command()); - - $application->find($abbreviation); - } - - public function provideAmbiguousAbbreviations() - { - return [ - ['f', 'Command "f" is not defined.'], - [ - 'a', - "Command \"a\" is ambiguous.\nDid you mean one of these?\n". - " afoobar The foo:bar command\n". - " afoobar1 The foo:bar1 command\n". - ' afoobar2 The foo1:bar command', - ], - [ - 'foo:b', - "Command \"foo:b\" is ambiguous.\nDid you mean one of these?\n". - " foo:bar The foo:bar command\n". - " foo:bar1 The foo:bar1 command\n". - ' foo1:bar The foo1:bar command', - ], - ]; - } - - public function testFindCommandEqualNamespace() - { - $application = new Application(); - $application->add(new \Foo3Command()); - $application->add(new \Foo4Command()); - - $this->assertInstanceOf('Foo3Command', $application->find('foo3:bar'), '->find() returns the good command even if a namespace has same name'); - $this->assertInstanceOf('Foo4Command', $application->find('foo3:bar:toh'), '->find() returns a command even if its namespace equals another command name'); - } - - public function testFindCommandWithAmbiguousNamespacesButUniqueName() - { - $application = new Application(); - $application->add(new \FooCommand()); - $application->add(new \FoobarCommand()); - - $this->assertInstanceOf('FoobarCommand', $application->find('f:f')); - } - - public function testFindCommandWithMissingNamespace() - { - $application = new Application(); - $application->add(new \Foo4Command()); - - $this->assertInstanceOf('Foo4Command', $application->find('f::t')); - } - - /** - * @dataProvider provideInvalidCommandNamesSingle - */ - public function testFindAlternativeExceptionMessageSingle($name) - { - $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); - $this->expectExceptionMessage('Did you mean this'); - $application = new Application(); - $application->add(new \Foo3Command()); - $application->find($name); - } - - public function provideInvalidCommandNamesSingle() - { - return [ - ['foo3:barr'], - ['fooo3:bar'], - ]; - } - - public function testFindAlternativeExceptionMessageMultiple() - { - putenv('COLUMNS=120'); - $application = new Application(); - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $application->add(new \Foo2Command()); - - // Command + plural - try { - $application->find('foo:baR'); - $this->fail('->find() throws a CommandNotFoundException if command does not exist, with alternatives'); - } catch (\Exception $e) { - $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); - $this->assertRegExp('/Did you mean one of these/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); - $this->assertRegExp('/foo1:bar/', $e->getMessage()); - $this->assertRegExp('/foo:bar/', $e->getMessage()); - } - - // Namespace + plural - try { - $application->find('foo2:bar'); - $this->fail('->find() throws a CommandNotFoundException if command does not exist, with alternatives'); - } catch (\Exception $e) { - $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); - $this->assertRegExp('/Did you mean one of these/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); - $this->assertRegExp('/foo1/', $e->getMessage()); - } - - $application->add(new \Foo3Command()); - $application->add(new \Foo4Command()); - - // Subnamespace + plural - try { - $application->find('foo3:'); - $this->fail('->find() should throw an Symfony\Component\Console\Exception\CommandNotFoundException if a command is ambiguous because of a subnamespace, with alternatives'); - } catch (\Exception $e) { - $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e); - $this->assertRegExp('/foo3:bar/', $e->getMessage()); - $this->assertRegExp('/foo3:bar:toh/', $e->getMessage()); - } - } - - public function testFindAlternativeCommands() - { - $application = new Application(); - - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $application->add(new \Foo2Command()); - - try { - $application->find($commandName = 'Unknown command'); - $this->fail('->find() throws a CommandNotFoundException if command does not exist'); - } catch (\Exception $e) { - $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist'); - $this->assertSame([], $e->getAlternatives()); - $this->assertEquals(sprintf('Command "%s" is not defined.', $commandName), $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, without alternatives'); - } - - // Test if "bar1" command throw a "CommandNotFoundException" and does not contain - // "foo:bar" as alternative because "bar1" is too far from "foo:bar" - try { - $application->find($commandName = 'bar1'); - $this->fail('->find() throws a CommandNotFoundException if command does not exist'); - } catch (\Exception $e) { - $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command does not exist'); - $this->assertSame(['afoobar1', 'foo:bar1'], $e->getAlternatives()); - $this->assertRegExp(sprintf('/Command "%s" is not defined./', $commandName), $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternatives'); - $this->assertRegExp('/afoobar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "afoobar1"'); - $this->assertRegExp('/foo:bar1/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, with alternative : "foo:bar1"'); - $this->assertNotRegExp('/foo:bar(?>!1)/', $e->getMessage(), '->find() throws a CommandNotFoundException if command does not exist, without "foo:bar" alternative'); - } - } - - public function testFindAlternativeCommandsWithAnAlias() - { - $fooCommand = new \FooCommand(); - $fooCommand->setAliases(['foo2']); - - $application = new Application(); - $application->add($fooCommand); - - $result = $application->find('foo'); - - $this->assertSame($fooCommand, $result); - } - - public function testFindAlternativeNamespace() - { - $application = new Application(); - - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $application->add(new \Foo2Command()); - $application->add(new \Foo3Command()); - - try { - $application->find('Unknown-namespace:Unknown-command'); - $this->fail('->find() throws a CommandNotFoundException if namespace does not exist'); - } catch (\Exception $e) { - $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if namespace does not exist'); - $this->assertSame([], $e->getAlternatives()); - $this->assertEquals('There are no commands defined in the "Unknown-namespace" namespace.', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, without alternatives'); - } - - try { - $application->find('foo2:command'); - $this->fail('->find() throws a CommandNotFoundException if namespace does not exist'); - } catch (\Exception $e) { - $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if namespace does not exist'); - $this->assertCount(3, $e->getAlternatives()); - $this->assertContains('foo', $e->getAlternatives()); - $this->assertContains('foo1', $e->getAlternatives()); - $this->assertContains('foo3', $e->getAlternatives()); - $this->assertRegExp('/There are no commands defined in the "foo2" namespace./', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative'); - $this->assertRegExp('/foo/', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative : "foo"'); - $this->assertRegExp('/foo1/', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative : "foo1"'); - $this->assertRegExp('/foo3/', $e->getMessage(), '->find() throws a CommandNotFoundException if namespace does not exist, with alternative : "foo3"'); - } - } - - public function testFindAlternativesOutput() - { - $application = new Application(); - - $application->add(new \FooCommand()); - $application->add(new \Foo1Command()); - $application->add(new \Foo2Command()); - $application->add(new \Foo3Command()); - $application->add(new \FooHiddenCommand()); - - $expectedAlternatives = [ - 'afoobar', - 'afoobar1', - 'afoobar2', - 'foo1:bar', - 'foo3:bar', - 'foo:bar', - 'foo:bar1', - ]; - - try { - $application->find('foo'); - $this->fail('->find() throws a CommandNotFoundException if command is not defined'); - } catch (\Exception $e) { - $this->assertInstanceOf('Symfony\Component\Console\Exception\CommandNotFoundException', $e, '->find() throws a CommandNotFoundException if command is not defined'); - $this->assertSame($expectedAlternatives, $e->getAlternatives()); - - $this->assertRegExp('/Command "foo" is not defined\..*Did you mean one of these\?.*/Ums', $e->getMessage()); - } - } - - public function testFindNamespaceDoesNotFailOnDeepSimilarNamespaces() - { - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['getNamespaces'])->getMock(); - $application->expects($this->once()) - ->method('getNamespaces') - ->willReturn(['foo:sublong', 'bar:sub']); - - $this->assertEquals('foo:sublong', $application->findNamespace('f:sub')); - } - - public function testFindWithDoubleColonInNameThrowsException() - { - $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); - $this->expectExceptionMessage('Command "foo::bar" is not defined.'); - $application = new Application(); - $application->add(new \FooCommand()); - $application->add(new \Foo4Command()); - $application->find('foo::bar'); - } - - public function testSetCatchExceptions() - { - $application = new Application(); - $application->setAutoExit(false); - putenv('COLUMNS=120'); - $tester = new ApplicationTester($application); - - $application->setCatchExceptions(true); - $this->assertTrue($application->areExceptionsCaught()); - - $tester->run(['command' => 'foo'], ['decorated' => false]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getDisplay(true), '->setCatchExceptions() sets the catch exception flag'); - - $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getErrorOutput(true), '->setCatchExceptions() sets the catch exception flag'); - $this->assertSame('', $tester->getDisplay(true)); - - $application->setCatchExceptions(false); - try { - $tester->run(['command' => 'foo'], ['decorated' => false]); - $this->fail('->setCatchExceptions() sets the catch exception flag'); - } catch (\Exception $e) { - $this->assertInstanceOf('\Exception', $e, '->setCatchExceptions() sets the catch exception flag'); - $this->assertEquals('Command "foo" is not defined.', $e->getMessage(), '->setCatchExceptions() sets the catch exception flag'); - } - } - - public function testAutoExitSetting() - { - $application = new Application(); - $this->assertTrue($application->isAutoExitEnabled()); - - $application->setAutoExit(false); - $this->assertFalse($application->isAutoExitEnabled()); - } - - public function testRenderException() - { - $application = new Application(); - $application->setAutoExit(false); - putenv('COLUMNS=120'); - $tester = new ApplicationTester($application); - - $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exception'); - - $tester->run(['command' => 'foo'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE, 'capture_stderr_separately' => true]); - $this->assertStringContainsString('Exception trace', $tester->getErrorOutput(), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose'); - - $tester->run(['command' => 'list', '--foo' => true], ['decorated' => false, 'capture_stderr_separately' => true]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $tester->getErrorOutput(true), '->renderException() renders the command synopsis when an exception occurs in the context of a command'); - - $application->add(new \Foo3Command()); - $tester = new ApplicationTester($application); - $tester->run(['command' => 'foo3:bar'], ['decorated' => false, 'capture_stderr_separately' => true]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); - - $tester->run(['command' => 'foo3:bar'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); - $this->assertRegExp('/\[Exception\]\s*First exception/', $tester->getDisplay(), '->renderException() renders a pretty exception without code exception when code exception is default and verbosity is verbose'); - $this->assertRegExp('/\[Exception\]\s*Second exception/', $tester->getDisplay(), '->renderException() renders a pretty exception without code exception when code exception is 0 and verbosity is verbose'); - $this->assertRegExp('/\[Exception \(404\)\]\s*Third exception/', $tester->getDisplay(), '->renderException() renders a pretty exception with code exception when code exception is 404 and verbosity is verbose'); - - $tester->run(['command' => 'foo3:bar'], ['decorated' => true]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getDisplay(true), '->renderException() renders a pretty exceptions with previous exceptions'); - - $tester->run(['command' => 'foo3:bar'], ['decorated' => true, 'capture_stderr_separately' => true]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception3decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); - - $application = new Application(); - $application->setAutoExit(false); - putenv('COLUMNS=32'); - $tester = new ApplicationTester($application); - - $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception4.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); - putenv('COLUMNS=120'); - } - - public function testRenderExceptionWithDoubleWidthCharacters() - { - $application = new Application(); - $application->setAutoExit(false); - putenv('COLUMNS=120'); - $application->register('foo')->setCode(function () { - throw new \Exception('エラーメッセージ'); - }); - $tester = new ApplicationTester($application); - - $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); - $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); - - $tester->run(['command' => 'foo'], ['decorated' => true, 'capture_stderr_separately' => true]); - $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); - - $application = new Application(); - $application->setAutoExit(false); - putenv('COLUMNS=32'); - $application->register('foo')->setCode(function () { - throw new \Exception('コマンドの実行中にエラーが発生しました。'); - }); - $tester = new ApplicationTester($application); - $tester->run(['command' => 'foo'], ['decorated' => false, 'capture_stderr_separately' => true]); - $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); - putenv('COLUMNS=120'); - } - - public function testRenderExceptionEscapesLines() - { - $application = new Application(); - $application->setAutoExit(false); - putenv('COLUMNS=22'); - $application->register('foo')->setCode(function () { - throw new \Exception('dont break here !'); - }); - $tester = new ApplicationTester($application); - - $tester->run(['command' => 'foo'], ['decorated' => false]); - $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_escapeslines.txt', $tester->getDisplay(true), '->renderException() escapes lines containing formatting'); - putenv('COLUMNS=120'); - } - - public function testRenderExceptionLineBreaks() - { - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['getTerminalWidth'])->getMock(); - $application->setAutoExit(false); - $application->expects($this->any()) - ->method('getTerminalWidth') - ->willReturn(120); - $application->register('foo')->setCode(function () { - throw new \InvalidArgumentException("\n\nline 1 with extra spaces \nline 2\n\nline 4\n"); - }); - $tester = new ApplicationTester($application); - - $tester->run(['command' => 'foo'], ['decorated' => false]); - $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks'); - } - - public function testRenderExceptionStackTraceContainsRootException() - { - $application = new Application(); - $application->setAutoExit(false); - $application->register('foo')->setCode(function () { - throw new \Exception('Verbose exception'); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'foo'], ['decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE]); - - $this->assertStringContainsString(sprintf('() at %s:', __FILE__), $tester->getDisplay()); - } - - public function testRun() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $application->add($command = new \Foo1Command()); - $_SERVER['argv'] = ['cli.php', 'foo:bar1']; - - ob_start(); - $application->run(); - ob_end_clean(); - - $this->assertInstanceOf('Symfony\Component\Console\Input\ArgvInput', $command->input, '->run() creates an ArgvInput by default if none is given'); - $this->assertInstanceOf('Symfony\Component\Console\Output\ConsoleOutput', $command->output, '->run() creates a ConsoleOutput by default if none is given'); - - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $this->ensureStaticCommandHelp($application); - $tester = new ApplicationTester($application); - - $tester->run([], ['decorated' => false]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run1.txt', $tester->getDisplay(true), '->run() runs the list command if no argument is passed'); - - $tester->run(['--help' => true], ['decorated' => false]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if --help is passed'); - - $tester->run(['-h' => true], ['decorated' => false]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $tester->getDisplay(true), '->run() runs the help command if -h is passed'); - - $tester->run(['command' => 'list', '--help' => true], ['decorated' => false]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if --help is passed'); - - $tester->run(['command' => 'list', '-h' => true], ['decorated' => false]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $tester->getDisplay(true), '->run() displays the help if -h is passed'); - - $tester->run(['--ansi' => true]); - $this->assertTrue($tester->getOutput()->isDecorated(), '->run() forces color output if --ansi is passed'); - - $tester->run(['--no-ansi' => true]); - $this->assertFalse($tester->getOutput()->isDecorated(), '->run() forces color output to be disabled if --no-ansi is passed'); - - $tester->run(['--version' => true], ['decorated' => false]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if --version is passed'); - - $tester->run(['-V' => true], ['decorated' => false]); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $tester->getDisplay(true), '->run() displays the program version if -v is passed'); - - $tester->run(['command' => 'list', '--quiet' => true]); - $this->assertSame('', $tester->getDisplay(), '->run() removes all output if --quiet is passed'); - $this->assertFalse($tester->getInput()->isInteractive(), '->run() sets off the interactive mode if --quiet is passed'); - - $tester->run(['command' => 'list', '-q' => true]); - $this->assertSame('', $tester->getDisplay(), '->run() removes all output if -q is passed'); - $this->assertFalse($tester->getInput()->isInteractive(), '->run() sets off the interactive mode if -q is passed'); - - $tester->run(['command' => 'list', '--verbose' => true]); - $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose is passed'); - - $tester->run(['command' => 'list', '--verbose' => 1]); - $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose=1 is passed'); - - $tester->run(['command' => 'list', '--verbose' => 2]); - $this->assertSame(Output::VERBOSITY_VERY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to very verbose if --verbose=2 is passed'); - - $tester->run(['command' => 'list', '--verbose' => 3]); - $this->assertSame(Output::VERBOSITY_DEBUG, $tester->getOutput()->getVerbosity(), '->run() sets the output to debug if --verbose=3 is passed'); - - $tester->run(['command' => 'list', '--verbose' => 4]); - $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if unknown --verbose level is passed'); - - $tester->run(['command' => 'list', '-v' => true]); - $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); - - $tester->run(['command' => 'list', '-vv' => true]); - $this->assertSame(Output::VERBOSITY_VERY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); - - $tester->run(['command' => 'list', '-vvv' => true]); - $this->assertSame(Output::VERBOSITY_DEBUG, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); - - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $application->add(new \FooCommand()); - $tester = new ApplicationTester($application); - - $tester->run(['command' => 'foo:bar', '--no-interaction' => true], ['decorated' => false]); - $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if --no-interaction is passed'); - - $tester->run(['command' => 'foo:bar', '-n' => true], ['decorated' => false]); - $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if -n is passed'); - } - - public function testRunWithGlobalOptionAndNoCommand() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $application->getDefinition()->addOption(new InputOption('foo', 'f', InputOption::VALUE_OPTIONAL)); - - $output = new StreamOutput(fopen('php://memory', 'w', false)); - $input = new ArgvInput(['cli.php', '--foo', 'bar']); - - $this->assertSame(0, $application->run($input, $output)); - } - - /** - * Issue #9285. - * - * If the "verbose" option is just before an argument in ArgvInput, - * an argument value should not be treated as verbosity value. - * This test will fail with "Not enough arguments." if broken - */ - public function testVerboseValueNotBreakArguments() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $application->add(new \FooCommand()); - - $output = new StreamOutput(fopen('php://memory', 'w', false)); - - $input = new ArgvInput(['cli.php', '-v', 'foo:bar']); - $application->run($input, $output); - - $this->addToAssertionCount(1); - - $input = new ArgvInput(['cli.php', '--verbose', 'foo:bar']); - $application->run($input, $output); - - $this->addToAssertionCount(1); - } - - public function testRunReturnsIntegerExitCode() - { - $exception = new \Exception('', 4); - - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['doRun'])->getMock(); - $application->setAutoExit(false); - $application->expects($this->once()) - ->method('doRun') - ->willThrowException($exception); - - $exitCode = $application->run(new ArrayInput([]), new NullOutput()); - - $this->assertSame(4, $exitCode, '->run() returns integer exit code extracted from raised exception'); - } - - public function testRunDispatchesIntegerExitCode() - { - $passedRightValue = false; - - // We can assume here that some other test asserts that the event is dispatched at all - $dispatcher = new EventDispatcher(); - $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use (&$passedRightValue) { - $passedRightValue = (4 === $event->getExitCode()); - }); - - $application = new Application(); - $application->setDispatcher($dispatcher); - $application->setAutoExit(false); - - $application->register('test')->setCode(function (InputInterface $input, OutputInterface $output) { - throw new \Exception('', 4); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'test']); - - $this->assertTrue($passedRightValue, '-> exit code 4 was passed in the console.terminate event'); - } - - public function testRunReturnsExitCodeOneForExceptionCodeZero() - { - $exception = new \Exception('', 0); - - $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['doRun'])->getMock(); - $application->setAutoExit(false); - $application->expects($this->once()) - ->method('doRun') - ->willThrowException($exception); - - $exitCode = $application->run(new ArrayInput([]), new NullOutput()); - - $this->assertSame(1, $exitCode, '->run() returns exit code 1 when exception code is 0'); - } - - public function testRunDispatchesExitCodeOneForExceptionCodeZero() - { - $passedRightValue = false; - - // We can assume here that some other test asserts that the event is dispatched at all - $dispatcher = new EventDispatcher(); - $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use (&$passedRightValue) { - $passedRightValue = (1 === $event->getExitCode()); - }); - - $application = new Application(); - $application->setDispatcher($dispatcher); - $application->setAutoExit(false); - - $application->register('test')->setCode(function (InputInterface $input, OutputInterface $output) { - throw new \Exception(); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'test']); - - $this->assertTrue($passedRightValue, '-> exit code 1 was passed in the console.terminate event'); - } - - public function testAddingOptionWithDuplicateShortcut() - { - $this->expectException('LogicException'); - $this->expectExceptionMessage('An option with shortcut "e" already exists.'); - $dispatcher = new EventDispatcher(); - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $application->setDispatcher($dispatcher); - - $application->getDefinition()->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'Environment')); - - $application - ->register('foo') - ->setAliases(['f']) - ->setDefinition([new InputOption('survey', 'e', InputOption::VALUE_REQUIRED, 'My option with a shortcut.')]) - ->setCode(function (InputInterface $input, OutputInterface $output) {}) - ; - - $input = new ArrayInput(['command' => 'foo']); - $output = new NullOutput(); - - $application->run($input, $output); - } - - /** - * @dataProvider getAddingAlreadySetDefinitionElementData - */ - public function testAddingAlreadySetDefinitionElementData($def) - { - $this->expectException('LogicException'); - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $application - ->register('foo') - ->setDefinition([$def]) - ->setCode(function (InputInterface $input, OutputInterface $output) {}) - ; - - $input = new ArrayInput(['command' => 'foo']); - $output = new NullOutput(); - $application->run($input, $output); - } - - public function getAddingAlreadySetDefinitionElementData() - { - return [ - [new InputArgument('command', InputArgument::REQUIRED)], - [new InputOption('quiet', '', InputOption::VALUE_NONE)], - [new InputOption('query', 'q', InputOption::VALUE_NONE)], - ]; - } - - public function testGetDefaultHelperSetReturnsDefaultValues() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $helperSet = $application->getHelperSet(); - - $this->assertTrue($helperSet->has('formatter')); - } - - public function testAddingSingleHelperSetOverwritesDefaultValues() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $application->setHelperSet(new HelperSet([new FormatterHelper()])); - - $helperSet = $application->getHelperSet(); - - $this->assertTrue($helperSet->has('formatter')); - - // no other default helper set should be returned - $this->assertFalse($helperSet->has('dialog')); - $this->assertFalse($helperSet->has('progress')); - } - - public function testOverwritingDefaultHelperSetOverwritesDefaultValues() - { - $application = new CustomApplication(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $application->setHelperSet(new HelperSet([new FormatterHelper()])); - - $helperSet = $application->getHelperSet(); - - $this->assertTrue($helperSet->has('formatter')); - - // no other default helper set should be returned - $this->assertFalse($helperSet->has('dialog')); - $this->assertFalse($helperSet->has('progress')); - } - - public function testGetDefaultInputDefinitionReturnsDefaultValues() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $inputDefinition = $application->getDefinition(); - - $this->assertTrue($inputDefinition->hasArgument('command')); - - $this->assertTrue($inputDefinition->hasOption('help')); - $this->assertTrue($inputDefinition->hasOption('quiet')); - $this->assertTrue($inputDefinition->hasOption('verbose')); - $this->assertTrue($inputDefinition->hasOption('version')); - $this->assertTrue($inputDefinition->hasOption('ansi')); - $this->assertTrue($inputDefinition->hasOption('no-ansi')); - $this->assertTrue($inputDefinition->hasOption('no-interaction')); - } - - public function testOverwritingDefaultInputDefinitionOverwritesDefaultValues() - { - $application = new CustomApplication(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $inputDefinition = $application->getDefinition(); - - // check whether the default arguments and options are not returned any more - $this->assertFalse($inputDefinition->hasArgument('command')); - - $this->assertFalse($inputDefinition->hasOption('help')); - $this->assertFalse($inputDefinition->hasOption('quiet')); - $this->assertFalse($inputDefinition->hasOption('verbose')); - $this->assertFalse($inputDefinition->hasOption('version')); - $this->assertFalse($inputDefinition->hasOption('ansi')); - $this->assertFalse($inputDefinition->hasOption('no-ansi')); - $this->assertFalse($inputDefinition->hasOption('no-interaction')); - - $this->assertTrue($inputDefinition->hasOption('custom')); - } - - public function testSettingCustomInputDefinitionOverwritesDefaultValues() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $application->setDefinition(new InputDefinition([new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')])); - - $inputDefinition = $application->getDefinition(); - - // check whether the default arguments and options are not returned any more - $this->assertFalse($inputDefinition->hasArgument('command')); - - $this->assertFalse($inputDefinition->hasOption('help')); - $this->assertFalse($inputDefinition->hasOption('quiet')); - $this->assertFalse($inputDefinition->hasOption('verbose')); - $this->assertFalse($inputDefinition->hasOption('version')); - $this->assertFalse($inputDefinition->hasOption('ansi')); - $this->assertFalse($inputDefinition->hasOption('no-ansi')); - $this->assertFalse($inputDefinition->hasOption('no-interaction')); - - $this->assertTrue($inputDefinition->hasOption('custom')); - } - - public function testRunWithDispatcher() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setDispatcher($this->getDispatcher()); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('foo.'); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'foo']); - $this->assertEquals('before.foo.after.'.PHP_EOL, $tester->getDisplay()); - } - - public function testRunWithExceptionAndDispatcher() - { - $this->expectException('LogicException'); - $this->expectExceptionMessage('error'); - $application = new Application(); - $application->setDispatcher($this->getDispatcher()); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - throw new \RuntimeException('foo'); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'foo']); - } - - public function testRunDispatchesAllEventsWithException() - { - $application = new Application(); - $application->setDispatcher($this->getDispatcher()); - $application->setAutoExit(false); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('foo.'); - - throw new \RuntimeException('foo'); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'foo']); - $this->assertStringContainsString('before.foo.error.after.', $tester->getDisplay()); - } - - public function testRunDispatchesAllEventsWithExceptionInListener() - { - $dispatcher = $this->getDispatcher(); - $dispatcher->addListener('console.command', function () { - throw new \RuntimeException('foo'); - }); - - $application = new Application(); - $application->setDispatcher($dispatcher); - $application->setAutoExit(false); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('foo.'); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'foo']); - $this->assertStringContainsString('before.error.after.', $tester->getDisplay()); - } - - /** - * @requires PHP 7 - */ - public function testRunWithError() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $application->register('dym')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('dym.'); - - throw new \Error('dymerr'); - }); - - $tester = new ApplicationTester($application); - - try { - $tester->run(['command' => 'dym']); - $this->fail('Error expected.'); - } catch (\Error $e) { - $this->assertSame('dymerr', $e->getMessage()); - } - } - - public function testRunAllowsErrorListenersToSilenceTheException() - { - $dispatcher = $this->getDispatcher(); - $dispatcher->addListener('console.error', function (ConsoleErrorEvent $event) { - $event->getOutput()->write('silenced.'); - - $event->setExitCode(0); - }); - - $dispatcher->addListener('console.command', function () { - throw new \RuntimeException('foo'); - }); - - $application = new Application(); - $application->setDispatcher($dispatcher); - $application->setAutoExit(false); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('foo.'); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'foo']); - $this->assertStringContainsString('before.error.silenced.after.', $tester->getDisplay()); - $this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $tester->getStatusCode()); - } - - public function testConsoleErrorEventIsTriggeredOnCommandNotFound() - { - $dispatcher = new EventDispatcher(); - $dispatcher->addListener('console.error', function (ConsoleErrorEvent $event) { - $this->assertNull($event->getCommand()); - $this->assertInstanceOf(CommandNotFoundException::class, $event->getError()); - $event->getOutput()->write('silenced command not found'); - }); - - $application = new Application(); - $application->setDispatcher($dispatcher); - $application->setAutoExit(false); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'unknown']); - $this->assertStringContainsString('silenced command not found', $tester->getDisplay()); - $this->assertEquals(1, $tester->getStatusCode()); - } - - /** - * @group legacy - * @expectedDeprecation The "ConsoleEvents::EXCEPTION" event is deprecated since Symfony 3.3 and will be removed in 4.0. Listen to the "ConsoleEvents::ERROR" event instead. - */ - public function testLegacyExceptionListenersAreStillTriggered() - { - $dispatcher = $this->getDispatcher(); - $dispatcher->addListener('console.exception', function (ConsoleExceptionEvent $event) { - $event->getOutput()->write('caught.'); - - $event->setException(new \RuntimeException('replaced in caught.')); - }); - - $application = new Application(); - $application->setDispatcher($dispatcher); - $application->setAutoExit(false); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - throw new \RuntimeException('foo'); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'foo']); - $this->assertStringContainsString('before.caught.error.after.', $tester->getDisplay()); - $this->assertStringContainsString('replaced in caught.', $tester->getDisplay()); - } - - /** - * @requires PHP 7 - */ - public function testErrorIsRethrownIfNotHandledByConsoleErrorEvent() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $application->setDispatcher(new EventDispatcher()); - - $application->register('dym')->setCode(function (InputInterface $input, OutputInterface $output) { - new \UnknownClass(); - }); - - $tester = new ApplicationTester($application); - - try { - $tester->run(['command' => 'dym']); - $this->fail('->run() should rethrow PHP errors if not handled via ConsoleErrorEvent.'); - } catch (\Error $e) { - $this->assertSame($e->getMessage(), 'Class \'UnknownClass\' not found'); - } - } - - /** - * @requires PHP 7 - */ - public function testRunWithErrorAndDispatcher() - { - $this->expectException('LogicException'); - $this->expectExceptionMessage('error'); - $application = new Application(); - $application->setDispatcher($this->getDispatcher()); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - - $application->register('dym')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('dym.'); - - throw new \Error('dymerr'); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'dym']); - $this->assertStringContainsString('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events'); - } - - /** - * @requires PHP 7 - */ - public function testRunDispatchesAllEventsWithError() - { - $application = new Application(); - $application->setDispatcher($this->getDispatcher()); - $application->setAutoExit(false); - - $application->register('dym')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('dym.'); - - throw new \Error('dymerr'); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'dym']); - $this->assertStringContainsString('before.dym.error.after.', $tester->getDisplay(), 'The PHP Error did not dispached events'); - } - - /** - * @requires PHP 7 - */ - public function testRunWithErrorFailingStatusCode() - { - $application = new Application(); - $application->setDispatcher($this->getDispatcher()); - $application->setAutoExit(false); - - $application->register('dus')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('dus.'); - - throw new \Error('duserr'); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'dus']); - $this->assertSame(1, $tester->getStatusCode(), 'Status code should be 1'); - } - - public function testRunWithDispatcherSkippingCommand() - { - $application = new Application(); - $application->setDispatcher($this->getDispatcher(true)); - $application->setAutoExit(false); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('foo.'); - }); - - $tester = new ApplicationTester($application); - $exitCode = $tester->run(['command' => 'foo']); - $this->assertStringContainsString('before.after.', $tester->getDisplay()); - $this->assertEquals(ConsoleCommandEvent::RETURN_CODE_DISABLED, $exitCode); - } - - public function testRunWithDispatcherAccessingInputOptions() - { - $noInteractionValue = null; - $quietValue = null; - - $dispatcher = $this->getDispatcher(); - $dispatcher->addListener('console.command', function (ConsoleCommandEvent $event) use (&$noInteractionValue, &$quietValue) { - $input = $event->getInput(); - - $noInteractionValue = $input->getOption('no-interaction'); - $quietValue = $input->getOption('quiet'); - }); - - $application = new Application(); - $application->setDispatcher($dispatcher); - $application->setAutoExit(false); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('foo.'); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'foo', '--no-interaction' => true]); - - $this->assertTrue($noInteractionValue); - $this->assertFalse($quietValue); - } - - public function testRunWithDispatcherAddingInputOptions() - { - $extraValue = null; - - $dispatcher = $this->getDispatcher(); - $dispatcher->addListener('console.command', function (ConsoleCommandEvent $event) use (&$extraValue) { - $definition = $event->getCommand()->getDefinition(); - $input = $event->getInput(); - - $definition->addOption(new InputOption('extra', null, InputOption::VALUE_REQUIRED)); - $input->bind($definition); - - $extraValue = $input->getOption('extra'); - }); - - $application = new Application(); - $application->setDispatcher($dispatcher); - $application->setAutoExit(false); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - $output->write('foo.'); - }); - - $tester = new ApplicationTester($application); - $tester->run(['command' => 'foo', '--extra' => 'some test value']); - - $this->assertEquals('some test value', $extraValue); - } - - /** - * @group legacy - */ - public function testTerminalDimensions() - { - $application = new Application(); - $originalDimensions = $application->getTerminalDimensions(); - $this->assertCount(2, $originalDimensions); - - $width = 80; - if ($originalDimensions[0] == $width) { - $width = 100; - } - - $application->setTerminalDimensions($width, 80); - $this->assertSame([$width, 80], $application->getTerminalDimensions()); - } - - public function testSetRunCustomDefaultCommand() - { - $command = new \FooCommand(); - - $application = new Application(); - $application->setAutoExit(false); - $application->add($command); - $application->setDefaultCommand($command->getName()); - - $tester = new ApplicationTester($application); - $tester->run([], ['interactive' => false]); - $this->assertEquals('called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); - - $application = new CustomDefaultCommandApplication(); - $application->setAutoExit(false); - - $tester = new ApplicationTester($application); - $tester->run([], ['interactive' => false]); - - $this->assertEquals('called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); - } - - public function testSetRunCustomDefaultCommandWithOption() - { - $command = new \FooOptCommand(); - - $application = new Application(); - $application->setAutoExit(false); - $application->add($command); - $application->setDefaultCommand($command->getName()); - - $tester = new ApplicationTester($application); - $tester->run(['--fooopt' => 'opt'], ['interactive' => false]); - - $this->assertEquals('called'.PHP_EOL.'opt'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command'); - } - - public function testSetRunCustomSingleCommand() - { - $command = new \FooCommand(); - - $application = new Application(); - $application->setAutoExit(false); - $application->add($command); - $application->setDefaultCommand($command->getName(), true); - - $tester = new ApplicationTester($application); - - $tester->run([]); - $this->assertStringContainsString('called', $tester->getDisplay()); - - $tester->run(['--help' => true]); - $this->assertStringContainsString('The foo:bar command', $tester->getDisplay()); - } - - public function testRunLazyCommandService() - { - $container = new ContainerBuilder(); - $container->addCompilerPass(new AddConsoleCommandPass()); - $container - ->register('lazy-command', LazyCommand::class) - ->addTag('console.command', ['command' => 'lazy:command']) - ->addTag('console.command', ['command' => 'lazy:alias']) - ->addTag('console.command', ['command' => 'lazy:alias2']); - $container->compile(); - - $application = new Application(); - $application->setCommandLoader($container->get('console.command_loader')); - $application->setAutoExit(false); - - $tester = new ApplicationTester($application); - - $tester->run(['command' => 'lazy:command']); - $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); - - $tester->run(['command' => 'lazy:alias']); - $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); - - $tester->run(['command' => 'lazy:alias2']); - $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); - - $command = $application->get('lazy:command'); - $this->assertSame(['lazy:alias', 'lazy:alias2'], $command->getAliases()); - } - - public function testGetDisabledLazyCommand() - { - $this->expectException('Symfony\Component\Console\Exception\CommandNotFoundException'); - $application = new Application(); - $application->setCommandLoader(new FactoryCommandLoader(['disabled' => function () { return new DisabledCommand(); }])); - $application->get('disabled'); - } - - public function testHasReturnsFalseForDisabledLazyCommand() - { - $application = new Application(); - $application->setCommandLoader(new FactoryCommandLoader(['disabled' => function () { return new DisabledCommand(); }])); - $this->assertFalse($application->has('disabled')); - } - - public function testAllExcludesDisabledLazyCommand() - { - $application = new Application(); - $application->setCommandLoader(new FactoryCommandLoader(['disabled' => function () { return new DisabledCommand(); }])); - $this->assertArrayNotHasKey('disabled', $application->all()); - } - - protected function getDispatcher($skipCommand = false) - { - $dispatcher = new EventDispatcher(); - $dispatcher->addListener('console.command', function (ConsoleCommandEvent $event) use ($skipCommand) { - $event->getOutput()->write('before.'); - - if ($skipCommand) { - $event->disableCommand(); - } - }); - $dispatcher->addListener('console.terminate', function (ConsoleTerminateEvent $event) use ($skipCommand) { - $event->getOutput()->writeln('after.'); - - if (!$skipCommand) { - $event->setExitCode(ConsoleCommandEvent::RETURN_CODE_DISABLED); - } - }); - $dispatcher->addListener('console.error', function (ConsoleErrorEvent $event) { - $event->getOutput()->write('error.'); - - $event->setError(new \LogicException('error.', $event->getExitCode(), $event->getError())); - }); - - return $dispatcher; - } - - /** - * @requires PHP 7 - */ - public function testErrorIsRethrownIfNotHandledByConsoleErrorEventWithCatchingEnabled() - { - $application = new Application(); - $application->setAutoExit(false); - $application->setDispatcher(new EventDispatcher()); - - $application->register('dym')->setCode(function (InputInterface $input, OutputInterface $output) { - new \UnknownClass(); - }); - - $tester = new ApplicationTester($application); - - try { - $tester->run(['command' => 'dym']); - $this->fail('->run() should rethrow PHP errors if not handled via ConsoleErrorEvent.'); - } catch (\Error $e) { - $this->assertSame($e->getMessage(), 'Class \'UnknownClass\' not found'); - } - } -} - -class CustomApplication extends Application -{ - /** - * Overwrites the default input definition. - * - * @return InputDefinition An InputDefinition instance - */ - protected function getDefaultInputDefinition() - { - return new InputDefinition([new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.')]); - } - - /** - * Gets the default helper set with the helpers that should always be available. - * - * @return HelperSet A HelperSet instance - */ - protected function getDefaultHelperSet() - { - return new HelperSet([new FormatterHelper()]); - } -} - -class CustomDefaultCommandApplication extends Application -{ - /** - * Overwrites the constructor in order to set a different default command. - */ - public function __construct() - { - parent::__construct(); - - $command = new \FooCommand(); - $this->add($command); - $this->setDefaultCommand($command->getName()); - } -} - -class LazyCommand extends Command -{ - public function execute(InputInterface $input, OutputInterface $output) - { - $output->writeln('lazy-command called'); - } -} - -class DisabledCommand extends Command -{ - public function isEnabled() - { - return false; - } -} diff --git a/lib/symfony/console/Tests/Command/CommandTest.php b/lib/symfony/console/Tests/Command/CommandTest.php deleted file mode 100644 index 207302fdf..000000000 --- a/lib/symfony/console/Tests/Command/CommandTest.php +++ /dev/null @@ -1,430 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Command; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Helper\FormatterHelper; -use Symfony\Component\Console\Input\InputArgument; -use Symfony\Component\Console\Input\InputDefinition; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\StringInput; -use Symfony\Component\Console\Output\NullOutput; -use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Tester\CommandTester; - -class CommandTest extends TestCase -{ - protected static $fixturesPath; - - public static function setUpBeforeClass() - { - self::$fixturesPath = __DIR__.'/../Fixtures/'; - require_once self::$fixturesPath.'/TestCommand.php'; - } - - public function testConstructor() - { - $command = new Command('foo:bar'); - $this->assertEquals('foo:bar', $command->getName(), '__construct() takes the command name as its first argument'); - } - - public function testCommandNameCannotBeEmpty() - { - $this->expectException('LogicException'); - $this->expectExceptionMessage('The command defined in "Symfony\Component\Console\Command\Command" cannot have an empty name.'); - (new Application())->add(new Command()); - } - - public function testSetApplication() - { - $application = new Application(); - $command = new \TestCommand(); - $command->setApplication($application); - $this->assertEquals($application, $command->getApplication(), '->setApplication() sets the current application'); - $this->assertEquals($application->getHelperSet(), $command->getHelperSet()); - } - - public function testSetApplicationNull() - { - $command = new \TestCommand(); - $command->setApplication(null); - $this->assertNull($command->getHelperSet()); - } - - public function testSetGetDefinition() - { - $command = new \TestCommand(); - $ret = $command->setDefinition($definition = new InputDefinition()); - $this->assertEquals($command, $ret, '->setDefinition() implements a fluent interface'); - $this->assertEquals($definition, $command->getDefinition(), '->setDefinition() sets the current InputDefinition instance'); - $command->setDefinition([new InputArgument('foo'), new InputOption('bar')]); - $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->setDefinition() also takes an array of InputArguments and InputOptions as an argument'); - $this->assertTrue($command->getDefinition()->hasOption('bar'), '->setDefinition() also takes an array of InputArguments and InputOptions as an argument'); - $command->setDefinition(new InputDefinition()); - } - - public function testAddArgument() - { - $command = new \TestCommand(); - $ret = $command->addArgument('foo'); - $this->assertEquals($command, $ret, '->addArgument() implements a fluent interface'); - $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->addArgument() adds an argument to the command'); - } - - public function testAddOption() - { - $command = new \TestCommand(); - $ret = $command->addOption('foo'); - $this->assertEquals($command, $ret, '->addOption() implements a fluent interface'); - $this->assertTrue($command->getDefinition()->hasOption('foo'), '->addOption() adds an option to the command'); - } - - public function testSetHidden() - { - $command = new \TestCommand(); - $command->setHidden(true); - $this->assertTrue($command->isHidden()); - } - - public function testGetNamespaceGetNameSetName() - { - $command = new \TestCommand(); - $this->assertEquals('namespace:name', $command->getName(), '->getName() returns the command name'); - $command->setName('foo'); - $this->assertEquals('foo', $command->getName(), '->setName() sets the command name'); - - $ret = $command->setName('foobar:bar'); - $this->assertEquals($command, $ret, '->setName() implements a fluent interface'); - $this->assertEquals('foobar:bar', $command->getName(), '->setName() sets the command name'); - } - - /** - * @dataProvider provideInvalidCommandNames - */ - public function testInvalidCommandNames($name) - { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage(sprintf('Command name "%s" is invalid.', $name)); - - $command = new \TestCommand(); - $command->setName($name); - } - - public function provideInvalidCommandNames() - { - return [ - [''], - ['foo:'], - ]; - } - - public function testGetSetDescription() - { - $command = new \TestCommand(); - $this->assertEquals('description', $command->getDescription(), '->getDescription() returns the description'); - $ret = $command->setDescription('description1'); - $this->assertEquals($command, $ret, '->setDescription() implements a fluent interface'); - $this->assertEquals('description1', $command->getDescription(), '->setDescription() sets the description'); - } - - public function testGetSetHelp() - { - $command = new \TestCommand(); - $this->assertEquals('help', $command->getHelp(), '->getHelp() returns the help'); - $ret = $command->setHelp('help1'); - $this->assertEquals($command, $ret, '->setHelp() implements a fluent interface'); - $this->assertEquals('help1', $command->getHelp(), '->setHelp() sets the help'); - $command->setHelp(''); - $this->assertEquals('', $command->getHelp(), '->getHelp() does not fall back to the description'); - } - - public function testGetProcessedHelp() - { - $command = new \TestCommand(); - $command->setHelp('The %command.name% command does... Example: php %command.full_name%.'); - $this->assertStringContainsString('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly'); - $this->assertStringNotContainsString('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name%'); - - $command = new \TestCommand(); - $command->setHelp(''); - $this->assertStringContainsString('description', $command->getProcessedHelp(), '->getProcessedHelp() falls back to the description'); - - $command = new \TestCommand(); - $command->setHelp('The %command.name% command does... Example: php %command.full_name%.'); - $application = new Application(); - $application->add($command); - $application->setDefaultCommand('namespace:name', true); - $this->assertStringContainsString('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly in single command applications'); - $this->assertStringNotContainsString('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name% in single command applications'); - } - - public function testGetSetAliases() - { - $command = new \TestCommand(); - $this->assertEquals(['name'], $command->getAliases(), '->getAliases() returns the aliases'); - $ret = $command->setAliases(['name1']); - $this->assertEquals($command, $ret, '->setAliases() implements a fluent interface'); - $this->assertEquals(['name1'], $command->getAliases(), '->setAliases() sets the aliases'); - } - - public function testSetAliasesNull() - { - $command = new \TestCommand(); - $this->expectException('InvalidArgumentException'); - $command->setAliases(null); - } - - public function testGetSynopsis() - { - $command = new \TestCommand(); - $command->addOption('foo'); - $command->addArgument('bar'); - $this->assertEquals('namespace:name [--foo] [--] []', $command->getSynopsis(), '->getSynopsis() returns the synopsis'); - } - - public function testAddGetUsages() - { - $command = new \TestCommand(); - $command->addUsage('foo1'); - $command->addUsage('foo2'); - $this->assertContains('namespace:name foo1', $command->getUsages()); - $this->assertContains('namespace:name foo2', $command->getUsages()); - } - - public function testGetHelper() - { - $application = new Application(); - $command = new \TestCommand(); - $command->setApplication($application); - $formatterHelper = new FormatterHelper(); - $this->assertEquals($formatterHelper->getName(), $command->getHelper('formatter')->getName(), '->getHelper() returns the correct helper'); - } - - public function testGetHelperWithoutHelperSet() - { - $this->expectException('LogicException'); - $this->expectExceptionMessage('Cannot retrieve helper "formatter" because there is no HelperSet defined.'); - $command = new \TestCommand(); - $command->getHelper('formatter'); - } - - public function testMergeApplicationDefinition() - { - $application1 = new Application(); - $application1->getDefinition()->addArguments([new InputArgument('foo')]); - $application1->getDefinition()->addOptions([new InputOption('bar')]); - $command = new \TestCommand(); - $command->setApplication($application1); - $command->setDefinition($definition = new InputDefinition([new InputArgument('bar'), new InputOption('foo')])); - - $r = new \ReflectionObject($command); - $m = $r->getMethod('mergeApplicationDefinition'); - $m->setAccessible(true); - $m->invoke($command); - $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->mergeApplicationDefinition() merges the application arguments and the command arguments'); - $this->assertTrue($command->getDefinition()->hasArgument('bar'), '->mergeApplicationDefinition() merges the application arguments and the command arguments'); - $this->assertTrue($command->getDefinition()->hasOption('foo'), '->mergeApplicationDefinition() merges the application options and the command options'); - $this->assertTrue($command->getDefinition()->hasOption('bar'), '->mergeApplicationDefinition() merges the application options and the command options'); - - $m->invoke($command); - $this->assertEquals(3, $command->getDefinition()->getArgumentCount(), '->mergeApplicationDefinition() does not try to merge twice the application arguments and options'); - } - - public function testMergeApplicationDefinitionWithoutArgsThenWithArgsAddsArgs() - { - $application1 = new Application(); - $application1->getDefinition()->addArguments([new InputArgument('foo')]); - $application1->getDefinition()->addOptions([new InputOption('bar')]); - $command = new \TestCommand(); - $command->setApplication($application1); - $command->setDefinition($definition = new InputDefinition([])); - - $r = new \ReflectionObject($command); - $m = $r->getMethod('mergeApplicationDefinition'); - $m->setAccessible(true); - $m->invoke($command, false); - $this->assertTrue($command->getDefinition()->hasOption('bar'), '->mergeApplicationDefinition(false) merges the application and the command options'); - $this->assertFalse($command->getDefinition()->hasArgument('foo'), '->mergeApplicationDefinition(false) does not merge the application arguments'); - - $m->invoke($command, true); - $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->mergeApplicationDefinition(true) merges the application arguments and the command arguments'); - - $m->invoke($command); - $this->assertEquals(2, $command->getDefinition()->getArgumentCount(), '->mergeApplicationDefinition() does not try to merge twice the application arguments'); - } - - public function testRunInteractive() - { - $tester = new CommandTester(new \TestCommand()); - - $tester->execute([], ['interactive' => true]); - - $this->assertEquals('interact called'.PHP_EOL.'execute called'.PHP_EOL, $tester->getDisplay(), '->run() calls the interact() method if the input is interactive'); - } - - public function testRunNonInteractive() - { - $tester = new CommandTester(new \TestCommand()); - - $tester->execute([], ['interactive' => false]); - - $this->assertEquals('execute called'.PHP_EOL, $tester->getDisplay(), '->run() does not call the interact() method if the input is not interactive'); - } - - public function testExecuteMethodNeedsToBeOverridden() - { - $this->expectException('LogicException'); - $this->expectExceptionMessage('You must override the execute() method in the concrete command class.'); - $command = new Command('foo'); - $command->run(new StringInput(''), new NullOutput()); - } - - public function testRunWithInvalidOption() - { - $this->expectException('Symfony\Component\Console\Exception\InvalidOptionException'); - $this->expectExceptionMessage('The "--bar" option does not exist.'); - $command = new \TestCommand(); - $tester = new CommandTester($command); - $tester->execute(['--bar' => true]); - } - - public function testRunReturnsIntegerExitCode() - { - $command = new \TestCommand(); - $exitCode = $command->run(new StringInput(''), new NullOutput()); - $this->assertSame(0, $exitCode, '->run() returns integer exit code (treats null as 0)'); - - $command = $this->getMockBuilder('TestCommand')->setMethods(['execute'])->getMock(); - $command->expects($this->once()) - ->method('execute') - ->willReturn('2.3'); - $exitCode = $command->run(new StringInput(''), new NullOutput()); - $this->assertSame(2, $exitCode, '->run() returns integer exit code (casts numeric to int)'); - } - - public function testRunWithApplication() - { - $command = new \TestCommand(); - $command->setApplication(new Application()); - $exitCode = $command->run(new StringInput(''), new NullOutput()); - - $this->assertSame(0, $exitCode, '->run() returns an integer exit code'); - } - - public function testRunReturnsAlwaysInteger() - { - $command = new \TestCommand(); - - $this->assertSame(0, $command->run(new StringInput(''), new NullOutput())); - } - - public function testRunWithProcessTitle() - { - $command = new \TestCommand(); - $command->setApplication(new Application()); - $command->setProcessTitle('foo'); - $this->assertSame(0, $command->run(new StringInput(''), new NullOutput())); - if (\function_exists('cli_set_process_title')) { - if (null === @cli_get_process_title() && 'Darwin' === PHP_OS) { - $this->markTestSkipped('Running "cli_get_process_title" as an unprivileged user is not supported on MacOS.'); - } - $this->assertEquals('foo', cli_get_process_title()); - } - } - - public function testSetCode() - { - $command = new \TestCommand(); - $ret = $command->setCode(function (InputInterface $input, OutputInterface $output) { - $output->writeln('from the code...'); - }); - $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); - $tester = new CommandTester($command); - $tester->execute([]); - $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); - } - - public function getSetCodeBindToClosureTests() - { - return [ - [true, 'not bound to the command'], - [false, 'bound to the command'], - ]; - } - - /** - * @dataProvider getSetCodeBindToClosureTests - */ - public function testSetCodeBindToClosure($previouslyBound, $expected) - { - $code = createClosure(); - if ($previouslyBound) { - $code = $code->bindTo($this); - } - - $command = new \TestCommand(); - $command->setCode($code); - $tester = new CommandTester($command); - $tester->execute([]); - $this->assertEquals('interact called'.PHP_EOL.$expected.PHP_EOL, $tester->getDisplay()); - } - - public function testSetCodeWithStaticClosure() - { - $command = new \TestCommand(); - $command->setCode(self::createClosure()); - $tester = new CommandTester($command); - $tester->execute([]); - - if (\PHP_VERSION_ID < 70000) { - // Cannot bind static closures in PHP 5 - $this->assertEquals('interact called'.PHP_EOL.'not bound'.PHP_EOL, $tester->getDisplay()); - } else { - // Can bind static closures in PHP 7 - $this->assertEquals('interact called'.PHP_EOL.'bound'.PHP_EOL, $tester->getDisplay()); - } - } - - private static function createClosure() - { - return function (InputInterface $input, OutputInterface $output) { - $output->writeln(isset($this) ? 'bound' : 'not bound'); - }; - } - - public function testSetCodeWithNonClosureCallable() - { - $command = new \TestCommand(); - $ret = $command->setCode([$this, 'callableMethodCommand']); - $this->assertEquals($command, $ret, '->setCode() implements a fluent interface'); - $tester = new CommandTester($command); - $tester->execute([]); - $this->assertEquals('interact called'.PHP_EOL.'from the code...'.PHP_EOL, $tester->getDisplay()); - } - - public function callableMethodCommand(InputInterface $input, OutputInterface $output) - { - $output->writeln('from the code...'); - } -} - -// In order to get an unbound closure, we should create it outside a class -// scope. -function createClosure() -{ - return function (InputInterface $input, OutputInterface $output) { - $output->writeln($this instanceof Command ? 'bound to the command' : 'not bound to the command'); - }; -} diff --git a/lib/symfony/console/Tests/Command/HelpCommandTest.php b/lib/symfony/console/Tests/Command/HelpCommandTest.php deleted file mode 100644 index 5b25550a6..000000000 --- a/lib/symfony/console/Tests/Command/HelpCommandTest.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Command; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Command\HelpCommand; -use Symfony\Component\Console\Command\ListCommand; -use Symfony\Component\Console\Tester\CommandTester; - -class HelpCommandTest extends TestCase -{ - public function testExecuteForCommandAlias() - { - $command = new HelpCommand(); - $command->setApplication(new Application()); - $commandTester = new CommandTester($command); - $commandTester->execute(['command_name' => 'li'], ['decorated' => false]); - $this->assertStringContainsString('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); - $this->assertStringContainsString('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); - $this->assertStringContainsString('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command alias'); - } - - public function testExecuteForCommand() - { - $command = new HelpCommand(); - $commandTester = new CommandTester($command); - $command->setCommand(new ListCommand()); - $commandTester->execute([], ['decorated' => false]); - $this->assertStringContainsString('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - $this->assertStringContainsString('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - $this->assertStringContainsString('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - } - - public function testExecuteForCommandWithXmlOption() - { - $command = new HelpCommand(); - $commandTester = new CommandTester($command); - $command->setCommand(new ListCommand()); - $commandTester->execute(['--format' => 'xml']); - $this->assertStringContainsString('getDisplay(), '->execute() returns an XML help text if --xml is passed'); - } - - public function testExecuteForApplicationCommand() - { - $application = new Application(); - $commandTester = new CommandTester($application->get('help')); - $commandTester->execute(['command_name' => 'list']); - $this->assertStringContainsString('list [options] [--] []', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - $this->assertStringContainsString('format=FORMAT', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - $this->assertStringContainsString('raw', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - } - - public function testExecuteForApplicationCommandWithXmlOption() - { - $application = new Application(); - $commandTester = new CommandTester($application->get('help')); - $commandTester->execute(['command_name' => 'list', '--format' => 'xml']); - $this->assertStringContainsString('list [--raw] [--format FORMAT] [--] [<namespace>]', $commandTester->getDisplay(), '->execute() returns a text help for the given command'); - $this->assertStringContainsString('getDisplay(), '->execute() returns an XML help text if --format=xml is passed'); - } -} diff --git a/lib/symfony/console/Tests/Command/ListCommandTest.php b/lib/symfony/console/Tests/Command/ListCommandTest.php deleted file mode 100644 index 57687d4c6..000000000 --- a/lib/symfony/console/Tests/Command/ListCommandTest.php +++ /dev/null @@ -1,113 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Tests\Command; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\Console\Application; -use Symfony\Component\Console\Tester\CommandTester; - -class ListCommandTest extends TestCase -{ - public function testExecuteListsCommands() - { - $application = new Application(); - $commandTester = new CommandTester($command = $application->get('list')); - $commandTester->execute(['command' => $command->getName()], ['decorated' => false]); - - $this->assertRegExp('/help\s{2,}Displays help for a command/', $commandTester->getDisplay(), '->execute() returns a list of available commands'); - } - - public function testExecuteListsCommandsWithXmlOption() - { - $application = new Application(); - $commandTester = new CommandTester($command = $application->get('list')); - $commandTester->execute(['command' => $command->getName(), '--format' => 'xml']); - $this->assertRegExp('/