Changeset 4930 for trunk/tests/Orm

Show
Ignore:
Timestamp:
09/12/08 11:40:23 (4 months ago)
Author:
romanb
Message:

moved Entity

Location:
trunk/tests/Orm
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/Orm/Entity/AccessorTest.php

    r4725 r4930  
    1919/* Local test classes */ 
    2020 
    21 class CustomAccessorMutatorTestEntity extends Doctrine_Entity 
     21class CustomAccessorMutatorTestEntity extends Doctrine_ORM_Entity 
    2222{ 
    2323    public static function initMetadata($mapping)  
     
    4949} 
    5050 
    51 class MagicAccessorMutatorTestEntity extends Doctrine_Entity 
     51class MagicAccessorMutatorTestEntity extends Doctrine_ORM_Entity 
    5252{ 
    5353    public static function initMetadata($mapping)  
  • trunk/tests/Orm/Entity/ConstructorTest.php

    r4699 r4930  
    1212} 
    1313 
    14 class ConstructorTestEntity1 extends Doctrine_Entity 
     14class ConstructorTestEntity1 extends Doctrine_ORM_Entity 
    1515{ 
    1616    public function __construct($username = null) 
  • trunk/tests/Orm/Hydration/BasicHydrationTest.php

    r4924 r4930  
    8787        if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 
    8888            $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); 
    9191        } else if ($hydrationMode == Doctrine::HYDRATE_ARRAY) { 
    9292            $this->assertTrue(is_array($result)); 
     
    187187         
    188188        if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 
    189             $this->assertTrue($result[0][0] instanceof Doctrine_Entity); 
     189            $this->assertTrue($result[0][0] instanceof Doctrine_ORM_Entity); 
    190190            $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); 
    194194            $this->assertTrue($result[1][0]['phonenumbers'] instanceof Doctrine_Collection); 
    195195        } else if ($hydrationMode == Doctrine::HYDRATE_SCALAR) { 
     
    274274         
    275275        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); 
    278278        } else if ($hydrationMode == Doctrine::HYDRATE_SCALAR) { 
    279279            $this->assertEquals(2, count($result)); 
     
    378378 
    379379        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); 
    382382            $this->assertTrue($result[0]['1']['phonenumbers'] instanceof Doctrine_Collection); 
    383383            $this->assertEquals(2, count($result[0]['1']['phonenumbers'])); 
     
    522522         
    523523        if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 
    524             $this->assertTrue($result[0][0] instanceof Doctrine_Entity); 
     524            $this->assertTrue($result[0][0] instanceof Doctrine_ORM_Entity); 
    525525            $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); 
    528528            $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); 
    532532            $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); 
    536536        } else if ($hydrationMode == Doctrine::HYDRATE_SCALAR) { 
    537537            //... 
     
    706706 
    707707        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); 
    710710            // phonenumbers 
    711711            $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); 
    714714            $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); 
    716716            // articles 
    717717            $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); 
    722722            // article comments 
    723723            $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); 
    725725            // empty comment collections 
    726726            $this->assertTrue($result[0][0]['articles'][1]['comments'] instanceof Doctrine_Collection); 
     
    850850        } else if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 
    851851            $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); 
    854854        } else if ($hydrationMode == Doctrine::HYDRATE_SCALAR) { 
    855855            //... 
  • trunk/tests/Orm/UnitOfWorkTest.php

    r4877 r4930  
    8686    public function testRegisterDirty() 
    8787    { 
    88         $this->assertEquals(Doctrine_Entity::STATE_NEW, $this->_user->_state()); 
     88        $this->assertEquals(Doctrine_ORM_Entity::STATE_NEW, $this->_user->_state()); 
    8989        $this->assertFalse($this->_unitOfWork->isInIdentityMap($this->_user)); 
    9090        $this->_unitOfWork->registerDirty($this->_user); 
     
    106106    public function testSavingSingleEntityWithIdentityColumnForcesInsert() 
    107107    { 
    108         $this->assertEquals(Doctrine_Entity::STATE_NEW, $this->_user->_state()); 
     108        $this->assertEquals(Doctrine_ORM_Entity::STATE_NEW, $this->_user->_state()); 
    109109         
    110110        $this->_unitOfWork->save($this->_user); 
     
    115115         
    116116        $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()); 
    118118         
    119119        // should no longer be scheduled for insert