Development

Changeset 32436

You must first sign up to be able to contribute.

Changeset 32436

Show
Ignore:
Timestamp:
04/03/11 22:45:04 (4 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/Component/Console/Tester/CommandTester.php

    r32226 r32436  
    4747     * @param array $input   An array of arguments and options 
    4848     * @param array $options An array of options 
     49     * 
     50     * @return integer The command exit code 
    4951     */ 
    5052    public function execute(array $input, array $options = array()) 
     
    6365        } 
    6466 
    65         $this->command->run($this->input, $this->output); 
     67        $code = $this->command->run($this->input, $this->output); 
    6668 
    6769        rewind($this->output->getStream()); 
    6870 
    69         return $this->display = stream_get_contents($this->output->getStream()); 
     71        $this->display = stream_get_contents($this->output->getStream()); 
     72 
     73        return $code; 
    7074    } 
    7175 
  • branches/2.0/src/Symfony/Component/DomCrawler/Crawler.php

    r32366 r32436  
    239239     * Example: 
    240240     * 
    241      *     $crawler->filter('h1')->each(function ($i, $node
     241     *     $crawler->filter('h1')->each(function ($node, $i
    242242     *     { 
    243243     *       return $node->nodeValue; 
  • branches/2.0/tests/Symfony/Tests/Component/Console/Command/CommandTest.php

    r32226 r32436  
    206206        } 
    207207 
    208         $this->assertEquals('interact called'.PHP_EOL.'execute called'.PHP_EOL, $tester->execute(array(), array('interactive' => true)), '->run() calls the interact() method if the input is interactive'); 
    209         $this->assertEquals('execute called'.PHP_EOL, $tester->execute(array(), array('interactive' => false)), '->run() does not call the interact() method if the input is not interactive'); 
     208        $tester->execute(array(), array('interactive' => true)); 
     209        $this->assertEquals('interact called'.PHP_EOL.'execute called'.PHP_EOL, $tester->getDisplay(), '->run() calls the interact() method if the input is interactive'); 
     210 
     211        $tester->execute(array(), array('interactive' => false)); 
     212        $this->assertEquals('execute called'.PHP_EOL, $tester->getDisplay(), '->run() does not call the interact() method if the input is not interactive'); 
    210213 
    211214        $command = new Command('foo');