8000 [FrameworkBundle] Update assets configuration tests by jakzal · Pull Request #13800 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Update assets configuration tests #13800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 26, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,25 +86,21 @@ 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()
public function testAssetsCanBeEnabled()
{
$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,
),
));
$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()
Expand Down Expand Up @@ -166,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(),
),
);
}
}
B732
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Form/Tests/SimpleFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
0