예제 #1
0
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->setApplicationConstants();
     // TODO Auto-generated MailTest::setUp()
     $this->RW_Mail = new RW_Mail();
 }
 public function setUp()
 {
     parent::setUp();
     $this->status_column = 'status';
     $this->moderated_at_column = 'moderated_at';
     Post::$strictModeration = true;
 }
 protected function setUp()
 {
     parent::setUp();
     $this->c = new Criteria();
     $this->savedAdapter = Propel::getDB(null);
     Propel::setDB(null, new DBSQLite());
 }
 public function setUp()
 {
     parent::setUp();
     $this->posts = new PostRepository();
     $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => realpath(__DIR__ . '/../migrations')]);
     $this->withFactories(realpath(__DIR__ . '/../factories'));
 }
 /**
  * Initialisation of config object
  *
  * @author 	Eddie Jaoude
  * @param 	null
  * @return 	null
  *
  */
 public function setup()
 {
     parent::setUp();
     $this->assertEquals(TRUE, is_object($this->_em));
     $this->model = $this->_em->getRepository('Auth_Model_Account');
     $this->appConfigAuth = new Zend_Config_Ini(APPLICATION_PATH . '/modules/auth/configs/auth.ini', APPLICATION_ENV);
 }
예제 #6
0
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     require_once 'web\\WindForward.php';
     require_once 'viewer\\WindView.php';
     $this->WindForward = new WindForward();
 }
 public function setUp()
 {
     parent::setUp();
     require_once 'base\\WindActionException.php';
     require_once 'base\\WindErrorMessage.php';
     $this->errorMessage = new WindErrorMessage("error", "errorAction");
 }
 public function setUp()
 {
     parent::setUp();
     MysqlUser::executeSchema();
     MysqlBook::executeSchema();
     MysqlRole::executeSchema();
 }
 public function setUp()
 {
     parent::setUp();
     $this->clickElement("id", "system");
     $this->clickElement("id", "company-sub-link");
     $this->wait(1000);
 }
예제 #10
0
 public function setUp()
 {
     parent::setUp();
     if (!isset($GLOBALS['PHPUNIT_SA_LEARN_ENABLED']) || $GLOBALS['PHPUNIT_SA_LEARN_ENABLED'] == 0) {
         $this->markTestSkipped('To test the learning behavior, enable the TELL ' . 'command in SpamAssassin and update phpunit.xml');
     }
 }
 public function setUp()
 {
     parent::setUp();
     \DB::enableQueryLog();
     $this->artisan('migrate', ['--database' => 'testbench', '--realpath' => realpath(__DIR__ . '/../migrations')]);
     $this->withFactories(realpath(__DIR__ . '/../factories'));
     $this->repo = new CachingRepository();
 }
예제 #12
0
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->dropTables()->createTables();
     $this->Db = new RW_App_Model_Db($this->tableName, $this->tableKeyName);
     // Remove as pastas criadas
     $this->setApplicationConstants()->clearApplicationData();
 }
예제 #13
0
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     // Verifica se a pasta do APPLICATION DATA
     $this->setApplicationConstants()->clearApplicationData();
     // TODO Auto-generated RW_App_Model_UploadTest::setUp()
     $this->RW_App_Model_Upload = new RW_App_Model_Upload();
 }
예제 #14
0
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     // Não inicializa o APPLICATION_DATA pois alguns testes exigem que ele não exista
     //@todo é possível ser condicional? teste case separado?
     // Remove as pastas criadas
     //$this->clearApplicationData();
 }
예제 #15
0
 public function setUp()
 {
     parent::setUp();
     $this->data = new Matrix(10, 10);
     $this->data->set(1, 1, 0);
     $this->data->set(1, 2, 0);
     $this->board = new Battleships\Board($this->data);
 }
 protected function setUp()
 {
     parent::setUp();
     require_once 'web\\WindSimpleController.php';
     require_once 'viewer\\WindView.php';
     require_once 'data\\LongController.php';
     $this->testController = new LongController();
 }
예제 #17
0
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     require_once 'base\\WindFactory.php';
     require_once 'data\\ForWindFactoryTest.php';
     Wind::application()->createApplication();
     $this->factory || ($this->factory = Wind::getApp()->getWindFactory());
 }
예제 #18
0
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->dropTables()->createTables()->insertDefaultRows();
     $this->Base = new BaseExtended($this->tableName, $this->tableKeyName, $this->getAdapter());
     // Remove as pastas criadas
     $this->setApplicationConstants()->clearApplicationData();
 }
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     require_once 'web\\WindWebApplication.php';
     require_once 'web\\WindForward.php';
     require_once 'base\\WindFactory.php';
     require_once 'data\\ForWindFactoryTest.php';
     $this->front = Wind::application("long", array('web-apps' => array('long' => array('modules' => array('default' => array('controller-path' => 'data', 'controller-suffix' => 'Controller', 'error-handler' => 'TEST:data.ErrorControllerTest'))))));
 }
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     require_once 'base\\WindClassProxy.php';
     require_once 'data\\ForWindFactoryTest.php';
     require_once 'data\\ForWindClassProxyTest.php';
     $this->test = new ForWindFactoryTest();
     $this->WindClassProxy = new WindClassProxy($this->test);
 }
