Changeset 3812 for trunk/tests/Orm
- Timestamp:
- 02/16/08 19:37:51 (11 months ago)
- Location:
- trunk/tests/Orm/Component
- Files:
-
- 3 modified
-
AccessTest.php (modified) (8 diffs)
-
AllTests.php (modified) (1 diff)
-
CollectionTest.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/Orm/Component/AccessTest.php
r3779 r3812 21 21 22 22 /** 23 * Doctrine 24 * the base class of Doctrine framework 23 * Testcase for basic accessor/mutator functionality. 25 24 * 26 25 * @package Doctrine … … 33 32 require_once 'lib/DoctrineTestInit.php'; 34 33 34 class AccessStub extends Doctrine_Access {} 35 35 36 class Orm_Component_AccessTest extends Doctrine_OrmTestCase 36 37 { … … 67 68 public function shouldSetSingleValueInRecord() 68 69 { 69 $this->user->username = 'meus';70 $this->user->username = 'meus'; 70 71 $this->assertEquals('meus', $this->user->username); 71 72 $this->assertEquals('meus', $this->user['username']); … … 107 108 public function shouldNotBeAbleToSetNonExistantField() 108 109 { 109 $this->user->rat = 'meus';110 $this->user->rat = 'meus'; 110 111 } 111 112 … … 116 117 public function shouldNotBeAbleToSetNonExistantFieldWithOffset() 117 118 { 118 $this->user['rat'] = 'meus';119 $this->user['rat'] = 'meus'; 119 120 } 120 121 … … 127 128 $this->user->setArray(array( 128 129 'rat' => 'meus', 129 'id' => 22));130 'id' => 22)); 130 131 131 132 } … … 139 140 $col = new Doctrine_Collection('ForumUser'); 140 141 $this->assertEquals(0, count($col)); 141 $this->assertFalse(isset($coll[0]));142 142 $this->assertFalse(isset($coll[0])); 143 143 } … … 219 219 } 220 220 } 221 222 class AccessStub extends Doctrine_Access {} -
trunk/tests/Orm/Component/AllTests.php
r3779 r3812 22 22 $suite = new Doctrine_TestSuite('Doctrine Orm Component'); 23 23 24 //$suite->addTestSuite('Orm_Component_TestTest');25 $suite->addTestSuite('Orm_Component_AccessTest');26 $suite->addTestSuite('Orm_Component_CollectionTest');24 //$suite->addTestSuite('Orm_Component_TestTest'); 25 $suite->addTestSuite('Orm_Component_AccessTest'); 26 $suite->addTestSuite('Orm_Component_CollectionTest'); 27 27 28 28 return $suite; -
trunk/tests/Orm/Component/CollectionTest.php
r3779 r3812 99 99 $serializedFormCollection='C:19:"Doctrine_Collection":158:{a:7:{s:4:"data";a:0:{}s:7:"_mapper";s:9:"ForumUser";s:9:"_snapshot";a:0:{}s:14:"referenceField";N;s:9:"keyColumn";N;s:8:"_locator";N;s:10:"_resources";a:0:{}}}'; 100 100 $coll = unserialize($serializedFormCollection); 101 $this->assertEquals( Doctrine_Collection, get_class($coll));101 $this->assertEquals('Doctrine_Collection', get_class($coll)); 102 102 } 103 103