Ejemplo n.º 1
0
 public function testFolderGetterAndSetter()
 {
     $subFolder = $this->getMock('Oro\\Bundle\\EmailBundle\\Entity\\EmailFolder');
     $subFolder2 = $this->getMock('Oro\\Bundle\\EmailBundle\\Entity\\EmailFolder');
     $entity = new EmailFolder();
     $entity->addSubFolder($subFolder);
     $entity->addSubFolder($subFolder2);
     $subFolders = $entity->getSubFolders();
     $this->assertInstanceOf('Doctrine\\Common\\Collections\\ArrayCollection', $subFolders);
     $this->assertCount(2, $subFolders);
     $this->assertTrue($subFolder === $subFolders[0]);
     $this->assertTrue($subFolder2 === $subFolders[1]);
 }