public function setUp()
 {
     $this->setApplicationConfig(include __DIR__ . '/application.config.php');
     parent::setUp();
     $config = $this->getApplication()->getConfig();
     $config = $config['doctrine']['connection']['odm_default'];
     $connection = new \MongoClient('mongodb://' . $config['server'] . ':' . $config['port']);
     $db = $connection->{$config['dbname']};
     $collection = $db->meta;
     $collection->remove();
     $serviceManager = $this->getApplication()->getServiceManager();
     $objectManager = $serviceManager->get('doctrine.documentmanager.odm_default');
     $meta1 = new Document\Meta();
     $meta1->setName('MetaOne');
     $meta1->setCreatedAt(new DateTime('2011-12-18 13:17:17'));
     $objectManager->persist($meta1);
     $meta2 = new Document\Meta();
     $meta2->setName('MetaTwo');
     $meta2->setCreatedAt(new DateTime('2014-12-18 13:17:17'));
     $objectManager->persist($meta2);
     $meta3 = new Document\Meta();
     $meta3->setName('MetaThree');
     $meta3->setCreatedAt(new DateTime('2012-12-18 13:17:17'));
     $objectManager->persist($meta3);
     $meta4 = new Document\Meta();
     $meta4->setName('MetaFour');
     $meta4->setCreatedAt(new DateTime('2013-12-18 13:17:17'));
     $objectManager->persist($meta4);
     $meta5 = new Document\Meta();
     $meta5->setName('MetaFive');
     $objectManager->persist($meta5);
     $objectManager->flush();
 }
 public function setUp()
 {
     $this->setApplicationConfig(include __DIR__ . '/../../../TestConfig.php.dist');
     parent::setUp();
     $services = $this->getApplicationServiceLocator();
     $this->resolver = $services->get('NetgluePrismic\\Mvc\\LinkResolver');
 }
 /**
  * 
  */
 public function setUp()
 {
     $this->setApplicationConfig(include __DIR__ . '/../../../config/test/application.config.php');
     $oServiceManager = \ApplicationTest\Bootstrap::getServiceManager();
     $this->oEm = $oServiceManager->get('Doctrine\\ORM\\EntityManager');
     parent::setUp();
 }
 /**
  * 
  */
 public function setUp()
 {
     $this->setApplicationConfig(include __DIR__ . '/../../../config/test/application.config.php');
     $oServiceManager = \ApplicationTest\Bootstrap::getServiceManager();
     $this->oDao = $oServiceManager->get('DocumentTable');
     parent::setUp();
 }
 public function setUp()
 {
     $this->setApplicationConfig(include __DIR__ . '/application.config.php');
     parent::setUp();
     $serviceManager = $this->getApplication()->getServiceManager();
     $objectManager = $serviceManager->get('doctrine.entitymanager.orm_default');
     $tool = new SchemaTool($objectManager);
     $res = $tool->createSchema($objectManager->getMetadataFactory()->getAllMetadata());
     $artist1 = new Entity\Artist();
     $artist1->setName('ABBA');
     $artist1->setCreatedAt(new DateTime('2011-12-18 13:17:17'));
     $objectManager->persist($artist1);
     $artist2 = new Entity\Artist();
     $artist2->setName('Band, The');
     $artist2->setCreatedAt(new DateTime('2014-12-18 13:17:17'));
     $objectManager->persist($artist2);
     $artist3 = new Entity\Artist();
     $artist3->setName('CubanStack');
     $artist3->setCreatedAt(new DateTime('2012-12-18 13:17:17'));
     $objectManager->persist($artist3);
     $artist4 = new Entity\Artist();
     $artist4->setName('Drunk in July');
     $artist4->setCreatedAt(new DateTime('2013-12-18 13:17:17'));
     $objectManager->persist($artist4);
     $artist5 = new Entity\Artist();
     $artist5->setName('Ekoostic Hookah');
     $objectManager->persist($artist5);
     $objectManager->flush();
 }
