本文整理汇总了PHP中PHPUnit_Extensions_Database_Operation_Factory::NONE方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Extensions_Database_Operation_Factory::NONE方法的具体用法?PHP PHPUnit_Extensions_Database_Operation_Factory::NONE怎么用?PHP PHPUnit_Extensions_Database_Operation_Factory::NONE使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Extensions_Database_Operation_Factory
的用法示例。
在下文中一共展示了PHPUnit_Extensions_Database_Operation_Factory::NONE方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: getDatabaseTester
/**
* @return PHPUnit_Extensions_Database_DefaultTester
*/
protected function getDatabaseTester()
{
$connection = new PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection($this->pdo, 'sqlite');
$tester = new PHPUnit_Extensions_Database_DefaultTester($connection);
$tester->setSetUpOperation(PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT());
$tester->setTearDownOperation(PHPUnit_Extensions_Database_Operation_Factory::NONE());
$tester->setDataSet(new PHPUnit_Extensions_Database_DataSet_FlatXmlDataSet(dirname(__FILE__) . '/_files/bank-account-seed.xml'));
return $tester;
}
示例3: __construct
/**
* Creates a new default database tester using the given connection.
*
* @param PHPUnit_Extensions_Database_DB_IDatabaseConnection $connection
*/
public function __construct(\PHPUnit_Extensions_Database_DB_IDatabaseConnection $connection)
{
if (!$connection instanceof Connection) {
throw new InvalidArgumentException("Not a valid Zend_Test_PHPUnit_Db_Connection instance, " . get_class($connection) . " given!");
}
$this->connection = $connection;
$this->setUpOperation = new \PHPUnit_Extensions_Database_Operation_Composite(array(new Operation\Truncate(), new Operation\Insert()));
$this->tearDownOperation = \PHPUnit_Extensions_Database_Operation_Factory::NONE();
}
示例4: __construct
/**
* Creates a new default database tester using the given connection.
*
* @param PHPUnit_Extensions_Database_DB_IDatabaseConnection $connection
*/
public function __construct(PHPUnit_Extensions_Database_DB_IDatabaseConnection $connection)
{
if (!$connection instanceof Zend_Test_PHPUnit_Db_Connection) {
#require_once "Zend/Test/PHPUnit/Db/Exception.php";
throw new Zend_Test_PHPUnit_Db_Exception("Not a valid Zend_Test_PHPUnit_Db_Connection instance, " . get_class($connection) . " given!");
}
$this->connection = $connection;
$this->setUpOperation = new PHPUnit_Extensions_Database_Operation_Composite(array(new Zend_Test_PHPUnit_Db_Operation_Truncate(), new Zend_Test_PHPUnit_Db_Operation_Insert()));
$this->tearDownOperation = PHPUnit_Extensions_Database_Operation_Factory::NONE();
}
示例5: getDatabaseTester
protected function getDatabaseTester()
{
$pdo = new PDO('mysql:host=localhost;dbname=c3op', 'root', '');
$connection = new PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection($pdo, 'c3op');
$tester = new PHPUnit_Extensions_Database_DefaultTester($connection);
$tester->setSetUpOperation(PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT());
$tester->setTearDownOperation(PHPUnit_Extensions_Database_Operation_Factory::NONE());
$tester->setDataSet(new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet(dirname(__FILE__) . '/fixture/projects_seed.xml'));
return $tester;
}
示例6: __construct
function __construct()
{
// connect for unit testing framework
$pdo = new PDO('mysql:host=' . HOST . ';dbname=' .
DB_NAME, USERNAME, PASSWORD);
$connection = new PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection($pdo, 'test');
$tester = new PHPUnit_Extensions_Database_DefaultTester($connection);
$tester->setSetUpOperation(PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT());
$tester->setTearDownOperation(PHPUnit_Extensions_Database_Operation_Factory::NONE());
$tester->setDataSet(new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet
(dirname(__FILE__).'/../models/files/users.xml'));
$this->tester = $tester;
}
示例7: getSetUpOperation
protected function getSetUpOperation()
{
if (self::$_oldDataset == null)
{
return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(true);
}
else if (self::$_oldDataset != $this->_dataset)
{
$truncate = PHPUnit_Extensions_Database_Operation_Factory::TRUNCATE(true);
$truncate->execute($this->getConnection(),
$this->createFlatXMLDataSet(self::$_oldDataset));
return PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT(true);
}
else
{
return PHPUnit_Extensions_Database_Operation_Factory::NONE();
}
}
示例8: getTearDownOperation
/**
* Returns the database operation executed in test cleanup.
*
* @return PHPUnit_Extensions_Database_Operation_DatabaseOperation
*/
protected function getTearDownOperation()
{
return PHPUnit_Extensions_Database_Operation_Factory::NONE();
}
示例9: __construct
/**
* Creates a new database tester.
*
* @param PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection
*/
public function __construct()
{
$this->setUpOperation = PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT();
$this->tearDownOperation = PHPUnit_Extensions_Database_Operation_Factory::NONE();
}
示例10: __construct
public function __construct(IDatabaseConnection $connection)
{
$this->connection = $connection;
$this->setUpOperation = new \PHPUnit_Extensions_Database_Operation_Composite(array(new Operations\Truncate($connection->allowsCascading()), OperationFactory::INSERT()));
$this->tearDownOperation = OperationFactory::NONE();
}
示例11: getSetUpOperation
public function getSetUpOperation()
{
return PHPUnit_Extensions_Database_Operation_Factory::NONE();
}