Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Tests_User extends PHPUnit_Framework_TestCase
- {
- public function setUp()
- {
- Doctrine_Manager::connection('mysql://user:pass@localhost/testdb');
- Doctrine::createDatabases();
- Doctrine::createTablesFromModels('../../application/models');
- }
- public function testSavingWorks()
- {
- $user = new User();
- $user->save();
- }
- public function testSavingWorksAgain()
- {
- $user = new User();
- $user->save();
- }
- public function tearDown()
- {
- Doctrine::dropDatabases();
- }
- }
- Doctrine::loadModels($path);
- Doctrine::createTablesFromArray(Doctrine::getLoadedModels());
Add Comment
Please, Sign In to add comment