Changeset 4486

Show
Ignore:
Timestamp:
06/08/08 17:28:13 (13 months ago)
Author:
jwage
Message:

updating test, removing unneeded fail

Location:
branches/0.11/tests
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/0.11/tests/run.php

    r4485 r4486  
    7373$tickets->addTestCase(new Doctrine_Ticket_1071_TestCase()); 
    7474$tickets->addTestCase(new Doctrine_Ticket_1072_TestCase()); 
     75$tickets->addTestCase(new Doctrine_Ticket_1099_TestCase()); 
    7576$tickets->addTestCase(new Doctrine_Ticket_1113_TestCase()); 
    7677$tickets->addTestCase(new Doctrine_Ticket_1116_TestCase()); 
    77 //$tickets->addTestCase(new Doctrine_Ticket_1099_TestCase()); 
     78$tickets->addTestCase(new Doctrine_Ticket_1121_TestCase()); 
     79 
    7880$test->addTestCase($tickets); 
    7981 
  • branches/0.11/tests/Ticket/1099TestCase.php

    r4460 r4486  
    11<?php 
    2 class Doctrine_Ticket_1099_TestCase extends Doctrine_UnitTestCase  
     2class Doctrine_Ticket_1099_TestCase extends Doctrine_UnitTestCase 
    33{ 
    44    public function prepareTables() 
    55    { 
    66        $this->tables = array(); 
    7         $this->tables[] = 'T1099_Page'; 
    8         $this->tables[] = 'T1099_SubPage'; 
     7        $this->tables[] = 'T1099_Page'; 
     8        $this->tables[] = 'T1099_SubPage'; 
    99 
    10         parent::prepareTables(); 
     10        parent::prepareTables(); 
    1111    } 
    1212 
     
    1414    { 
    1515        $page = new T1099_Page(); 
    16         $page->type = 'page'; 
    17         $tree = $page->getTable()->getTree(); 
    18         $tree->createRoot($page); 
     16        $page->type = 'page'; 
     17        $tree = $page->getTable()->getTree(); 
     18        $tree->createRoot($page); 
    1919 
    20         $subPage = new T1099_SubPage(); 
    21         $subPage->getNode()->insertAsLastChildOf($page); 
     20        $subPage = new T1099_SubPage(); 
     21        $subPage->getNode()->insertAsLastChildOf($page); 
    2222    } 
    2323 
     
    2525    { 
    2626        $child = Doctrine_Query::create() 
    27                ->from('T1099_Page p') 
    28                ->where('p.type = \'subpage\'') 
    29                ->fetchOne(); 
     27           ->from('T1099_Page p') 
     28           ->where('p.type = \'subpage\'') 
     29           ->fetchOne(); 
    3030 
    31         $this->assertEqual('T1099_SubPage', get_class($child)); 
    32         $this->assertNotEqual(false, $child->getNode()->getParent()); 
     31        $this->assertEqual('T1099_SubPage', get_class($child)); 
     32        $this->assertNotEqual(false, $child->getNode()->getParent()); 
    3333    } 
    3434} 
     
    3939    { 
    4040        $this->setTableName('pages'); 
    41             $this->hasColumn('id', 'integer', 15, array('autoincrement' => true, 'primary' => true, 'notnull' => true)); 
    42             $this->hasColumn('type', 'string', 10); 
     41        $this->hasColumn('id', 'integer', 15, array('autoincrement' => true, 'primary' => true, 'notnull' => true)); 
     42        $this->hasColumn('type', 'string', 10); 
    4343    } 
    4444 
    4545    public function setUp() 
    4646    { 
    47         $this->actAs('Doctrine_Template_NestedSet'); 
    48         $this->setSubclasses(array( 
    49                 'T1099_SubPage' => array('type' => 'subpage') 
    50         )); 
    51         parent::setUp(); 
     47        $this->actAs('Doctrine_Template_NestedSet'); 
     48        $this->setSubclasses(array( 
     49        'T1099_SubPage' => array('type' => 'subpage') 
     50        )); 
     51        parent::setUp(); 
    5252    } 
    5353} 
  • branches/0.11/tests/Ticket/1116TestCase.php

    r4485 r4486  
    1717                  ->from('Ticket_1116_User s') 
    1818                  ->where('s.username = ?', array('test')); 
    19                  
    20                 $params = $q->getParams();      // there should be array('test',null) but we only have 'test' 
    21                            
    22                 $this->assertEqual(count($params),2);      
    23                  
    24                                    
     19                   
    2520                // to see the error switch dbh to a real db, the next line will trigger the error 
    2621                $test = $q->fetchOne();  //will only fail with "real" mysql  
     
    5146                $this->actAs($softdelete0); 
    5247        } 
    53  
    5448}