Changeset 3849

Show
Ignore:
Timestamp:
02/20/08 01:30:50 (17 months ago)
Author:
jwage
Message:

Fixed incorrect test case and issue with DQL params.

Location:
branches/0.10
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/0.10/lib/Doctrine/Task/Dql.php

    r3830 r3849  
    4747 
    4848        $params = $this->getArgument('params'); 
    49         $params = $params ? explode(',', $params):null; 
     49        $params = $params ? explode(',', $params):array(); 
    5050 
    5151        $this->notify('executing: "' . $dql . '" (' . implode(', ', $params) . ')'); 
    5252 
    53         $results = $query->query($dql); 
     53        $results = $query->query($dql, $params, Doctrine::HYDRATE_ARRAY); 
    5454 
    5555        $this->_printResults($results); 
    5656    } 
    5757 
    58     protected function _printResults($data) 
     58    protected function _printResults($array) 
    5959    { 
    60         $array = $data->toArray(true); 
    61  
    6260        $yaml = Doctrine_Parser::dump($array, 'yml'); 
    6361        $lines = explode("\n", $yaml); 
    6462 
    6563        unset($lines[0]); 
    66         $lines[1] = $data->getTable()->getOption('name') . ':'; 
    6764 
    6865        foreach ($lines as $yamlLine) { 
  • branches/0.10/tests/Import/MssqlTestCase.php

    r2388 r3849  
    5050        $this->import->listTables(); 
    5151         
    52         $this->assertEqual($this->adapter->pop(), "SELECT name FROM sysobjects WHERE type = 'U' ORDER BY name"); 
     52        $this->assertEqual($this->adapter->pop(), "SELECT name FROM sysobjects WHERE type = 'U' AND name <> 'dtproperties' ORDER BY name"); 
    5353    } 
    5454    public function testListTriggersExecutesSql()