/**
  * Set up tables
  */
 public static function setUpBeforeClass()
 {
     foreach (static::$_tables as $table) {
         \Library\Application::getService("Database\\Table\\{$table}")->setSchema();
     }
     parent::setUpBeforeClass();
 }
 public static function setUpBeforeClass()
 {
     $database = \Library\Application::getService('Database\\Nada');
     $database->createTable('test1', array(array('name' => 'col1', 'type' => 'varchar', 'length' => 10, 'notnull' => true), array('name' => 'col2', 'type' => 'varchar', 'length' => 10, 'notnull' => true)), 'col1');
     $database->createTable('test2', array(array('name' => 'col1', 'type' => 'varchar', 'length' => 10, 'notnull' => true)), 'col1');
     parent::setUpBeforeClass();
 }
Exemple #3
0
 public static function setUpBeforeClass()
 {
     foreach (static::$_tables as $table) {
         static::$serviceManager->get("Database\\Table\\{$table}")->setSchema(true);
     }
     parent::setUpBeforeClass();
 }
 public static function setUpBeforeClass()
 {
     /*
      * Configure the library with the DB connection
      */
     //        Config::setConnection(self::getPDO());
     parent::setUpBeforeClass();
 }
 public static function setUpBeforeClass()
 {
     global $phpbb_root_path, $phpEx;
     $setup_extensions = static::setup_extensions();
     $finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path, null, $phpEx);
     $finder->core_path('phpbb/db/migration/data/');
     if (!empty($setup_extensions)) {
         $finder->set_extensions($setup_extensions)->extension_directory('/migrations');
     }
     $classes = $finder->get_classes();
     $schema_sha1 = sha1(serialize($classes));
     self::$schema_file = __DIR__ . '/../tmp/' . $schema_sha1 . '.json';
     self::$install_schema_file = __DIR__ . '/../../phpBB/install/schemas/schema.json';
     if (!file_exists(self::$schema_file)) {
         global $table_prefix;
         $db = new \phpbb\db\driver\sqlite();
         $schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
         file_put_contents(self::$schema_file, json_encode($schema_generator->get_schema()));
     }
     copy(self::$schema_file, self::$install_schema_file);
     parent::setUpBeforeClass();
 }
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     if (!isset($GLOBALS['PDO_DSN']) || !isset($GLOBALS['PDO_USER']) || !isset($GLOBALS['PDO_PASS']) || !isset($GLOBALS['PDO_DBNAME'])) {
         // insufficient values to work with
         return;
     }
     $dsn = $GLOBALS['PDO_DSN'];
     static::$driver = substr($dsn, 0, strpos($dsn, ':'));
     static::$pdo = new \PDO($dsn, $GLOBALS['PDO_USER'], $GLOBALS['PDO_PASS']);
     // create files
     sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid('flysystempdo-test-', true);
     $tmpDir = sys_get_temp_dir() . DIRECTORY_SEPARATOR;
     $emptyFilename = $tmpDir . uniqid('flysystempdo-test-00B-', true);
     $tenByteFilename = $tmpDir . uniqid('flysystempdo-test-10B-', true);
     $tenKayFilename = $tmpDir . uniqid('flysystempdo-test-10K-', true);
     $fifteenMegFilename = $tmpDir . uniqid('flysystempdo-test-15M-', true);
     static::fillFile($emptyFilename, 0);
     static::fillFile($tenByteFilename, 10);
     static::fillFile($tenKayFilename, 10 * 1024);
     static::fillFile($fifteenMegFilename, 15 * 1024 * 1024);
     static::$tempFiles = ['00B' => $emptyFilename, '10B' => $tenByteFilename, '10K' => $tenKayFilename, '15M' => $fifteenMegFilename];
 }
 /**
  * Provide table class and create table
  */
 public static function setUpBeforeClass()
 {
     static::$_table = \Library\Application::getService(static::_getClass());
     static::$_table->setSchema();
     parent::setUpBeforeClass();
 }
Exemple #8
0
 /**
  * Provide table class and create table
  */
 public static function setUpBeforeClass()
 {
     static::$_table = static::$serviceManager->get(static::_getClass());
     static::$_table->setSchema(true);
     parent::setUpBeforeClass();
 }
 /**
  * Overridden. 
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     echo "\n\n-------------------------------------------------\n";
     echo "Executing Site_CertStatusLogCascadeDeletionsTest. . .\n";
 }
 /**
  * Overridden. 
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     echo "\n\n-------------------------------------------------\n";
     echo "Executing RoleActionRecordTests. . .\n";
 }
 /**
  * Overridden. 
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     echo "\n\n-------------------------------------------------\n";
     echo "Executing DowntimeServiceEndpointTest1. . .\n";
 }
Exemple #12
0
 /**
  * Overridden. 
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     echo "\n\n-------------------------------------------------\n";
     echo "Executing RoleServiceTest. . .\n";
 }
 /**
  * Setup config
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     TestHelper::setConfigInRegistry(static::$configData);
 }
 /**
  * Overridden. 
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     echo "\n\n-------------------------------------------------\n";
     echo "Executing Your Test Name. . .\n";
 }
 /**
  * Overridden. 
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     echo "\n\n-------------------------------------------------\n";
     echo "Executing DoctrineCleanInsert1Test. . .\n";
 }
Exemple #16
0
 /**
  * Overridden. 
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     echo "\n\n-------------------------------------------------\n";
     echo "Executing SiteMoveTest. . .\n";
 }
 /**
  * Overridden. 
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     echo "\n\n-------------------------------------------------\n";
     echo "Executing RoleCascadeDeletionsTest. . .\n";
 }
 /**
  * Overridden. 
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     echo "\n\n-------------------------------------------------\n";
     echo "Executing ExtensionProps_IPIQuery_Test1. . .\n";
 }
 /**
  * Overridden. 
  */
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     echo "\n\n-------------------------------------------------\n";
     echo "Executing ServiceAuthorizeActionTest. . .\n";
 }