From b0f6a19e93bb4c6a37fcc1a0336e0a034e5124d2 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 26 Feb 2015 09:55:18 +0000 Subject: [PATCH 1/4] [FrameworkBundle] Remove a legacy test. --- .../DependencyInjection/ConfigurationTest.php | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php index 1cef379eeb5e7..83b8a95602828 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -86,27 +86,6 @@ public function testInvalidValueTrustedProxies() )); } - /** - * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException - * @expectedExceptionMessage You cannot use assets settings under "framework.templating" and "assets" configurations in the same project. - */ - public function testLegacyInvalidValueAssets() - { - $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); - - $processor = new Processor(); - $configuration = new Configuration(true); - $processor->processConfiguration($configuration, array( - array( - 'templating' => array( - 'engines' => null, - 'assets_base_urls' => '//example.com', - ), - 'assets' => null, - ), - )); - } - protected static function getBundleDefaultConfig() { return array( From 4c26875a32dadf24cf00fb3ae0f274aec044651a Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 26 Feb 2015 10:02:40 +0000 Subject: [PATCH 2/4] [FrameworkBundle] Fix a default config test case and add a new one for enabling assets. --- .../DependencyInjection/ConfigurationTest.php | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php index 83b8a95602828..c680afd887581 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -86,6 +86,23 @@ public function testInvalidValueTrustedProxies() )); } + public function testAssetsCanBeEnabled() + { + $processor = new Processor(); + $configuration = new Configuration(true); + $config = $processor->processConfiguration($configuration, array(array('assets' => null))); + + $defaultConfig = array( + 'version' => null, + 'version_format' => '%%s?%%s', + 'base_path' => '', + 'base_urls' => array(), + 'packages' => array(), + ); + + $this->assertEquals($defaultConfig, $config['assets']); + } + protected static function getBundleDefaultConfig() { return array( @@ -145,13 +162,6 @@ protected static function getBundleDefaultConfig() 'magic_call' => false, 'throw_exception_on_invalid_index' => false, ), - 'assets' => array( - 'version' => null, - 'version_format' => '%%s?%%s', - 'base_path' => '', - 'base_urls' => array(), - 'packages' => array(), - ), ); } } From 494e300fbeac9376c23f52bbfd1d3c6e168363bf Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 26 Feb 2015 10:16:14 +0000 Subject: [PATCH 3/4] [SecurityBundle] Enable assets in functional tests. --- .../SecurityBundle/Tests/Functional/app/config/framework.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/framework.yml b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/framework.yml index c6a50bdac96d5..43961a1aeb322 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/framework.yml +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/config/framework.yml @@ -4,6 +4,7 @@ framework: enabled: true router: { resource: "%kernel.root_dir%/%kernel.test_case%/routing.yml" } validation: { enabled: true, enable_annotations: true } + assets: ~ form: ~ test: ~ default_locale: en From 5007b413aa6148660c5a8e9d65ce9a4b054a9041 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Thu, 26 Feb 2015 10:33:40 +0000 Subject: [PATCH 4/4] [Form] Replace use of bind() with submit() in a test. --- src/Symfony/Component/Form/Tests/SimpleFormTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Form/Tests/SimpleFormTest.php b/src/Symfony/Component/Form/Tests/SimpleFormTest.php index 4d5fb22808ada..7b4892a69ae4f 100644 --- a/src/Symfony/Component/Form/Tests/SimpleFormTest.php +++ b/src/Symfony/Component/Form/Tests/SimpleFormTest.php @@ -134,7 +134,7 @@ public function testFalseIsConvertedToNull() $config->addEventListener(FormEvents::PRE_SUBMIT, array($mock, 'preSubmit')); $form = new Form($config); - $form->bind(false); + $form->submit(false); $this->assertTrue($form->isValid()); $this->assertNull($form->getData());