Development

Changeset 32463

You must first sign up to be able to contribute.

Changeset 32463

Show
Ignore:
Timestamp:
04/12/11 11:15:05 (2 years ago)
Author:
fabien
Message:

Merge branch 'master' of git://github.com/symfony/symfony

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.0/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

    r32455 r32463  
    525525            $reflection = new \ReflectionClass($bundle); 
    526526            if (file_exists($file = dirname($reflection->getFilename()).'/Resources/config/validation.yml')) { 
    527                 $yamlMappingFiles[] = realpath($file); 
     527                $files[] = realpath($file); 
    528528                $container->addResource(new FileResource($file)); 
    529529            } 
  • branches/2.0/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

    r32440 r32463  
    180180    } 
    181181 
    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( 
    185203            'kernel.bundles'          => array('FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle'), 
    186204            'kernel.cache_dir'        => __DIR__, 
     
    190208            'kernel.name'             => 'kernel', 
    191209            '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); 
    198216        $container->registerExtension(new FrameworkExtension()); 
    199217        $this->loadFromFile($container, $file); 
  • branches/2.0/src/Symfony/Component/Process/Process.php

    r32433 r32463  
    6161        $this->stdin = $stdin; 
    6262        $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); 
    6464    } 
    6565