本文整理汇总了PHP中AbstractTest类的典型用法代码示例。如果您正苦于以下问题:PHP AbstractTest类的具体用法?PHP AbstractTest怎么用?PHP AbstractTest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AbstractTest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: runTest
/**
* 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);
}
示例2: Writeability
public function Writeability()
{
parent::AbstractTest("Required writeable folder", "One of the following folder should be writeable and is not : ");
}
示例3: GPC
function GPC()
{
parent::AbstractTest("Magic quotes", "Magic quotes enabled : " . get_magic_quotes_gpc());
}
示例4: setUpBeforeClass
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();
}
示例5: setUp
protected function setUp()
{
parent::setUp();
$this->_result = $this->_test->assert->getResult();
$this->_package = $this->_test->assert->php;
$this->_testFilesDir = dirname(__FILE__) . '/_files';
}
示例6: setUp
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);
}
示例7: setUpBeforeClass
public static function setUpBeforeClass()
{
// GroupInfo initialization depends on Config table
$config = \Library\Application::getService('Database\\Table\\Config');
$config->setSchema();
parent::setUpBeforeClass();
}
示例8: 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();
}
示例9: tearDown
protected function tearDown()
{
parent::tearDown();
$this->_helper->setDefaultAcl(null);
$this->_helper->setAcl(null);
$this->_helper->setDefaultRole(null);
$this->_helper->setRole(null);
}
示例10: testStatementExecuteWithParams
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");
}
示例11: testSelectGroupByAutoExpr
public function testSelectGroupByAutoExpr()
{
$server = $this->_util->getServer();
if ($server == 'IDS') {
$this->markTestIncomplete('IDS does not support this SQL syntax');
} else {
parent::testSelectGroupByAutoExpr();
}
}
示例12: testTableRelationshipCascadingUpdateUsageBasicString
public function testTableRelationshipCascadingUpdateUsageBasicString()
{
$server = $this->_util->getServer();
if ($server == 'IDS') {
$this->markTestSkipped('IDS serial columns cannot be updated');
} else {
parent::testTableRelationshipCascadingUpdateUsageBasicString();
}
}
示例13: testTableRowSetPrimaryKey
public function testTableRowSetPrimaryKey()
{
$server = $this->_util->getServer();
if ($server == 'IDS') {
$this->markTestSkipped('IDS Serial columns cannot be updated');
} else {
parent::testTableRowSetPrimaryKey();
}
}
示例14: setUp
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();
}
示例15: tearDown
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();
}