Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
15 | public function testTableNameGeneration() |
||
16 | { |
||
17 | $tableA = new RecordManager(); |
||
18 | $tableA->setTable('tableA'); |
||
19 | |||
20 | $tableB = new RecordManager(); |
||
21 | $tableB->setTable('tableB'); |
||
22 | |||
23 | $relation = new HasAndBelongsToMany(); |
||
24 | $relation->setManager($tableA); |
||
25 | $relation->setWith($tableB); |
||
26 | self::assertEquals('tableA_tableB', $relation->getTable()); |
||
27 | |||
28 | $relation = new HasAndBelongsToMany(); |
||
29 | $relation->setManager($tableB); |
||
30 | $relation->setWith($tableA); |
||
31 | self::assertEquals('tableA_tableB', $relation->getTable()); |
||
32 | } |
||
33 | } |
||
34 |