예제 #1
0
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\Ingest\\Feed', 'Newscoop\\Entity\\Ingest\\Feed\\Entry');
     $this->cleanFiles();
     $this->config = \Zend_Registry::get('container')->getParameter('ingest');
     $this->publisher = new PublisherService(\Zend_Registry::get('container')->getParameter('ingest_publisher'));
     $this->service = new IngestService($this->config, $this->em, $this->publisher);
 }
예제 #2
0
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\User', 'Newscoop\\Entity\\Topic', 'Newscoop\\Entity\\UserTopic', 'Newscoop\\Entity\\Acl\\Role');
     $this->service = new UserTopicService($this->em);
     $this->user = new User('name');
     $this->em->persist($this->user);
     $this->em->flush();
 }
예제 #3
0
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\Comment', 'Newscoop\\Entity\\Ingest\\Feed', 'Newscoop\\Entity\\Ingest\\Feed\\Entry', 'Newscoop\\Entity\\Article');
     $this->config = \Zend_Registry::get('container')->getParameter('ingest_publisher');
     $this->service = new PublisherService($this->config);
     $this->feed = new Feed('test');
     $this->em->persist($this->feed);
     $this->em->flush();
 }
예제 #4
0
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\UserToken', 'Newscoop\\Entity\\Acl\\Role', 'Newscoop\\Entity\\User');
     $this->service = new UserTokenService($this->em);
     $this->user = new User('test');
     $this->user->setEmail('petr@localhost');
     $this->em->persist($this->user);
     $this->em->flush();
 }
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\Issue', 'Newscoop\\Entity\\Section', $this->entity);
     $this->repository = $this->em->getRepository($this->entity);
     $this->issue = new \Newscoop\Entity\Issue(1);
     $this->em->persist($this->issue);
     $this->section = new \Newscoop\Entity\Section(1, 'test');
     $this->em->persist($this->section);
     $this->template = $this->repository->getTemplate('key');
 }
예제 #6
0
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\User', 'Newscoop\\Entity\\Acl\\Role');
     $this->service = new DoctrineAuthService($this->em);
     $this->user = new User();
     $this->user->setEmail(self::EMAIL);
     $this->user->setUsername(self::USERNAME);
     $this->user->setPassword(self::PASSWORD);
     $this->em->persist($this->user);
     $this->em->flush();
 }
예제 #7
0
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\User', 'Newscoop\\Entity\\Acl\\Role', 'Newscoop\\Entity\\UserAttribute');
     $this->auth = $this->getMockBuilder('Zend_Auth')->disableOriginalConstructor()->getMock();
     $this->repository = $this->em->getRepository('Newscoop\\Entity\\User');
     $this->service = new UserService($this->em, $this->auth);
     $this->user = new User();
     $this->user->setEmail('*****@*****.**');
     $this->user->setUsername('test');
     $this->user->setFirstName('Foo');
     $this->user->setLastName('Bar');
 }
예제 #8
0
 public function setUp()
 {
     global $application;
     parent::setUp('Newscoop\\Entity\\User', 'Newscoop\\Entity\\Acl\\Role', 'Newscoop\\Entity\\UserToken');
     $this->service = new \Newscoop\Services\EmailService(\Zend_Registry::get('container')->getParameter('email'), \Zend_Registry::get('view'), \Zend_Registry::get('container')->getService('user.token'));
     \Zend_Mail::setDefaultTransport(new \Zend_Mail_Transport_File(array('path' => '/tmp', 'callback' => function ($transport) {
         return uniqid('mail', true);
     })));
     $this->user = new User();
     $this->user->setEmail(self::USER_EMAIL);
     $this->em->persist($this->user);
     $this->em->flush();
 }
예제 #9
0
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\User', 'Newscoop\\Entity\\Acl\\Role');
     $this->service = new UserSearchService($this->em);
     $user = new User();
     $user->setEmail('*****@*****.**');
     $user->setUsername('FooBar');
     $this->em->persist($user);
     $user = new User();
     $user->setEmail('*****@*****.**');
     $user->setUsername('john');
     $this->em->persist($user);
     $this->em->flush();
 }
예제 #10
0
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\Comment', 'Newscoop\\Entity\\Comment\\Commenter', 'Newscoop\\Entity\\Language', 'Newscoop\\Entity\\Article', 'Newscoop\\Entity\\Publication', 'Newscoop\\Entity\\User', 'Newscoop\\Entity\\Acl\\Role', 'Newscoop\\Entity\\UserPoints', 'Newscoop\\Entity\\UserAttribute');
     $this->repository = $this->em->getRepository('Newscoop\\Entity\\Comment');
 }
예제 #11
0
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\AuditEvent', 'Newscoop\\Entity\\User', 'Newscoop\\Entity\\Acl\\Role');
     $this->repository = $this->em->getRepository('Newscoop\\Entity\\AuditEvent');
 }
예제 #12
0
 public function setUp()
 {
     parent::setUp($this->entity);
     $this->repository = $this->em->getRepository($this->entity);
 }
예제 #13
0
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\User', 'Newscoop\\Entity\\UserIdentity', 'Newscoop\\Entity\\Acl\\Role');
     $this->service = new SocialAuthService($this->em);
 }
예제 #14
0
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\User', 'Newscoop\\Entity\\UserAttribute', 'Newscoop\\Entity\\Acl\\Role', 'Newscoop\\Entity\\User\\Group');
     $this->repository = $this->em->getRepository('Newscoop\\Entity\\User');
 }
예제 #15
0
 public function setUp()
 {
     parent::setUp('Newscoop\\Entity\\User', 'Newscoop\\Entity\\UserAttribute', 'Newscoop\\Entity\\Acl\\Role', 'Newscoop\\Entity\\User\\Group', 'Newscoop\\Entity\\Author');
     $this->service = new ListUserService(array('blog' => array('role' => 1)), $this->em);
 }