| @@ 2596-2615 (lines=20) @@ | ||
| 2593 | * |
|
| 2594 | * @return void |
|
| 2595 | */ |
|
| 2596 | public function testHabtmSavingWithNoPrimaryKeyUuidJoinTable() { |
|
| 2597 | $this->loadFixtures('UuidTag', 'Fruit', 'FruitsUuidTag'); |
|
| 2598 | $Fruit = new Fruit(); |
|
| 2599 | $Fruit->FruitsUuidTag->order = null; |
|
| 2600 | $data = array( |
|
| 2601 | 'Fruit' => array( |
|
| 2602 | 'color' => 'Red', |
|
| 2603 | 'shape' => 'Heart-shaped', |
|
| 2604 | 'taste' => 'sweet', |
|
| 2605 | 'name' => 'Strawberry', |
|
| 2606 | ), |
|
| 2607 | 'UuidTag' => array( |
|
| 2608 | 'UuidTag' => array( |
|
| 2609 | '481fc6d0-b920-43e0-e50f-6d1740cf8569' |
|
| 2610 | ) |
|
| 2611 | ) |
|
| 2612 | ); |
|
| 2613 | $result = $Fruit->save($data); |
|
| 2614 | $this->assertFalse(empty($result)); |
|
| 2615 | } |
|
| 2616 | ||
| 2617 | /** |
|
| 2618 | * test HABTM saving when join table has no primary key and only 2 columns, no with model is used. |
|
| @@ 2622-2640 (lines=19) @@ | ||
| 2619 | * |
|
| 2620 | * @return void |
|
| 2621 | */ |
|
| 2622 | public function testHabtmSavingWithNoPrimaryKeyUuidJoinTableNoWith() { |
|
| 2623 | $this->loadFixtures('UuidTag', 'Fruit', 'FruitsUuidTag'); |
|
| 2624 | $Fruit = new FruitNoWith(); |
|
| 2625 | $data = array( |
|
| 2626 | 'Fruit' => array( |
|
| 2627 | 'color' => 'Red', |
|
| 2628 | 'shape' => 'Heart-shaped', |
|
| 2629 | 'taste' => 'sweet', |
|
| 2630 | 'name' => 'Strawberry', |
|
| 2631 | ), |
|
| 2632 | 'UuidTag' => array( |
|
| 2633 | 'UuidTag' => array( |
|
| 2634 | '481fc6d0-b920-43e0-e50f-6d1740cf8569' |
|
| 2635 | ) |
|
| 2636 | ) |
|
| 2637 | ); |
|
| 2638 | $result = $Fruit->save($data); |
|
| 2639 | $this->assertFalse(empty($result)); |
|
| 2640 | } |
|
| 2641 | ||
| 2642 | /** |
|
| 2643 | * testHabtmUuidWithNumericId method |
|