Show
Ignore:
Timestamp:
03/18/08 21:29:12 (2 years ago)
Author:
jwage
Message:

Updated tests. Cleaned up some stuff. Uncommented tests and added failing test cases to fix.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.10/tests/Ticket/749TestCase.php

    r3884 r4029  
    4646    public function testSelectDataFromSubclassAsCollection() 
    4747    { 
    48         $records = Doctrine_Query::create()->query(' 
    49             FROM Record749 r ORDER BY r.title                                            
    50         ', array()); 
     48        $records = Doctrine_Query::create()->query('FROM Record749 r ORDER BY r.title', array()); 
    5149         
    5250        $this->verifyRecords($records); 
     
    5553    public function testSelectDataFromParentClassAsCollection() 
    5654    { 
    57         $records = Doctrine_Query::create()->query(' 
    58             FROM Parent749 p ORDER BY p.title                                            
    59         ', array()); 
     55        $records = Doctrine_Query::create()->query('FROM Parent749 p ORDER BY p.title', array()); 
    6056         
    6157        $this->verifyRecords($records); 
     
    7975                $this->assertEqual($record['Related']['content'], $expected['content']); 
    8076            } catch (Exception $e) { 
    81                 $this->fail('Caught exception when trying to get related content.'); 
     77                $this->fail('Caught exception when trying to get related content: ' . $e->getMessage()); 
    8278            } 
    8379        }         
     
    9995    $this->hasColumn('type', 'integer', 11, array ()); 
    10096 
    101     $this->option('subclasses', array('Record749')); 
     97    $this->setSubclasses(array('Record749' => array('type' => 1))); 
    10298  } 
    10399 
     
    120116    $this->hasOne('RelatedRecord749 as Related', array('local' => 'id', 
    121117                                                    'foreign' => 'record_id')); 
    122  
    123     $this->setInheritanceMap(array('type' => '1')); 
    124118  } 
    125119}