public function setUp() { parent::setUp(); $this->repository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailAccountEntity'); $this->assertTrue($this->repository instanceof \Conjoon\Data\Repository\Mail\DoctrineMailAccountRepository); $this->assertEquals(3, $this->getConnection()->getRowCount('groupware_email_accounts'), "Pre-Condition"); }
protected function setUp() { parent::setUp(); $this->repository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\User\\DefaultUserEntity'); $this->assertTrue($this->repository instanceof \Conjoon\Data\Repository\User\UserRepository); $this->assertEquals(2, $this->getConnection()->getRowCount('users'), "Pre-Condition"); }
protected function setUp() { parent::setUp(); $this->getFolderService(); $this->accountsToAdd = array($this->accountRepository->findById(2), $this->accountRepository->findById(3), $this->accountRepository->findById(5)); $this->rootRemoteFolder = new Folder(new DefaultFolderPath('["root", "3"]')); $this->rootRootFolder = new Folder(new DefaultFolderPath('["root", "2", "14", "15"]')); }
protected function setUp() { parent::setUp(); $this->mailFolderOk = new Folder(new DefaultFolderPath('["root", "1", "2", "3"]')); $this->mailFolderFail = new Folder(new DefaultFolderPath('["root", "4"]')); $this->mailFolderNotThere = array(new Folder(new DefaultFolderPath('["root", "4323"]')), new Folder(new DefaultFolderPath('["root", "4232", "235523253", "235253"]'))); $this->mailFolderNotThereInvArg = array(new Folder(new DefaultFolderPath('["root", "-1"]')), new Folder(new DefaultFolderPath('["root", "0", "68", -122]'))); $this->mailFolderNoChildFolders = array(new Folder(new DefaultFolderPath('["root", "1", "14"]'))); $this->securityService = $this->getSecurityService(); }
protected function setUp() { parent::setUp(); $this->date = new \DateTime('1970-01-01 00:00:00', new \DateTimeZone('UTC')); $this->date->setTimezone(new \DateTimeZone(date_default_timezone_get())); $this->compDate = $this->date->format('Y-m-d H:i:s'); $this->date->setTimezone(new \DateTimeZone('UTC')); $this->service = new \Conjoon\Mail\Client\Account\DefaultAccountService(array('user' => new \Conjoon\User\SimpleUser(1), 'mailAccountRepository' => $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailAccountEntity'), 'folderService' => new \Conjoon\Mail\Client\Folder\DefaultFolderService(array('user' => new \Conjoon\User\SimpleUser(1), 'mailFolderCommons' => new \Conjoon\Mail\Client\Folder\DefaultFolderCommons(array('user' => new \Conjoon\User\SimpleUser(1), 'mailFolderRepository' => $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailFolderEntity'))), 'mailFolderRepository' => $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailFolderEntity'))))); $this->input = array('reply' => array('input' => array('message' => array('contentTextPlain' => 'sfasfajksfajkl', 'contentTextHtml' => '', 'date' => $this->date, 'to' => '*****@*****.**', 'cc' => '', 'from' => 'Peter Parker <*****@*****.**>', 'bcc' => '', 'replyTo' => '*****@*****.**', 'subject' => 'Subject', 'messageId' => '<messageId>', 'references' => '<reference1> <reference2>', 'attachments' => array())), 'output' => array('draft' => array('contentTextPlain' => '<blockquote>sfasfajksfajkl</blockquote>', 'contentTextHtml' => '', 'date' => $this->compDate, 'to' => array(array('address' => '*****@*****.**', 'name' => '')), 'cc' => array(), 'bcc' => array(), 'subject' => 'Re: Subject', 'attachments' => array(), 'inReplyTo' => '<messageId>', 'references' => '<reference1> <reference2> <messageId>', 'groupwareEmailAccountsId' => 1))), 'replyAll' => array('input' => array('message' => array('contentTextPlain' => 'sfasfajksfajkl', 'contentTextHtml' => '', 'date' => '', 'to' => 'Local Local <*****@*****.**>', 'cc' => 'yeahthisaddressshouldprettymuchnotappearinthegeneratedmessage@orly.com, IMIN@inaddress.com, Peter Griffin <*****@*****.**>', 'from' => 'Peter Parker <*****@*****.**>', 'bcc' => '', 'replyTo' => '', 'subject' => 'Subject', 'messageId' => '<messageId>', 'references' => '<reference1> <reference2>', 'attachments' => array())), 'output' => array('draft' => array('contentTextPlain' => '<blockquote>sfasfajksfajkl</blockquote>', 'contentTextHtml' => '', 'date' => '1970-01-01 00:00:00', 'to' => array(array('name' => 'Peter Parker', 'address' => '*****@*****.**')), 'cc' => array(array('name' => 'Local Local', 'address' => '*****@*****.**'), array('name' => '', 'address' => '*****@*****.**'), array('name' => 'Peter Griffin', 'address' => '*****@*****.**')), 'bcc' => array(), 'subject' => 'Re: Subject', 'attachments' => array(), 'inReplyTo' => '<messageId>', 'references' => '<reference1> <reference2> <messageId>', 'groupwareEmailAccountsId' => 1)))); $this->patron = new ReplyMessagePatron($this->service); }
protected function setUp() { parent::setUp(); $this->date = new \DateTime('1970-01-01 00:00:00', new \DateTimeZone('UTC')); $this->date->setTimezone(new \DateTimeZone(date_default_timezone_get())); $this->compDate = $this->date->format('Y-m-d H:i:s'); $this->date->setTimezone(new \DateTimeZone('UTC')); $this->service = new \Conjoon\Mail\Client\Account\DefaultAccountService(array('user' => new \Conjoon\User\SimpleUser(1), 'mailAccountRepository' => $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailAccountEntity'), 'folderService' => new \Conjoon\Mail\Client\Folder\DefaultFolderService(array('user' => new \Conjoon\User\SimpleUser(1), 'mailFolderCommons' => new \Conjoon\Mail\Client\Folder\DefaultFolderCommons(array('user' => new \Conjoon\User\SimpleUser(1), 'mailFolderRepository' => $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailFolderEntity'))), 'mailFolderRepository' => $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailFolderEntity'))))); $this->input = array('forward' => array('input' => array('message' => array('contentTextHtml' => '', 'contentTextPlain' => '', 'date' => $this->date, 'to' => '*****@*****.**', 'cc' => '', 'from' => 'Peter Parker <*****@*****.**>', 'bcc' => '', 'replyTo' => '*****@*****.**', 'subject' => 'Subject', 'messageId' => '<messageId>', 'references' => '<reference1> <reference2>', 'attachments' => array())), 'output' => array('draft' => array('contentTextHtml' => '', 'date' => $this->compDate, 'to' => array(), 'cc' => array(), 'bcc' => array(), 'subject' => 'Fwd: Subject', 'attachments' => array(), 'inReplyTo' => '', 'references' => '', 'groupwareEmailAccountsId' => 1)))); $this->patron = new ForwardMessagePatron($this->service); }
protected function setUp() { $this->date = new \DateTime('1970-01-01 00:00:00', new \DateTimeZone('UTC')); $this->date->setTimezone(new \DateTimeZone(date_default_timezone_get())); $this->compDate = $this->date->format('Y-m-d H:i:s'); $this->date->setTimezone(new \DateTimeZone('UTC')); parent::setUp(); $this->service = new \Conjoon\Mail\Client\Account\DefaultAccountService(array('user' => new \Conjoon\User\SimpleUser(1), 'mailAccountRepository' => $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailAccountEntity'), 'folderService' => new \Conjoon\Mail\Client\Folder\DefaultFolderService(array('user' => new \Conjoon\User\SimpleUser(1), 'mailFolderCommons' => new \Conjoon\Mail\Client\Folder\DefaultFolderCommons(array('user' => new \Conjoon\User\SimpleUser(1), 'mailFolderRepository' => $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailFolderEntity'))), 'mailFolderRepository' => $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailFolderEntity'))))); $this->input = array(array('input' => array('message' => array('contentTextPlain' => '', 'contentTextHtml' => '', 'date' => $this->date, 'to' => '', 'cc' => '', 'from' => '', 'bcc' => '', 'replyTo' => '', 'subject' => '', 'attachments' => array())), 'output' => array('draft' => array('contentTextPlain' => '', 'contentTextHtml' => '', 'date' => $this->compDate, 'to' => array(), 'cc' => array(), 'from' => array(), 'bcc' => array(), 'replyTo' => array(), 'subject' => '', 'attachments' => array(), 'groupwareEmailAccountsId' => 1)))); $this->patron = new EditMessagePatron($this->service); }
protected function setUp() { parent::setUp(); $this->messageFlagRepository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMessageFlagEntity'); $this->assertTrue($this->messageFlagRepository instanceof \Conjoon\Data\Repository\Mail\DoctrineMessageFlagRepository); $this->repository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMessageFlagEntity'); $this->userRepository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\User\\DefaultUserEntity'); $this->messageRepository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMessageEntity'); $this->buildFolderFlagCollection(); $this->assertTrue($this->repository instanceof \Conjoon\Data\Repository\Mail\DoctrineMessageFlagRepository); $this->assertEquals(2, $this->getConnection()->getRowCount('groupware_email_items_flags'), "Pre-Condition"); }
protected function setUp() { parent::setUp(); $this->userRepository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\User\\DefaultUserEntity'); $this->messageFlagRepository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMessageFlagEntity'); $this->folderRepository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailFolderEntity'); $this->mailAccountRepository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailAccountEntity'); $messageRepository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMessageEntity'); $attachmentRepository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultAttachmentEntity'); $this->protocolAdaptee = new DefaultProtocolAdaptee($this->folderRepository, $this->messageFlagRepository, $this->mailAccountRepository, $messageRepository, $attachmentRepository); $this->buildFolderFlagCollection(); $this->checkForSameDataSet('defaultprotocoladaptee.xml'); }
protected function setUp() { parent::setUp(); $user = new \Conjoon_Modules_Default_User(); $user->setId(1); $user->setFirstName("a"); $user->setLastName("b"); $user->setUsername("c"); $user->setEmailAddress("d"); $user = new \Conjoon\User\AppUser($user); $this->user = $user; $repository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailAccountEntity'); $basicService = new DefaultAccountBasicService(array('mailAccountRepository' => $repository)); $this->securityService = new DefaultAccountSecurityService(array('user' => $user, 'accountBasicService' => $basicService)); }
protected function setUp() { parent::setUp(); $user = new \Conjoon_Modules_Default_User(); $user->setId(1); $user->setFirstName("firstname"); $user->setLastName("lastname"); $user->setUsername("username"); $user->setEmailAddress("emailaddress"); $user = new \Conjoon\User\AppUser($user); $messageRepository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMessageEntity'); $repository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailFolderEntity'); $mailFolderCommons = new \Conjoon\Mail\Client\Folder\DefaultFolderCommons(array('mailFolderRepository' => $repository, 'user' => $user, 'messageRepository' => $messageRepository)); $folderSecurityService = new \Conjoon\Mail\Client\Security\DefaultFolderSecurityService(array('mailFolderRepository' => $repository, 'user' => $user, 'mailFolderCommons' => $mailFolderCommons)); $folderNamingForMovingStrategy = new \Conjoon\Mail\Client\Folder\Strategy\DefaultFolderNamingForMovingStrategy(array('template' => '{0} {1}')); $this->service = new DefaultFolderService(array('folderSecurityService' => $folderSecurityService, 'mailFolderRepository' => $repository, 'user' => $user, 'mailFolderCommons' => $mailFolderCommons, 'folderNamingForMovingStrategy' => $folderNamingForMovingStrategy)); }
protected function setUp() { parent::setUp(); $this->service = new DefaultAccountService(array('user' => new UserMock(1), 'mailAccountRepository' => $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailAccountEntity'), 'folderService' => new \Conjoon\Mail\Client\Folder\DefaultFolderService(array('user' => new UserMock(), 'mailFolderCommons' => new \Conjoon\Mail\Client\Folder\DefaultFolderCommons(array('user' => new UserMock(), 'mailFolderRepository' => $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailFolderEntity'))), 'mailFolderRepository' => $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailFolderEntity'))))); }
protected function setUp() { parent::setUp(); $this->service = $this->getService(); }
protected function setUp() { parent::setUp(); $repository = $this->_entityManager->getRepository('\\Conjoon\\Data\\Entity\\Mail\\DefaultMailAccountEntity'); $this->basicService = new DefaultAccountBasicService(array('mailAccountRepository' => $repository)); }
protected function setUp() { parent::setUp(); $this->commons = $this->getCommons(); $this->rootMailFolder = new Folder(new DefaultFolderPath('["root", "2"]')); $this->accountsRootMailFolder = new Folder(new DefaultFolderPath('["root", "3"]')); $this->clientMailFolder = new Folder(new DefaultFolderPath('["root", "1", "INBOXtttt", "rfwe2", "New folder (7)"]')); $this->notExistingFolder = new Folder(new DefaultFolderPath('["root", "4"]')); $this->argumentExceptionFolder = new Folder(new DefaultFolderPath('["root", "sdds"]')); $this->noChildFoldersAllowedFolder = new Folder(new DefaultFolderPath('["root", "5", "6" ]')); $this->childFoldersAllowedFolder = new Folder(new DefaultFolderPath('["root", "5", "7" ]')); }