Changeset 4944 for trunk/tests/Orm

Show
Ignore:
Timestamp:
09/12/08 13:34:46 (4 months ago)
Author:
romanb
Message:

moved Collection

Location:
trunk/tests/Orm
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/Orm/Component/CollectionTest.php

    r4913 r4944  
    4242        parent::setUp(); 
    4343         
    44         $this->coll = new Doctrine_Collection('ForumUser'); 
     44        $this->coll = new Doctrine_ORM_Collection('ForumUser'); 
    4545 
    4646        //we create a CmsUser with username as key column and add a user to it 
    47         $cmsColl = new Doctrine_Collection('CmsUser', 'username'); 
     47        $cmsColl = new Doctrine_ORM_Collection('CmsUser', 'username'); 
    4848        $user = new CmsUser(); 
    4949        $user->username ='test'; 
     
    6868    public function shouldUseSpecifiedKeyColumn() 
    6969    { 
    70         $coll = new Doctrine_Collection('ForumUser', 'id'); 
     70        $coll = new Doctrine_ORM_Collection('ForumUser', 'id'); 
    7171        $this->assertEquals('id', $coll->getKeyField()); 
    7272    } 
     
    8181    public function shouldThrowExceptionIfNonValidFieldSetAsKey() 
    8282    { 
    83         $coll = new Doctrine_Collection('ForumUser', 'xxNonValidFieldxx'); 
     83        $coll = new Doctrine_ORM_Collection('ForumUser', 'xxNonValidFieldxx'); 
    8484    } 
    8585 
     
    100100        $serialized = serialize($this->coll); 
    101101        $coll = unserialize($serialized); 
    102         $this->assertEquals('Doctrine_Collection', get_class($coll)); 
     102        $this->assertEquals('Doctrine_ORM_Collection', get_class($coll)); 
    103103    } 
    104104 
  • trunk/tests/Orm/Hydration/BasicHydrationTest.php

    r4930 r4944  
    8686           
    8787        if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 
    88             $this->assertTrue($result instanceof Doctrine_Collection); 
     88            $this->assertTrue($result instanceof Doctrine_ORM_Collection); 
    8989            $this->assertTrue($result[0] instanceof Doctrine_ORM_Entity); 
    9090            $this->assertTrue($result[1] instanceof Doctrine_ORM_Entity); 
     
    188188        if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 
    189189            $this->assertTrue($result[0][0] instanceof Doctrine_ORM_Entity); 
    190             $this->assertTrue($result[0][0]['phonenumbers'] instanceof Doctrine_Collection); 
     190            $this->assertTrue($result[0][0]['phonenumbers'] instanceof Doctrine_ORM_Collection); 
    191191            $this->assertTrue($result[0][0]['phonenumbers'][0] instanceof Doctrine_ORM_Entity); 
    192192            $this->assertTrue($result[0][0]['phonenumbers'][1] instanceof Doctrine_ORM_Entity); 
    193193            $this->assertTrue($result[1][0] instanceof Doctrine_ORM_Entity); 
    194             $this->assertTrue($result[1][0]['phonenumbers'] instanceof Doctrine_Collection); 
     194            $this->assertTrue($result[1][0]['phonenumbers'] instanceof Doctrine_ORM_Collection); 
    195195        } else if ($hydrationMode == Doctrine::HYDRATE_SCALAR) { 
    196196            $this->assertTrue(is_array($result)); 
     
    380380            $this->assertTrue($result[0]['1'] instanceof Doctrine_ORM_Entity); 
    381381            $this->assertTrue($result[1]['2'] instanceof Doctrine_ORM_Entity); 
    382             $this->assertTrue($result[0]['1']['phonenumbers'] instanceof Doctrine_Collection); 
     382            $this->assertTrue($result[0]['1']['phonenumbers'] instanceof Doctrine_ORM_Collection); 
    383383            $this->assertEquals(2, count($result[0]['1']['phonenumbers'])); 
    384384        } else if ($hydrationMode == Doctrine::HYDRATE_SCALAR) { 
     
    523523        if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 
    524524            $this->assertTrue($result[0][0] instanceof Doctrine_ORM_Entity); 
    525             $this->assertTrue($result[0][0]['phonenumbers'] instanceof Doctrine_Collection); 
     525            $this->assertTrue($result[0][0]['phonenumbers'] instanceof Doctrine_ORM_Collection); 
    526526            $this->assertTrue($result[0][0]['phonenumbers'][0] instanceof Doctrine_ORM_Entity); 
    527527            $this->assertTrue($result[0][0]['phonenumbers'][1] instanceof Doctrine_ORM_Entity); 
    528             $this->assertTrue($result[0][0]['articles'] instanceof Doctrine_Collection); 
     528            $this->assertTrue($result[0][0]['articles'] instanceof Doctrine_ORM_Collection); 
    529529            $this->assertTrue($result[0][0]['articles'][0] instanceof Doctrine_ORM_Entity); 
    530530            $this->assertTrue($result[0][0]['articles'][1] instanceof Doctrine_ORM_Entity); 
    531531            $this->assertTrue($result[1][0] instanceof Doctrine_ORM_Entity); 
    532             $this->assertTrue($result[1][0]['phonenumbers'] instanceof Doctrine_Collection); 
     532            $this->assertTrue($result[1][0]['phonenumbers'] instanceof Doctrine_ORM_Collection); 
    533533            $this->assertTrue($result[1][0]['phonenumbers'][0] instanceof Doctrine_ORM_Entity); 
    534534            $this->assertTrue($result[1][0]['articles'][0] instanceof Doctrine_ORM_Entity); 
     
    709709            $this->assertTrue($result[1][0] instanceof Doctrine_ORM_Entity); 
    710710            // phonenumbers 
    711             $this->assertTrue($result[0][0]['phonenumbers'] instanceof Doctrine_Collection); 
     711            $this->assertTrue($result[0][0]['phonenumbers'] instanceof Doctrine_ORM_Collection); 
    712712            $this->assertTrue($result[0][0]['phonenumbers'][0] instanceof Doctrine_ORM_Entity); 
    713713            $this->assertTrue($result[0][0]['phonenumbers'][1] instanceof Doctrine_ORM_Entity); 
    714             $this->assertTrue($result[1][0]['phonenumbers'] instanceof Doctrine_Collection); 
     714            $this->assertTrue($result[1][0]['phonenumbers'] instanceof Doctrine_ORM_Collection); 
    715715            $this->assertTrue($result[1][0]['phonenumbers'][0] instanceof Doctrine_ORM_Entity); 
    716716            // articles 
    717             $this->assertTrue($result[0][0]['articles'] instanceof Doctrine_Collection); 
     717            $this->assertTrue($result[0][0]['articles'] instanceof Doctrine_ORM_Collection); 
    718718            $this->assertTrue($result[0][0]['articles'][0] instanceof Doctrine_ORM_Entity); 
    719719            $this->assertTrue($result[0][0]['articles'][1] instanceof Doctrine_ORM_Entity); 
     
    721721            $this->assertTrue($result[1][0]['articles'][1] instanceof Doctrine_ORM_Entity); 
    722722            // article comments 
    723             $this->assertTrue($result[0][0]['articles'][0]['comments'] instanceof Doctrine_Collection); 
     723            $this->assertTrue($result[0][0]['articles'][0]['comments'] instanceof Doctrine_ORM_Collection); 
    724724            $this->assertTrue($result[0][0]['articles'][0]['comments'][0] instanceof Doctrine_ORM_Entity); 
    725725            // empty comment collections 
    726             $this->assertTrue($result[0][0]['articles'][1]['comments'] instanceof Doctrine_Collection); 
     726            $this->assertTrue($result[0][0]['articles'][1]['comments'] instanceof Doctrine_ORM_Collection); 
    727727            $this->assertEquals(0, count($result[0][0]['articles'][1]['comments'])); 
    728             $this->assertTrue($result[1][0]['articles'][0]['comments'] instanceof Doctrine_Collection); 
     728            $this->assertTrue($result[1][0]['articles'][0]['comments'] instanceof Doctrine_ORM_Collection); 
    729729            $this->assertEquals(0, count($result[1][0]['articles'][0]['comments'])); 
    730             $this->assertTrue($result[1][0]['articles'][1]['comments'] instanceof Doctrine_Collection); 
     730            $this->assertTrue($result[1][0]['articles'][1]['comments'] instanceof Doctrine_ORM_Collection); 
    731731            $this->assertEquals(0, count($result[1][0]['articles'][1]['comments'])); 
    732732        } else if ($hydrationMode == Doctrine::HYDRATE_SCALAR) { 
     
    849849            $this->assertTrue(is_array($result[1])); 
    850850        } else if ($hydrationMode == Doctrine::HYDRATE_RECORD) { 
    851             $this->assertTrue($result instanceof Doctrine_Collection); 
     851            $this->assertTrue($result instanceof Doctrine_ORM_Collection); 
    852852            $this->assertTrue($result[0] instanceof Doctrine_ORM_Entity); 
    853853            $this->assertTrue($result[1] instanceof Doctrine_ORM_Entity);