Example #6
0
 public function setUp()
 {
     $basePath = __DIR__ . '/../../../../../';
     $this->setApplicationConfig(include $basePath . 'config/application.config.php');
     $serviceManager = Bootstrap::getServiceManager();
     $this->controller = new \Galaxy\Controller\IndexController();
     $this->request = new Request();
     $this->routeMatch = new RouteMatch(array('controller' => 'index'));
     $this->event = new MvcEvent();
     $config = $serviceManager->get('Config');
     $routerConfig = isset($config['router']) ? $config['router'] : array();
     $router = HttpRouter::factory($routerConfig);
     $this->event->setRouter($router);
     $this->event->setRouteMatch($this->routeMatch);
     $this->controller->setEvent($this->event);
     $this->controller->setServiceLocator($serviceManager);
     $mockAuth = $this->getMock('ZfcUser\\Entity\\UserInterface');
     $ZfcUserMock = $this->getMock('User\\Entity\\User');
     $ZfcUserMock->expects($this->any())->method('getId')->will($this->returnValue('3'));
     $authMock = $this->getMock('ZfcUser\\Controller\\Plugin\\ZfcUserAuthentication');
     $authMock->expects($this->any())->method('hasIdentity')->will($this->returnValue(true));
     $authMock->expects($this->any())->method('getIdentity')->will($this->returnValue($ZfcUserMock));
     $this->controller->getPluginManager()->setService('zfcUserAuthentication', $authMock);
     parent::setUp();
 }
Example #7
0
 protected function setUp()
 {
     $this->setApplicationConfig(include __DIR__ . '/../../TestAsset/pdo.application.config.php');
     parent::setUp();
     $serviceManager = $this->getApplication()->getServiceManager();
     $serviceManager->setAllowOverride(true);
 }
Example #8
0
 /**
  * Set up
  */
 public function setUp()
 {
     $this->setApplicationConfig(include 'config/application.config.php');
     $this->setTraceError(true);
     $this->sessionProgress = new Container('progress_tracker');
     parent::setUp();
 }
 protected function setUp()
 {
     $this->factory = new OAuth2ServerFactory();
     $this->services = $services = new ServiceManager();
     $this->setApplicationConfig(['modules' => ['ZF\\OAuth2'], 'module_listener_options' => ['module_paths' => [__DIR__ . '/../../'], 'config_glob_paths' => []], 'service_listener_options' => [], 'service_manager' => []]);
     parent::setUp();
 }
Example #10
0
 public function setUp()
 {
     parent::setUp();
     $this->setApplicationConfig(include __DIR__ . '/../../../../../config/application.config.php');
     $this->serviceManager = $this->getApplication()->getServiceManager();
     $this->url = '/user';
 }
Example #11
0
 /**
  * Set up
  */
 public function setUp()
 {
     $this->setApplicationConfig(include 'config/application.config.php');
     $this->setTraceError(true);
     parent::setUp();
     $this->blueimpService = $this->getApplicationServiceLocator()->get('Media\\Service\\Blueimp');
 }
 public function setUp()
 {
     $this->setApplicationConfig(include 'config/application.config.php');
     $product = new ProductEntity();
     $this->product = $product;
     parent::setUp();
 }
 public function setUp()
 {
     $this->setApplicationConfig(
         include __DIR__ . '/../../_files/application.config.php'
     );
     parent::setUp();
 }
 public function setUp()
 {
     // getcwd() reports the tests execute from the BBCTest directory:
     $configFile = realpath('config/application.config.php');
     $this->setApplicationConfig(include $configFile);
     parent::setUp();
 }
 public function setUp()
 {
     $this->setApplicationConfig(include __DIR__ . '/../../TestConfig.php.dist');
     parent::setUp();
     $json = json_decode(file_get_contents(__DIR__ . '/../../fixtures/document.json'));
     $this->document = \Prismic\Document::parse($json);
 }
