本文整理汇总了PHP中PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL方法的具体用法?PHP PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL怎么用?PHP PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Extensions_Database_Operation_Factory
的用法示例。
在下文中一共展示了PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDatabaseTester
protected function getDatabaseTester()
{
$tester = new PHPUnit_Extensions_Database_DefaultTester($this->_conn);
$tester->setSetUpOperation(new PHPUnit_Extensions_Database_Operation_Composite(array(new DB_operation_set_env('foreign_key_checks', 0), PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(), new DB_operation_set_env('foreign_key_checks', 1), PHPUnit_Extensions_Database_Operation_Factory::INSERT())));
$tester->setTearDownOperation(PHPUnit_Extensions_Database_Operation_Factory::NONE());
return $tester;
}
示例2: getSetUpOperation
/**
* Overridden.
*/
protected function getSetUpOperation()
{
// CLEAN_INSERT is default
//return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT();
//return PHPUnit_Extensions_Database_Operation_Factory::UPDATE();
//return PHPUnit_Extensions_Database_Operation_Factory::NONE();
//
// Issue a DELETE from <table> which is more portable than a
// TRUNCATE table <table> (some DBs require high privileges for truncate statements
// and also do not allow truncates across tables with FK contstraints e.g. Oracle)
return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL();
}
示例3: getTearDownOperation
/**
* Returns the database operation executed in test cleanup.
*
* @return PHPUnit_Extensions_Database_Operation_DatabaseOperation
*
* @since 12.1
*/
protected function getTearDownOperation()
{
// Required given the use of InnoDB contraints.
return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL();
}
示例4: getTearDownOperation
/**
* templates the tearDown method that runs after each test; this method expunges the database after each run
*
* @return PHPUnit_Extensions_Database_Operation_IDatabaseOperation delete command for the database
**/
public final function getTearDownOperation()
{
return PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL();
}
示例5: getSetUpOperation
protected function getSetUpOperation()
{
return \PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL();
}
示例6: getSetUpOperation
/**
* @return \PHPUnit_Extensions_Database_Operation
*/
protected function getSetUpOperation()
{
return new \PHPUnit_Extensions_Database_Operation_Composite(array(\PHPUnit_Extensions_Database_Operation_Factory::DELETE_ALL(), \PHPUnit_Extensions_Database_Operation_Factory::INSERT()));
}