/**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->connection = Connection::get();
     $this->userBook = new UserBook($this->connection);
     $this->providerInfoBook = new ProviderInfoBook($this->connection);
     $this->providerUserBook = new ProviderUserBook($this->connection);
     foreach ($this->providerInfoBook->get() as $providerInfo) {
         $this->providerInfoBook->delete($providerInfo);
     }
     foreach ($this->userBook->get() as $user) {
         $this->userBook->delete($user);
     }
     for ($k = 0; $k < 10; $k++) {
         $user = new User();
         $user->setEnabled(RandomBook::getRandomBoolean())->setEnabledDate(RandomBook::getRandomDate())->setAccessFailedCount(rand(1, 5))->setEmail(RandomBook::getRandomEmail())->setPassword(RandomBook::getRandomString())->setPhoneNumber(RandomBook::getRandomPhoneNumber())->setTwoFactorEnabled(RandomBook::getRandomBoolean())->setUserName(RandomBook::getRandomString());
         $user->setId($this->userBook->save($user));
         $this->userList[] = $user;
         for ($k = 0; $k < 10; $k++) {
             $providerInfo = new ProviderInfo();
             $providerInfo->setName(RandomBook::getRandomString())->setAppKey(RandomBook::getRandomString())->setSecretKey(RandomBook::getRandomString());
             $providerInfo->setId((int) $this->providerInfoBook->save($providerInfo));
             $this->providerInfoList[] = $providerInfo;
             $providerUser = new ProviderUser();
             $providerUser->setUserId($user->getId())->setProviderId($providerInfo->getId())->setProviderName($providerInfo->getName())->setProviderUserId(RandomBook::getRandomString());
             $this->providerUserList[] = $providerUser;
         }
     }
 }
Exemplo n.º 2
0
 protected function setUp()
 {
     $this->Robot = new Robot();
     $this->ProtectedReflection = new Apiframework\Test\ProtectedReflection($this->Robot, new \ReflectionClass($this->Robot));
     parent::setUp();
     // TODO: Change the autogenerated stub
 }
 public function setUp()
 {
     parent::setUp();
     $this->node = $this->prophesize('PHPCR\\NodeInterface');
     $this->event = $this->prophesize('JMS\\Serializer\\EventDispatcher\\PreSerializeEvent');
     $this->subscriber = new PhpcrNodeSubscriber();
 }
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->osapiPerson = new osapiPerson('ID', 'NAME');
     $this->osapiPerson->aboutMe = 'ABOUTME';
     $this->osapiPerson->activities = 'ACTIVITIES';
     $this->osapiPerson->addresses = 'ADDRESSES';
     $this->osapiPerson->age = 'AGE';
     $this->osapiPerson->bodyType = 'BODYTYPE';
     $this->osapiPerson->books = 'BOOKS';
     $this->osapiPerson->cars = 'CARS';
     $this->osapiPerson->children = 'CHILDREN';
     $this->osapiPerson->currentLocation = 'CURRENTLOCATION';
     $this->osapiPerson->dateOfBirth = 'DATEOFBIRTH';
     $this->osapiPerson->drinker = 'HEAVILY';
     $this->osapiPerson->emails = 'EMAILS';
     $this->osapiPerson->ethnicity = 'ETHNICITY';
     $this->osapiPerson->fashion = 'FASHION';
     $this->osapiPerson->food = 'FOOD';
     $this->osapiPerson->gender = 'GENDER';
     $this->osapiPerson->happiestWhen = 'HAPPIESTWHEN';
     $this->osapiPerson->hasApp = 'HASAPP';
     $this->osapiPerson->heroes = 'HEROES';
     $this->osapiPerson->humor = 'HUMOR';
     $this->osapiPerson->interests = 'INTERESTS';
     $this->osapiPerson->jobInterests = 'JOBINTERESTS';
     $this->osapiPerson->jobs = 'JOBS';
     $this->osapiPerson->languagesSpoken = 'LANGUAGESSPOKEN';
     $this->osapiPerson->livingArrangement = 'LIVINGARRANGEMENT';
     $this->osapiPerson->lookingFor = 'FRIENDS';
     $this->osapiPerson->movies = 'MOVIES';
     $this->osapiPerson->music = 'MUSIC';
     $this->osapiPerson->networkPresence = 'NETWORKPRESENCE';
     $this->osapiPerson->nickname = 'NICKNAME';
     $this->osapiPerson->pets = 'PETS';
     $this->osapiPerson->phoneNumbers = 'PHONENUMBERS';
     $this->osapiPerson->politicalViews = 'POLITICALVIEWS';
     $this->osapiPerson->profileSong = 'PROFILESONG';
     $this->osapiPerson->profileUrl = 'PROFILEURL';
     $this->osapiPerson->profileVideo = 'PROFILEVIDEO';
     $this->osapiPerson->quotes = 'QUOTES';
     $this->osapiPerson->relationshipStatus = 'RELATIONSHIPSTATUS';
     $this->osapiPerson->religion = 'RELIGION';
     $this->osapiPerson->romance = 'ROMANCE';
     $this->osapiPerson->scaredOf = 'SCAREDOF';
     $this->osapiPerson->schools = 'SCHOOLS';
     $this->osapiPerson->sexualOrientation = 'SEXUALORIENTATION';
     $this->osapiPerson->smoker = 'SMOKER';
     $this->osapiPerson->sports = 'SPORTS';
     $this->osapiPerson->status = 'STATUS';
     $this->osapiPerson->tags = 'TAGS';
     $this->osapiPerson->thumbnailUrl = 'THUMBNAILSURL';
     $this->osapiPerson->timeZone = 'TIMEZONE';
     $this->osapiPerson->turnOffs = 'TURNOFFS';
     $this->osapiPerson->turnOns = 'TURNONS';
     $this->osapiPerson->tvShows = 'TVSHOWS';
     $this->osapiPerson->urls = 'URLS';
     $this->osapiPerson->isOwner = 'ISOWNER';
     $this->osapiPerson->isViewer = 'ISVIEWER';
 }
Exemplo n.º 5
0
 protected function setUp()
 {
     parent::setUp();
     // by default the rss transformer gets not added. We must set a higher
     // priority because else the XmlArray transformer would be used
     Environment::getService('transformer_manager')->addTransformer(new Transformer\Rss(), 24);
 }
Exemplo n.º 6
0
 public function setUp()
 {
     parent::setUp();
     // Just testing with the brewery db api (not affiliated....)
     $this->client = new \Asylum\Client("http://api.brewerydb.com/v2/", "publickey", "privatekey");
     $this->data = array('type' => "beer", 'q' => "Sam Adams");
 }
Exemplo n.º 7
0
 protected function setUp()
 {
     parent::setUp();
     if (!$this->loginPartnerIds) {
         $this->loginPartnerIds = $this->getLoginPartners();
     }
 }
 protected function setUp()
 {
     parent::setUp();
     $repositoryConnection = $this->getMockBuilder('\\SMW\\SPARQLStore\\RepositoryConnection')->disableOriginalConstructor()->getMock();
     $this->store = $this->getMockBuilder('\\SMW\\SPARQLStore\\SPARQLStore')->disableOriginalConstructor()->getMock();
     $this->store->expects($this->any())->method('getConnection')->will($this->returnValue($repositoryConnection));
 }
Exemplo n.º 9
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->dao = $this->getMock('FA\\Dao\\UserDao', array('findByEmail', 'recordLogin'), array(), '', false);
     $this->adapter = new DbAdapter($this->dao);
     $this->user = array('id' => '1', 'email' => '*****@*****.**', 'password_hash' => '$2y$12$pZg9j8DBSIP2R/vfDzTQOeIt5n57r5VigCUl/HH.FrBOadi3YhdPS', 'last_login' => null);
 }
Exemplo n.º 10
0
 protected function setUp()
 {
     $this->_apiFrontController = $this->getMockBuilder('Mage_Webapi_Controller_Front')->disableOriginalConstructor()->getMock();
     $this->_objectManager = $this->getMockBuilder('Magento_ObjectManager')->disableOriginalConstructor()->getMock();
     $this->_factory = new Mage_Webapi_Controller_Response_Factory($this->_apiFrontController, $this->_objectManager);
     parent::setUp();
 }
Exemplo n.º 11
0
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->_db = new Zend_Db_Adapter_Pdo_Sqlite(array('dbname' => dirname(__FILE__) . '/../_files/test.sqlite'));
     $this->_query = $this->_db->select()->from('test');
     $this->_adapter = new Zend_Paginator_Adapter_DbSelect($this->_query);
 }
Exemplo n.º 12
0
 protected function setUp()
 {
     spl_autoload_unregister(array($GLOBALS['autoloader'], 'autoload'));
     $this->_autoloader = new Autoloader(array(APP_PATH . '/../tests/library/Supermon/src'));
     spl_autoload_register(array($this->_autoloader, 'autoload'));
     parent::setUp();
 }
Exemplo n.º 13
0
 protected function setUp()
 {
     parent::setUp();
     Clock::freeze('2014-01-01 11:11:11');
     StreamStub::register('test');
     $this->logger = new StdOutputLogger('TEST', 'default', 'test');
 }
Exemplo n.º 14
0
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->Image = new RW_Image();
     // path para as imagens
     $this->imgPath = realpath(TEST_ROOT . '/assets/_files/');
 }
Exemplo n.º 15
0
 protected function setUp()
 {
     parent::setUp();
     $this->applicationFactory = ApplicationFactory::getInstance();
     $store = $this->getMockBuilder('\\SMW\\Store')->disableOriginalConstructor()->getMockForAbstractClass();
     $this->applicationFactory->registerObject('Store', $store);
 }
Exemplo n.º 16
0
 protected function setUp()
 {
     parent::setUp();
     $this->applicationFactory = ApplicationFactory::getInstance();
     $settings = Settings::newFromArray(array('smwgDeclarationProperties' => array('_PVAL'), 'smwgCacheType' => 'hash', 'smwgEnableUpdateJobs' => false));
     $this->applicationFactory->registerObject('Settings', $settings);
 }
Exemplo n.º 17
0
 protected function setUp()
 {
     parent::setUp();
     $this->databaseMap = new DatabaseMap('foodb');
     $this->tableName = 'foo';
     $this->tmap = new TableMap($this->tableName, $this->databaseMap);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->adaptee = $this->getMockBuilder('GuzzleHttp\\Message\\RequestInterface')->getMock();
     $this->query = $this->getMockBuilder('GuzzleHttp\\Query')->disableOriginalConstructor()->getMock();
     $this->adapter = new GuzzleHttpRequestAdapter($this->adaptee);
 }
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @access protected
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->options = new JRegistry();
     $this->client = $this->getMock('JGithubHttp', array('get', 'post', 'delete', 'patch', 'put'));
     $this->object = new JGithubGists($this->options, $this->client);
 }
 public function setUp()
 {
     parent::setUp();
     if (empty($this->helper)) {
         $this->helper = new TestHelper();
     }
 }
Exemplo n.º 21
0
 protected function setUp()
 {
     parent::setUp();
     $this->datasource = new Memory();
     $this->process = Process::build();
     $this->collector = new Config($this->process, $this->datasource);
 }
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     $this->_dynamicDB = new DynamicTestDB();
     $this->_dynamicDBTest = new DynamicDBTester();
     $this->_dynamicDBStub = $this->getMock('PHPUnit_Fixture_DynamicDB', array('retrieveSQLSchema', 'findSchema', 'getSchemas'));
     parent::setUp();
 }
Exemplo n.º 23
0
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->factory = new ProcessFactory('pwd');
     $this->directory = \Mockery::mock(\SplFileInfo::class);
     $this->directory->shouldReceive('__toString')->andReturn('/tmp');
 }
Exemplo n.º 24
0
 protected function setUp()
 {
     parent::setUp();
     $this->ci =& get_instance();
     $this->ci->load->helper('user_helper');
     $this->ci->load->library('session');
 }
Exemplo n.º 25
0
 protected function setUp()
 {
     parent::setUp();
     $this->bag = new FlashBag();
     $this->array = array('notice' => array('A previous flash message'));
     $this->bag->initialize($this->array);
 }
Exemplo n.º 26
0
 protected function setUp()
 {
     parent::setUp();
     $this->client = $this->getMock('\\OAuth\\Common\\Http\\Client\\ClientInterface');
     $this->storage = $this->getMock('\\OAuth\\Common\\Storage\\TokenStorageInterface');
     $this->xing = new Xing($this->getMock('\\OAuth\\Common\\Consumer\\CredentialsInterface'), $this->client, $this->storage, $this->getMock('\\OAuth\\OAuth1\\Signature\\SignatureInterface'));
 }
Exemplo n.º 27
0
 /**
  * Sets up the fixture, for example, open a network connection.
  * This method is called before a test is executed.
  */
 public function setUp()
 {
     parent::setUp();
     static::$sent = 0;
     $this->serviceManager = new ServiceManager();
     $this->serviceManager->setService('Configuration', $this->dataConfig)->setService('SiteInfo', new SiteInfo($this->dataSiteInfo))->setAlias('Zork\\Db\\SiteInfo', 'SiteInfo')->setFactory('Zork\\Mail\\Service', 'Zork\\Mail\\ServiceFactory');
 }
Exemplo n.º 28
0
 protected function setUp()
 {
     parent::setUp();
     $this->_object = RUtils::dt();
     $this->_date = '1988-01-01 6:40:34';
     $this->_defaultParams = array('date' => $this->_date, 'timezone' => 'UTC');
 }
Exemplo n.º 29
0
 public function setUp()
 {
     $this->kernel = new \AppKernel('test', true);
     $this->kernel->boot();
     $this->container = $this->kernel->getContainer();
     parent::setUp();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->semanticDataFactory = UtilityFactory::getInstance()->newSemanticDataFactory();
     $this->semanticDataValidator = UtilityFactory::getInstance()->newValidatorFactory()->newSemanticDataValidator();
     $this->applicationFactory = ApplicationFactory::getInstance();
 }