Example #16
0
 public function setUp()
 {
     parent::setUp();
     $this->loginAdapter = new LoginAdapter(Bootstrap::getServiceManager());
     $this->request = new Request();
     $this->request->setMethod("POST");
 }
 public function setUp()
 {
     $this->setApplicationConfig(include 'config/application.config.php');
     $category = new CategoryEntity();
     $this->category = $category;
     parent::setUp();
 }
 protected function setUp()
 {
     $this->factory = new PdoAdapterFactory();
     $this->services = $services = new ServiceManager();
     $this->setApplicationConfig(array('modules' => array('ZF\\OAuth2'), 'module_listener_options' => array('module_paths' => array(__DIR__ . '/../../'), 'config_glob_paths' => array()), 'service_listener_options' => array(), 'service_manager' => array()));
     parent::setUp();
 }
 public function setUp()
 {
     parent::setUp();
     $this->campaignService = new CampaignService(Bootstrap::getServiceManager());
     $this->request = new Request();
     $this->request->setMethod("POST");
 }
Example #20
0
 /**
  * setup
  */
 public function setUp()
 {
     ////AutoloaderFactory::factory(array('Zend\Loader\ClassMapAutoloader'=>array(array('ImportControllerTest' => __FILE__ ))));
     //$config = include '../config/config.php';
     ////$config['listeners'][] = 'testCaseListener';
     ////$config['service_manager']['instances']['testCaseListener'] = 'ImportControllerTest';
     ////$config['service_manager']['services']['Auth/CheckPermissionsListener'] = 'White Bunny';
     //$this->setApplicationConfig(
     //     $config
     //);
     parent::setUp();
     //$sm = new ServiceManager();
     //$checkPermissionsListener = $this->getMock('Zend\EventManager\ListenerAggregateInterface');
     //$sm->setService('Auth/CheckPermissionsListener', $checkPermissionsListener);
     /*
     $f = new Factory();
     $sm = new ServiceManager();
     $auth = $this->getMock('\Zend\Authentication\AuthenticationService');
     $sm->setService('AuthenticationService', $auth);
     
     $hm = new HelperPluginManager();
     $hm->setServicelocator($sm);
     
     
     $helper = $f->createService($hm);
     
     $this->assertInstanceOf('\Auth\View\Helper\Auth', $helper);
     $this->assertSame($auth, $helper->getService());
     */
 }
Example #21
0
 protected function tearDown()
 {
     parent::tearDown();
     $tool = new SchemaTool($this->em);
     $tool->dropDatabase();
     unset($this->em);
 }
Example #22
0
 public function setUp()
 {
     $this->serviceManager = Bootstrap::getServiceManager();
     $this->setApplicationConfig($this->serviceManager->get('ApplicationConfig'));
     $this->calc = new Stdlib\Calc();
     parent::setUp();
 }
 public function setUp()
 {
     $this->setApplicationConfig(include '/wamp/www/zf2/config/application.config.php');
     parent::setUp();
     $this->session = new Container('user');
     $this->session->token = 'WU8nb/rCD6JgtiyxTW3ZP+s4n9Vg9liUllh5bZLoLQhAMMoCaHE72nYLQSsw12uhkgWJLDmgMmZVD+aIk6BsZw==';
 }
 public function tearDown()
 {
     if ($this->db instanceof \MongoDB) {
         $this->db->drop();
     }
     parent::tearDown();
 }
