Show
Ignore:
Timestamp:
11/30/07 11:46:41 (1 year ago)
Author:
hans
Message:

Merging in changes from 1.3 branch. svn merge -r 534:832

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/generator/test/classes/bookstore/BookstoreTestBase.php

    r502 r833  
    2020 */ 
    2121 
    22 require_once 'PHPUnit2/Framework/TestCase.php'; 
     22require_once 'PHPUnit/Framework/TestCase.php'; 
    2323include_once 'bookstore/BookstoreDataPopulator.php'; 
    2424 
     
    2626 * Base class contains some methods shared by subclass test cases. 
    2727 */ 
    28 abstract class BookstoreTestBase extends PHPUnit2_Framework_TestCase { 
     28abstract class BookstoreTestBase extends PHPUnit_Framework_TestCase { 
    2929 
    3030        /** 
    3131         * This is run before each unit test; it populates the database. 
    3232         */ 
    33         public function setUp() 
     33        protected function setUp() 
    3434        { 
    3535                parent::setUp(); 
     36                BookstoreDataPopulator::depopulate(); 
    3637                BookstoreDataPopulator::populate(); 
    3738        } 
     
    4041         * This is run after each unit test.  It empties the database. 
    4142         */ 
    42         public function tearDown() 
     43        protected function tearDown() 
    4344        { 
    4445 
     
    5152                $this->assertEquals(0, count(MediaPeer::doSelect(new Criteria())), "Expect media table to be empty."); 
    5253                $this->assertEquals(0, count(BookstoreEmployeePeer::doSelect(new Criteria())), "Expect bookstore_employee table to be empty."); 
    53                 $this->assertEquals(0, count(BookstoreEmployeeAccountPeer::doSelect(new Criteria())), "Expect bookstore_employee table to be empty."); 
     54                $this->assertEquals(0, count(BookstoreEmployeeAccountPeer::doSelect(new Criteria())), "Expect bookstore_employee_account table to be empty."); 
     55                $this->assertEquals(0, count(BookstoreSalePeer::doSelect(new Criteria())), "Expect bookstore_sale table to be empty."); 
    5456 
    5557                BookPeer::clearInstancePool(); 
     
    7476                $this->assertEquals(0, count(BookstoreEmployeeAccountPeer::$instances), "Expected 0 BookstoreEmployeeAccount instances after clearInstancePool()"); 
    7577 
     78                BookstoreSalePeer::clearInstancePool(); 
     79                $this->assertEquals(0, count(BookstoreSalePeer::$instances), "Expected 0 BookstoreSale instances after clearInstancePool()"); 
     80 
    7681                parent::tearDown(); 
    7782        }