Changeset 2309 for trunk/tests
- Timestamp:
- 10/07/2007 10:24:07 PM (15 months ago)
- Location:
- trunk/tests
- Files:
-
- 2 added
- 4 modified
-
simple_unit/ActiveRecord/ForeignKeyTestCase.php (modified) (4 diffs)
-
simple_unit/ActiveRecord/ForeignObjectUpdateTest.php (modified) (3 diffs)
-
simple_unit/ActiveRecord/MultipleForeignKeyTestCase.php (added)
-
simple_unit/ActiveRecord/records/ItemRecord.php (modified) (1 diff)
-
simple_unit/ActiveRecord/test1.sqlite (added)
-
test_tools/simpletest/test_case.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/simple_unit/ActiveRecord/ForeignKeyTestCase.php
r2274 r2309 27 27 public static $RELATIONS = array( 28 28 'Tracks' => array(self::HAS_MANY, 'Track'), 29 'Artists' => array(self:: HAS_MANY, 'Artist', 'album_artists'),29 'Artists' => array(self::MANY_TO_MANY, 'Artist', 'album_artists'), 30 30 'cover' => array(self::HAS_ONE, 'Cover') 31 31 ); … … 43 43 public $Albums = array(); 44 44 45 public static $RELATIONS=array( 46 'Albums' => array(self::HAS_MANY, 'Album', 'album_artists') 45 public static $RELATIONS=array 46 ( 47 'Albums' => array(self::MANY_TO_MANY, 'Album', 'album_artists') 47 48 ); 48 49 … … 159 160 { 160 161 $item = ItemRecord::finder()->withRelated_Items()->findByPk(1); 162 161 163 $this->assertNotNull($item); 162 164 $this->assertEqual($item->name, "Professional Work Attire"); … … 169 171 $this->assertEqual($item->related_items[1]->item_id, 3); 170 172 } 173 171 174 } 172 175 -
trunk/tests/simple_unit/ActiveRecord/ForeignObjectUpdateTest.php
r2274 r2309 53 53 public static $RELATIONS=array 54 54 ( 55 'skills' => array(self:: HAS_MANY, 'SkillRecord', 'player_skills'),55 'skills' => array(self::MANY_TO_MANY, 'SkillRecord', 'player_skills'), 56 56 'team' => array(self::BELONGS_TO, 'TeamRecord'), 57 57 'profile' => array(self::HAS_ONE, 'ProfileRecord'), … … 113 113 public static $RELATIONS=array 114 114 ( 115 'players' => array(self:: HAS_MANY, 'PlayerRecord', 'player_skills'),115 'players' => array(self::MANY_TO_MANY, 'PlayerRecord', 'player_skills'), 116 116 ); 117 117 … … 237 237 $this->assertEqual($player4->skills[2]->name, 'Push'); 238 238 } 239 //*/ 239 240 } 240 241 -
trunk/tests/simple_unit/ActiveRecord/records/ItemRecord.php
r2274 r2309 22 22 public static $RELATIONS=array 23 23 ( 24 'related_items' => array(self:: HAS_MANY, 'ItemRecord', 'related_items.(related_item_id)'),24 'related_items' => array(self::MANY_TO_MANY, 'ItemRecord', 'related_items.related_item_id'), 25 25 ); 26 26 -
trunk/tests/test_tools/simpletest/test_case.php
r1532 r2309 241 241 '] with message ['. $exception->getMessage() . 242 242 '] in ['. $exception->getFile() . 243 '] line [' . $exception->getLine() . ']'); 243 '] line [' . $exception->getLine() . 244 '] stack [' . $exception->getTraceAsString() .']'); 244 245 } 245 246
