Changeset 4930 for trunk/tests/Orm
- Timestamp:
- 09/12/08 11:40:23 (4 months ago)
- Location:
- trunk/tests/Orm
- Files:
-
- 4 modified
-
Entity/AccessorTest.php (modified) (2 diffs)
-
Entity/ConstructorTest.php (modified) (1 diff)
-
Hydration/BasicHydrationTest.php (modified) (7 diffs)
-
UnitOfWorkTest.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/Orm/Entity/AccessorTest.php
r4725 r4930 19 19 /* Local test classes */ 20 20 21 class CustomAccessorMutatorTestEntity extends Doctrine_ Entity21 class CustomAccessorMutatorTestEntity extends Doctrine_ORM_Entity 22 22 { 23 23 public static function initMetadata($mapping) … … 49 49 } 50 50 51 class MagicAccessorMutatorTestEntity extends Doctrine_ Entity51 class MagicAccessorMutatorTestEntity extends Doctrine_ORM_Entity 52 52 { 53 53 public static function initMetadata($mapping) -
trunk/tests/Orm/Entity/ConstructorTest.php
r4699 r4930 12 12 } 13 13 14 class ConstructorTestEntity1 extends Doctrine_ Entity14 class ConstructorTestEntity1 extends Doctrine_ORM_Entity 15 15 { 16 16 public function __construct($username = null) -
trunk/tests/Orm/Hydration/BasicHydrationTest.php
r4924 r4930 87 87 if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 88 88 $this->assertTrue($result instanceof Doctrine_Collection); 89 $this->assertTrue($result[0] instanceof Doctrine_ Entity);90 $this->assertTrue($result[1] instanceof Doctrine_ Entity);89 $this->assertTrue($result[0] instanceof Doctrine_ORM_Entity); 90 $this->assertTrue($result[1] instanceof Doctrine_ORM_Entity); 91 91 } else if ($hydrationMode == Doctrine::HYDRATE_ARRAY) { 92 92 $this->assertTrue(is_array($result)); … … 187 187 188 188 if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 189 $this->assertTrue($result[0][0] instanceof Doctrine_ Entity);189 $this->assertTrue($result[0][0] instanceof Doctrine_ORM_Entity); 190 190 $this->assertTrue($result[0][0]['phonenumbers'] instanceof Doctrine_Collection); 191 $this->assertTrue($result[0][0]['phonenumbers'][0] instanceof Doctrine_ Entity);192 $this->assertTrue($result[0][0]['phonenumbers'][1] instanceof Doctrine_ Entity);193 $this->assertTrue($result[1][0] instanceof Doctrine_ Entity);191 $this->assertTrue($result[0][0]['phonenumbers'][0] instanceof Doctrine_ORM_Entity); 192 $this->assertTrue($result[0][0]['phonenumbers'][1] instanceof Doctrine_ORM_Entity); 193 $this->assertTrue($result[1][0] instanceof Doctrine_ORM_Entity); 194 194 $this->assertTrue($result[1][0]['phonenumbers'] instanceof Doctrine_Collection); 195 195 } else if ($hydrationMode == Doctrine::HYDRATE_SCALAR) { … … 274 274 275 275 if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 276 $this->assertTrue($result[0][0] instanceof Doctrine_ Entity);277 $this->assertTrue($result[1][0] instanceof Doctrine_ Entity);276 $this->assertTrue($result[0][0] instanceof Doctrine_ORM_Entity); 277 $this->assertTrue($result[1][0] instanceof Doctrine_ORM_Entity); 278 278 } else if ($hydrationMode == Doctrine::HYDRATE_SCALAR) { 279 279 $this->assertEquals(2, count($result)); … … 378 378 379 379 if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 380 $this->assertTrue($result[0]['1'] instanceof Doctrine_ Entity);381 $this->assertTrue($result[1]['2'] instanceof Doctrine_ Entity);380 $this->assertTrue($result[0]['1'] instanceof Doctrine_ORM_Entity); 381 $this->assertTrue($result[1]['2'] instanceof Doctrine_ORM_Entity); 382 382 $this->assertTrue($result[0]['1']['phonenumbers'] instanceof Doctrine_Collection); 383 383 $this->assertEquals(2, count($result[0]['1']['phonenumbers'])); … … 522 522 523 523 if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 524 $this->assertTrue($result[0][0] instanceof Doctrine_ Entity);524 $this->assertTrue($result[0][0] instanceof Doctrine_ORM_Entity); 525 525 $this->assertTrue($result[0][0]['phonenumbers'] instanceof Doctrine_Collection); 526 $this->assertTrue($result[0][0]['phonenumbers'][0] instanceof Doctrine_ Entity);527 $this->assertTrue($result[0][0]['phonenumbers'][1] instanceof Doctrine_ Entity);526 $this->assertTrue($result[0][0]['phonenumbers'][0] instanceof Doctrine_ORM_Entity); 527 $this->assertTrue($result[0][0]['phonenumbers'][1] instanceof Doctrine_ORM_Entity); 528 528 $this->assertTrue($result[0][0]['articles'] instanceof Doctrine_Collection); 529 $this->assertTrue($result[0][0]['articles'][0] instanceof Doctrine_ Entity);530 $this->assertTrue($result[0][0]['articles'][1] instanceof Doctrine_ Entity);531 $this->assertTrue($result[1][0] instanceof Doctrine_ Entity);529 $this->assertTrue($result[0][0]['articles'][0] instanceof Doctrine_ORM_Entity); 530 $this->assertTrue($result[0][0]['articles'][1] instanceof Doctrine_ORM_Entity); 531 $this->assertTrue($result[1][0] instanceof Doctrine_ORM_Entity); 532 532 $this->assertTrue($result[1][0]['phonenumbers'] instanceof Doctrine_Collection); 533 $this->assertTrue($result[1][0]['phonenumbers'][0] instanceof Doctrine_ Entity);534 $this->assertTrue($result[1][0]['articles'][0] instanceof Doctrine_ Entity);535 $this->assertTrue($result[1][0]['articles'][1] instanceof Doctrine_ Entity);533 $this->assertTrue($result[1][0]['phonenumbers'][0] instanceof Doctrine_ORM_Entity); 534 $this->assertTrue($result[1][0]['articles'][0] instanceof Doctrine_ORM_Entity); 535 $this->assertTrue($result[1][0]['articles'][1] instanceof Doctrine_ORM_Entity); 536 536 } else if ($hydrationMode == Doctrine::HYDRATE_SCALAR) { 537 537 //... … … 706 706 707 707 if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 708 $this->assertTrue($result[0][0] instanceof Doctrine_ Entity);709 $this->assertTrue($result[1][0] instanceof Doctrine_ Entity);708 $this->assertTrue($result[0][0] instanceof Doctrine_ORM_Entity); 709 $this->assertTrue($result[1][0] instanceof Doctrine_ORM_Entity); 710 710 // phonenumbers 711 711 $this->assertTrue($result[0][0]['phonenumbers'] instanceof Doctrine_Collection); 712 $this->assertTrue($result[0][0]['phonenumbers'][0] instanceof Doctrine_ Entity);713 $this->assertTrue($result[0][0]['phonenumbers'][1] instanceof Doctrine_ Entity);712 $this->assertTrue($result[0][0]['phonenumbers'][0] instanceof Doctrine_ORM_Entity); 713 $this->assertTrue($result[0][0]['phonenumbers'][1] instanceof Doctrine_ORM_Entity); 714 714 $this->assertTrue($result[1][0]['phonenumbers'] instanceof Doctrine_Collection); 715 $this->assertTrue($result[1][0]['phonenumbers'][0] instanceof Doctrine_ Entity);715 $this->assertTrue($result[1][0]['phonenumbers'][0] instanceof Doctrine_ORM_Entity); 716 716 // articles 717 717 $this->assertTrue($result[0][0]['articles'] instanceof Doctrine_Collection); 718 $this->assertTrue($result[0][0]['articles'][0] instanceof Doctrine_ Entity);719 $this->assertTrue($result[0][0]['articles'][1] instanceof Doctrine_ Entity);720 $this->assertTrue($result[1][0]['articles'][0] instanceof Doctrine_ Entity);721 $this->assertTrue($result[1][0]['articles'][1] instanceof Doctrine_ Entity);718 $this->assertTrue($result[0][0]['articles'][0] instanceof Doctrine_ORM_Entity); 719 $this->assertTrue($result[0][0]['articles'][1] instanceof Doctrine_ORM_Entity); 720 $this->assertTrue($result[1][0]['articles'][0] instanceof Doctrine_ORM_Entity); 721 $this->assertTrue($result[1][0]['articles'][1] instanceof Doctrine_ORM_Entity); 722 722 // article comments 723 723 $this->assertTrue($result[0][0]['articles'][0]['comments'] instanceof Doctrine_Collection); 724 $this->assertTrue($result[0][0]['articles'][0]['comments'][0] instanceof Doctrine_ Entity);724 $this->assertTrue($result[0][0]['articles'][0]['comments'][0] instanceof Doctrine_ORM_Entity); 725 725 // empty comment collections 726 726 $this->assertTrue($result[0][0]['articles'][1]['comments'] instanceof Doctrine_Collection); … … 850 850 } else if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 851 851 $this->assertTrue($result instanceof Doctrine_Collection); 852 $this->assertTrue($result[0] instanceof Doctrine_ Entity);853 $this->assertTrue($result[1] instanceof Doctrine_ Entity);852 $this->assertTrue($result[0] instanceof Doctrine_ORM_Entity); 853 $this->assertTrue($result[1] instanceof Doctrine_ORM_Entity); 854 854 } else if ($hydrationMode == Doctrine::HYDRATE_SCALAR) { 855 855 //... -
trunk/tests/Orm/UnitOfWorkTest.php
r4877 r4930 86 86 public function testRegisterDirty() 87 87 { 88 $this->assertEquals(Doctrine_ Entity::STATE_NEW, $this->_user->_state());88 $this->assertEquals(Doctrine_ORM_Entity::STATE_NEW, $this->_user->_state()); 89 89 $this->assertFalse($this->_unitOfWork->isInIdentityMap($this->_user)); 90 90 $this->_unitOfWork->registerDirty($this->_user); … … 106 106 public function testSavingSingleEntityWithIdentityColumnForcesInsert() 107 107 { 108 $this->assertEquals(Doctrine_ Entity::STATE_NEW, $this->_user->_state());108 $this->assertEquals(Doctrine_ORM_Entity::STATE_NEW, $this->_user->_state()); 109 109 110 110 $this->_unitOfWork->save($this->_user); … … 115 115 116 116 $this->assertTrue($this->_unitOfWork->isInIdentityMap($this->_user)); 117 $this->assertEquals(Doctrine_ Entity::STATE_MANAGED, $this->_user->_state());117 $this->assertEquals(Doctrine_ORM_Entity::STATE_MANAGED, $this->_user->_state()); 118 118 119 119 // should no longer be scheduled for insert