Example #25
0
 public function setUp()
 {
     parent::setUp();
     $baseDir = dirname(dirname(dirname(dirname(__DIR__))));
     $this->setApplicationConfig(include $baseDir . '/config/application.config.php');
     $this->sm = $this->getApplicationServiceLocator();
 }
 public function setUp()
 {
     $this->serviceLocator = null;
     $this->setApplicationConfig(Bootstrap::getConfig());
     parent::setUp();
     $this->prepareAuthenticateMock();
 }
 public function setUp()
 {
     $this->setApplicationConfig(include __DIR__ . '/application.config.php');
     parent::setUp();
     $serviceManager = $this->getApplication()->getServiceManager();
     $this->objectManager = $serviceManager->get('doctrine.entitymanager.orm_default');
     $objectManager = $this->objectManager;
     $tool = new SchemaTool($objectManager);
     $res = $tool->createSchema($objectManager->getMetadataFactory()->getAllMetadata());
     $artist1 = new Entity\Artist();
     $artist1->setName('ArtistOne');
     $artist1->setCreatedAt(new DateTime('2011-12-18 13:17:17'));
     $objectManager->persist($artist1);
     $artist2 = new Entity\Artist();
     $artist2->setName('ArtistTwo');
     $artist2->setCreatedAt(new DateTime('2014-12-18 13:17:17'));
     $objectManager->persist($artist2);
     $artist3 = new Entity\Artist();
     $artist3->setName('ArtistThree');
     $artist3->setCreatedAt(new DateTime('2012-12-18 13:17:17'));
     $objectManager->persist($artist3);
     $artist4 = new Entity\Artist();
     $artist4->setName('ArtistFour');
     $artist4->setCreatedAt(new DateTime('2013-12-18 13:17:17'));
     $objectManager->persist($artist4);
     $artist5 = new Entity\Artist();
     $artist5->setName('ArtistFive');
     $objectManager->persist($artist5);
     $album1 = new Entity\Album();
     $album1->setName('AlbumOne');
     $album1->setCreatedAt(new DateTime('2013-12-18 13:17:17'));
     $album1->setArtist($artist1);
     $objectManager->persist($album1);
     $album2 = new Entity\Album();
     $album2->setName('AlbumTwo');
     $album2->setCreatedAt(new DateTime('2013-12-18 13:17:17'));
     $album2->setArtist($artist1);
     $objectManager->persist($album2);
     $album3 = new Entity\Album();
     $album3->setName('AlbumThree');
     $album3->setCreatedAt(new DateTime('2013-12-18 13:17:17'));
     $album3->setArtist($artist1);
     $objectManager->persist($album3);
     $album4 = new Entity\Album();
     $album4->setName('AlbumFour');
     $album4->setCreatedAt(new DateTime('2013-12-18 13:17:17'));
     $album4->setArtist($artist2);
     $objectManager->persist($album4);
     $album5 = new Entity\Album();
     $album5->setName('AlbumFive');
     $album5->setCreatedAt(new DateTime('2013-12-18 13:17:17'));
     $album5->setArtist($artist2);
     $objectManager->persist($album5);
     $album6 = new Entity\Album();
     $album6->setName('AlbumSix');
     $album6->setCreatedAt(new DateTime('2013-12-18 13:17:17'));
     $objectManager->persist($album6);
     $objectManager->flush();
 }
 public function setUp()
 {
     $this->setApplicationConfig(include __DIR__ . '/../TestAsset/zend.authenticationservice.application.config.php');
     $this->loader = new Loader();
     $this->loader->register();
     parent::setUp();
     $this->setupDb();
 }
 /**
  * 
  */
 public function setUp()
 {
     $this->setApplicationConfig(include __DIR__ . '/../../../config/test/application.config.php');
     $oServiceManager = \ApplicationTest\Bootstrap::getServiceManager();
     $COOKIE[DocumentTracker::COOKIE_NAME] = array();
     $this->object = $oServiceManager->get('DocumentTracker');
     parent::setUp();
 }
 public function setup()
 {
     $this->setApplicationConfig(include __DIR__ . '/../../../TestConfig.php.dist');
     parent::setUp();
     $services = $this->getApplicationServiceLocator();
     $context = $services->get('Prismic\\Context');
     //$this->document = $context->getDocumentById('VDRgLysAACoAfWTE');
 }