| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function testReplaceArrayWithPersistentCollections() |
||
| 15 | { |
||
| 16 | |||
| 17 | $user1 = new \Doctrine\Tests\Models\CMS\CmsUser(); |
||
| 18 | $user1->username = "beberlei"; |
||
| 19 | $user1->status = "active"; |
||
| 20 | $user1->name = "Benjamin"; |
||
| 21 | |||
| 22 | $group1 = new \Doctrine\Tests\Models\CMS\CmsGroup(); |
||
| 23 | $group1->name = "Admin"; |
||
| 24 | |||
| 25 | $user1->addGroup($group1); |
||
| 26 | |||
| 27 | $this->dm->persist($user1); |
||
| 28 | $this->dm->persist($group1); |
||
| 29 | $this->dm->flush(); |
||
| 30 | |||
| 31 | $this->assertInstanceOf('Doctrine\ODM\CouchDB\PersistentIdsCollection', $user1->groups); |
||
| 32 | $this->assertInstanceOf('Doctrine\ODM\CouchDB\PersistentViewCollection', $group1->users); |
||
| 33 | } |
||
| 34 | } |