예제 #21
0
 public function setUp()
 {
     parent::setUp();
     $this->requestor = new Requestor($this->client);
     // Attach mock requestor
     $httpClient = $this->requestor->getHttpClient();
     $stream = Stream::factory(json_encode([['id' => 'abcd1234', 'year' => 2001, 'make' => 'Volkswagen', 'model' => 'Passat', 'color' => '#fafafa', 'display_name' => 'My Passat']]));
     $mock = new Mock([new Response(200, [], $stream)]);
     $httpClient->getEmitter()->attach($mock);
 }
 /**
  * @inheritdoc
  */
 public function setUp()
 {
     parent::setUp();
     // $testConfig array
     $testConfig = (include __DIR__ . '/../config/config.php');
     $this->configManager = ConfigManager::create($testConfig);
     $this->basePath = realpath(__DIR__ . '/..');
     $this->storagePath = realpath(__DIR__ . '/../storage');
     $this->fileSystem = new FileSystem($this->configManager->get(), $this->basePath, $this->storagePath);
 }
 public function setUp()
 {
     parent::setUp();
     $this->status_column = 'status';
     $this->moderated_at_column = 'moderated_at';
     $this->moderated_by_column = 'moderated_by';
     //create a user and login
     $this->actingAsUser();
     Post::$strictModeration = true;
 }
예제 #24
0
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     require_once 'base\\WindModule.php';
     require_once 'data\\TestFrontController.php';
     require_once 'data\\ForWindFactoryTest.php';
     require_once 'data\\LongController.php';
     Wind::application()->createApplication();
     $this->WindModule = new LongController();
 }
예제 #25
0
 /**
  * @inheritdoc
  */
 public function setUp()
 {
     parent::setUp();
     $gettext = m::mock('Xinax\\LaravelGettext\\Gettext');
     $gettext->shouldReceive('getEncoding')->andReturn('UTF-8');
     $gettext->shouldReceive('setEncoding')->with('UTF-8');
     $gettext->shouldReceive('getLocale')->andReturn('en_US');
     $gettext->shouldReceive('setLocale')->with('en_US');
     $gettext->shouldReceive('filesystemStructure')->andReturn(true);
     $this->laravelGettext = new LaravelGettext($gettext);
 }
 protected function setUp()
 {
     parent::setUp();
     update_option('server_url', 'http://127.0.0.1:9200/');
     update_option('server_index', 'travisci');
     $this->index = Indexer::_index(true);
     $this->index->create(array(), true);
     // make sure index is available before continuing
     Indexer::_client(true)->request('_cluster/health/travisci?wait_for_status=yellow', \Elastica\Request::GET);
     $this->assertEquals(0, $this->index->count());
 }
예제 #27
0
 public function setUp()
 {
     parent::setUp();
     $filesystem = new Filesystem();
     $git = new Git();
     $git->init($this->directory);
     $git->setRepository($this->directory);
     $filesystem->dumpFile($this->directory . '/test.txt', '');
     $git->add('test.txt');
     $git->commit('Initial commit');
 }
예제 #28
0
 public function setUp()
 {
     parent::setUp();
     User::create(['name' => 'John Doe', 'age' => 35, 'title' => 'admin']);
     User::create(['name' => 'John Doe', 'age' => 5, 'title' => 'admin']);
     User::create(['name' => 'Jane Doe', 'age' => 33, 'title' => 'admin']);
     User::create(['name' => 'Harry Hoe', 'age' => 13, 'title' => 'user']);
     User::create(['name' => 'Robert Roe', 'age' => 37, 'title' => 'user']);
     User::create(['name' => 'Mark Moe', 'age' => 23, 'title' => 'user']);
     User::create(['name' => 'Brett Boe', 'age' => 35, 'title' => 'user']);
     User::create(['name' => 'Tommy Toe', 'age' => 33, 'title' => 'user']);
     User::create(['name' => 'Yvonne Yoe', 'age' => 35, 'title' => 'admin']);
     User::create(['name' => 'Error', 'age' => null, 'title' => null]);
 }
예제 #29
0
    /**
     * Prepares the environment before running a test.
     */
    protected function setUp()
    {
        parent::setUp();
        $this->template = <<<END
<?php
\t\techo \$this->pubProp." ";
\t\t
\t\tif(!empty(\$this->prtProp))
\t\t\techo \$this->prtProp." ";
\t\t\t
\t\tif(!empty(\$this->pvtProp))
\t\t\techo \$this->pvtProp." ";
END;
    }
예제 #30
0
 public function setUp()
 {
     parent::setUp();
     $this->testId = uniqid();
     switch (getenv('CFX_WEB_BROWSER')) {
         case 'chrome':
             $browser = DesiredCapabilities::chrome();
             break;
         case 'firefox':
             $browser = DesiredCapabilities::firefox();
             break;
     }
     $this->driver = RemoteWebDriver::create(getenv('CFX_WEB_DRIVER'), $browser);
 }