- Timestamp:
- 11/30/07 11:46:41 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/generator/test/classes/bookstore/BookstoreTestBase.php
r502 r833 20 20 */ 21 21 22 require_once 'PHPUnit 2/Framework/TestCase.php';22 require_once 'PHPUnit/Framework/TestCase.php'; 23 23 include_once 'bookstore/BookstoreDataPopulator.php'; 24 24 … … 26 26 * Base class contains some methods shared by subclass test cases. 27 27 */ 28 abstract class BookstoreTestBase extends PHPUnit 2_Framework_TestCase {28 abstract class BookstoreTestBase extends PHPUnit_Framework_TestCase { 29 29 30 30 /** 31 31 * This is run before each unit test; it populates the database. 32 32 */ 33 p ublicfunction setUp()33 protected function setUp() 34 34 { 35 35 parent::setUp(); 36 BookstoreDataPopulator::depopulate(); 36 37 BookstoreDataPopulator::populate(); 37 38 } … … 40 41 * This is run after each unit test. It empties the database. 41 42 */ 42 p ublicfunction tearDown()43 protected function tearDown() 43 44 { 44 45 … … 51 52 $this->assertEquals(0, count(MediaPeer::doSelect(new Criteria())), "Expect media table to be empty."); 52 53 $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."); 54 56 55 57 BookPeer::clearInstancePool(); … … 74 76 $this->assertEquals(0, count(BookstoreEmployeeAccountPeer::$instances), "Expected 0 BookstoreEmployeeAccount instances after clearInstancePool()"); 75 77 78 BookstoreSalePeer::clearInstancePool(); 79 $this->assertEquals(0, count(BookstoreSalePeer::$instances), "Expected 0 BookstoreSale instances after clearInstancePool()"); 80 76 81 parent::tearDown(); 77 82 }
