Changeset 32463
- Timestamp:
- 04/12/11 11:15:05 (2 years ago)
- Files:
-
- branches/2.0/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php (modified) (1 diff)
- branches/2.0/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle (added)
- branches/2.0/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources (added)
- branches/2.0/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config (added)
- branches/2.0/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/validation.xml (added)
- branches/2.0/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/Resources/config/validation.yml (added)
- branches/2.0/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/TestBundle/TestBundle.php (added)
- branches/2.0/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php (modified) (2 diffs)
- branches/2.0/src/Symfony/Component/Process/Process.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.0/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
r32455 r32463 525 525 $reflection = new \ReflectionClass($bundle); 526 526 if (file_exists($file = dirname($reflection->getFilename()).'/Resources/config/validation.yml')) { 527 $ yamlMappingFiles[] = realpath($file);527 $files[] = realpath($file); 528 528 $container->addResource(new FileResource($file)); 529 529 } branches/2.0/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
r32440 r32463 180 180 } 181 181 182 protected function createContainer() 183 { 184 return new ContainerBuilder(new ParameterBag(array( 182 public function testValidationPaths() 183 { 184 require_once __DIR__ . "/Fixtures/TestBundle/TestBundle.php"; 185 186 $container = $this->createContainerFromFile('validation_annotations', array( 187 'kernel.bundles' => array('TestBundle' => 'Symfony\Bundle\FrameworkBundle\Tests\TestBundle'), 188 )); 189 190 $yamlArgs = $container->getDefinition('validator.mapping.loader.yaml_files_loader')->getArguments(); 191 $this->assertEquals(1, count($yamlArgs[0])); 192 $this->assertStringEndsWith('TestBundle/Resources/config/validation.yml', $yamlArgs[0][0]); 193 194 $xmlArgs = $container->getDefinition('validator.mapping.loader.xml_files_loader')->getArguments(); 195 $this->assertEquals(2, count($xmlArgs[0])); 196 $this->assertStringEndsWith('Component/Form/Resources/config/validation.xml', $xmlArgs[0][0]); 197 $this->assertStringEndsWith('TestBundle/Resources/config/validation.xml', $xmlArgs[0][1]); 198 } 199 200 protected function createContainer(array $data = array()) 201 { 202 return new ContainerBuilder(new ParameterBag(array_merge(array( 185 203 'kernel.bundles' => array('FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle'), 186 204 'kernel.cache_dir' => __DIR__, … … 190 208 'kernel.name' => 'kernel', 191 209 'kernel.root_dir' => __DIR__, 192 ) ));193 } 194 195 protected function createContainerFromFile($file )196 { 197 $container = $this->createContainer( );210 ), $data))); 211 } 212 213 protected function createContainerFromFile($file, $data = array()) 214 { 215 $container = $this->createContainer($data); 198 216 $container->registerExtension(new FrameworkExtension()); 199 217 $this->loadFromFile($container, $file); branches/2.0/src/Symfony/Component/Process/Process.php
r32433 r32463 61 61 $this->stdin = $stdin; 62 62 $this->timeout = $timeout; 63 $this->options = array_merge( $options, array('suppress_errors' => true, 'binary_pipes' => true));63 $this->options = array_merge(array('suppress_errors' => true, 'binary_pipes' => true, 'bypass_shell' => true), $options); 64 64 } 65 65