public static function setUpBeforeClass() { // These tables must exist before the view can be created \Library\Application::getService('Database\\Table\\ClientsAndGroups')->setSchema(); \Library\Application::getService('Database\\Table\\ClientSystemInfo')->setSchema(); parent::setUpBeforeClass(); }
protected function setUp() { parent::setUp(); $this->_result = $this->_test->assert->getResult(); $this->_package = $this->_test->assert->php; $this->_testFilesDir = dirname(__FILE__) . '/_files'; }
protected function setUp() { parent::setUp(); $this->groups['groupA'] = uniqid('groupA_'); $this->groups['groupB'] = uniqid('groupB_'); $jobWithGroupA = Mage::getModel('aoe_scheduler/job'); /* @var $jobWithGroupA Aoe_Scheduler_Model_Job */ $jobWithGroupA->setScheduleCronExpr('always'); $jobWithGroupA->setJobCode(uniqid('t_job_')); $jobWithGroupA->setRunModel('aoe_scheduler/task_test::run'); $jobWithGroupA->setGroups($this->groups['groupA']); $jobWithGroupA->setIsActive(true); $jobWithGroupA->save(); $this->jobs['jobWithGroupA'] = $jobWithGroupA; $jobWithGroupB = Mage::getModel('aoe_scheduler/job'); /* @var $jobWithGroupB Aoe_Scheduler_Model_Job */ $jobWithGroupB->setScheduleCronExpr('always'); $jobWithGroupB->setJobCode(uniqid('t_job_')); $jobWithGroupB->setRunModel('aoe_scheduler/task_test::run'); $jobWithGroupB->setGroups($this->groups['groupB']); $jobWithGroupB->setIsActive(true); $jobWithGroupB->save(); $this->jobs['jobWithGroupB'] = $jobWithGroupB; $jobWithGroupAandB = Mage::getModel('aoe_scheduler/job'); /* @var $jobWithGroupAandB Aoe_Scheduler_Model_Job */ $jobWithGroupAandB->setScheduleCronExpr('always'); $jobWithGroupAandB->setJobCode(uniqid('t_job_')); $jobWithGroupAandB->setRunModel('aoe_scheduler/task_test::run'); $jobWithGroupAandB->setGroups("{$this->groups['groupA']},{$this->groups['groupB']}"); $jobWithGroupAandB->setIsActive(true); $jobWithGroupAandB->save(); $this->jobs['jobWithGroupAandB'] = $jobWithGroupAandB; // fake schedule generation to avoid it to be generated on the next run: Mage::app()->saveCache(time(), Mage_Cron_Model_Observer::CACHE_KEY_LAST_SCHEDULE_GENERATE_AT, array('crontab'), null); }
public static function setUpBeforeClass() { // GroupInfo initialization depends on Config table $config = \Library\Application::getService('Database\\Table\\Config'); $config->setSchema(); parent::setUpBeforeClass(); }
public static function setUpBeforeClass() { // These tables must exist before the view can be created static::$serviceManager->get('Database\\Table\\ClientsAndGroups')->setSchema(true); static::$serviceManager->get('Database\\Table\\ClientSystemInfo')->setSchema(true); parent::setUpBeforeClass(); }
public static function setUpBeforeClass() { // This table must exist before the view can be created \Library\Application::getService('Database\\Table\\ClientsAndGroups')->setSchema(); \Library\Application::getService('Database\\Table\\WindowsProductKeys')->setSchema(); parent::setUpBeforeClass(); }
protected function tearDown() { parent::tearDown(); $this->_helper->setDefaultAcl(null); $this->_helper->setAcl(null); $this->_helper->setDefaultRole(null); $this->_helper->setRole(null); }
/** * Run a test and track its results. * * @param TestResult $result * @param $test */ protected function runTest(AbstractTest $test, TestResult $result) { if (!is_null($this->getPending())) { $test->setPending($this->getPending()); } $test->setEventEmitter($this->eventEmitter); $test->run($result); }
public function testStatementExecuteWithParams() { $products = $this->_db->quoteIdentifier('zfproducts'); // Make IDENTITY column accept explicit value. // This can be done in only one table in a given session. sqlsrv_query($this->_db->getConnection(), "SET IDENTITY_INSERT {$products} ON"); parent::testStatementExecuteWithParams(); sqlsrv_query($this->_db->getConnection(), "SET IDENTITY_INSERT {$products} OFF"); }
public function testSelectGroupByAutoExpr() { $server = $this->_util->getServer(); if ($server == 'IDS') { $this->markTestIncomplete('IDS does not support this SQL syntax'); } else { parent::testSelectGroupByAutoExpr(); } }
public function testTableRelationshipCascadingUpdateUsageBasicString() { $server = $this->_util->getServer(); if ($server == 'IDS') { $this->markTestSkipped('IDS serial columns cannot be updated'); } else { parent::testTableRelationshipCascadingUpdateUsageBasicString(); } }
public function testTableRowSetPrimaryKey() { $server = $this->_util->getServer(); if ($server == 'IDS') { $this->markTestSkipped('IDS Serial columns cannot be updated'); } else { parent::testTableRowSetPrimaryKey(); } }
public function setUp() { parent::setUp(); $this->_navigationMock = $this->getMock('Navigation', array('refresh', 'to', 'back', 'forward')); $this->_windowMock = $this->getMock('Window', array('maximize', 'close', 'setSize', 'getSize', 'setPosition', 'getPosition')); $this->_targetLocatorMock = $this->getMock('TargetLocator', array('window', 'frame')); $this->_originalNavigate = $this->_driver->navigate(); $this->_originalWindow = $this->_driver->manage()->window(); $this->_originalTargetLocator = $this->_driver->switchTo(); }
protected function tearDown() { clearstatcache(); // Remove tmp file if ($this->_tmpFileName && file_exists($this->_tmpFileName)) { chmod($this->_tmpFileName, 0600); // Reset file permissions, for avoid permission denied on Windows unlink($this->_tmpFileName); } parent::tearDown(); }
/** * @dataProvider providesMailBoxNames * @param $name */ public function testGetChangedMailboxes($name) { $name = uniqid($name); $newMailBox = parent::createMailBox($name); $status = $newMailBox->getStatus(); $changedMailBoxes = $this->getTestAccount()->getChangedMailboxes([$newMailBox->getFolderId() => ['uidvalidity' => $status['uidvalidity'], 'uidnext' => $status['uidnext']]]); $this->assertEquals(0, count($changedMailBoxes)); $this->createTestMessage($newMailBox); $changedMailBoxes = $this->getTestAccount()->getChangedMailboxes([$newMailBox->getFolderId() => ['uidvalidity' => $status['uidvalidity'], 'uidnext' => $status['uidnext']]]); $this->assertEquals(1, count($changedMailBoxes)); $this->assertEquals(1, count($changedMailBoxes[$newMailBox->getFolderId()]['messages'])); }
public function setUp() { parent::setUp(); $this->_configProvider = new ProviderConfig(); $this->_configProvider->setRegistry($this->_registry); // Store original autoloaders $this->loaders = spl_autoload_functions(); if (!is_array($this->loaders)) { // spl_autoload_functions does not return empty array when no // autoloaders registered... $this->loaders = array(); } // Store original include_path $this->includePath = get_include_path(); }
/** {@inheritdoc} */ protected function _loadDataSet($testName = null) { // Get current time from database as reference point for all operations. $this->_currentTimestamp = new \DateTime($this->getConnection()->createQueryTable('current', 'SELECT CURRENT_TIMESTAMP AS current')->getValue(0, 'current'), new \DateTimeZone('UTC')); $dataSet = parent::_loadDataSet($testName); $locks = $dataSet->getTable('locks'); if ($locks) { // Replace offsets with timestamps (current - offset) $count = $locks->getRowCount(); $replacement = new \PHPUnit_Extensions_Database_DataSet_ReplacementDataSet($dataSet); for ($i = 0; $i < $count; $i++) { $offset = $locks->getValue($i, 'since'); $interval = new \DateInterval(sprintf('PT%dS', trim($offset, '#'))); $since = clone $this->_currentTimestamp; $since->sub($interval); $replacement->addFullReplacement($offset, $since->format('Y-m-d H:i:s')); } return $replacement; } else { return $dataSet; } }
public function __construct() { parent::__construct("PHP Command Line", "Testing PHP command line (default is php)"); }
public function Writeability() { parent::AbstractTest("Required writeable folder", "One of the following folder should be writeable and is not : "); }
public function setUp() { parent::setUp(); $this->_package = $this->_test->assert->php; $this->_result = $this->_test->assert->getResult(); }
function GPC() { parent::AbstractTest("Magic quotes", "Magic quotes enabled : " . get_magic_quotes_gpc()); }
function PHPDomXML() { parent::AbstractTest("DOM Xml enabled", "Dom XML is required, you may have to install the php-xml extension."); }
function AJXPVersion() { parent::AbstractTest("AjaXplorer version", "AJXP version : " . AJXP_VERSION); }
function PHPVersion() { parent::AbstractTest("PHP version", "Minimum required version is PHP 5.1.0, PHP 5.2 or higher recommended when using foreign language"); }
function PHPLimits() { parent::AbstractTest("PHP Limits variables", "<b>Testing configs</b>"); }
protected function tearDown() { parent::tearDown(); ini_restore('default_socket_timeout'); }
public function PHP_OB() { parent::AbstractTest("PHP Output Buffer disabled", "You should disable php output_buffering parameter for better performances with Pydio."); }
protected function tearDown() { unset($this->_adapter); parent::tearDown(); }
public function UsersConfig() { parent::AbstractTest("Users Configuration", "Current config for users"); }
function PHPMCrypt() { parent::AbstractTest("MCrypt enabled", "MCrypt is required for generating publiclets"); }