当前位置: 首页>>代码示例>>PHP>>正文


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怎么用?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;
 }
开发者ID:scalia,项目名称:Vevui,代码行数:7,代码来源:testdb_case.php

示例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;
 }
开发者ID:newsn31,项目名称:StarterTheme,代码行数:12,代码来源:BankAccountCompositeTest.php

示例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();
 }
开发者ID:alab1001101,项目名称:zf2,代码行数:14,代码来源:SimpleTester.php

示例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();
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:15,代码来源:SimpleTester.php

示例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;
 }
开发者ID:racporto,项目名称:c3op,代码行数:10,代码来源:dbXest.php

示例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;
    }
开发者ID:robehickman,项目名称:decentralised_microblogging_system,代码行数:16,代码来源:ctrlMessagesTest.php

示例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();
		}
	}
开发者ID:nathansamson,项目名称:CoOrg,代码行数:19,代码来源:model.test.class.php

示例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();
 }
开发者ID:rmehner,项目名称:phpunit,代码行数:9,代码来源:TestCase.php

示例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();
 }
开发者ID:rmehner,项目名称:phpunit,代码行数:10,代码来源:AbstractTester.php

示例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();
 }
开发者ID:matiasraies,项目名称:Symfony2Inta,代码行数:6,代码来源:DatabaseTester.php

示例11: getSetUpOperation

 public function getSetUpOperation()
 {
     return PHPUnit_Extensions_Database_Operation_Factory::NONE();
 }
开发者ID:eritter-ti,项目名称:ieducar,代码行数:4,代码来源:StaticAdapterTest.php


注:本文中的PHPUnit_Extensions_Database_Operation_Factory::NONE方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。