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


PHP Test\TestCase类代码示例

本文整理汇总了PHP中Test\TestCase的典型用法代码示例。如果您正苦于以下问题:PHP TestCase类的具体用法?PHP TestCase怎么用?PHP TestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TestCase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tearDown

 public function tearDown()
 {
     unset($this->backend);
     unset($this->ab);
     Utils\Properties::purgeIndexes($this->contactIds);
     parent::tearDown();
 }
开发者ID:gvde,项目名称:contacts-8,代码行数:7,代码来源:addressbookproviderTest.php

示例2: tearDownAfterClass

 public static function tearDownAfterClass()
 {
     \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER1);
     \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER2);
     \OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER3);
     parent::tearDownAfterClass();
 }
开发者ID:0x17de,项目名称:core,代码行数:7,代码来源:MigrationTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     $this->session = $this->getMockBuilder('\\OCP\\ISession')->disableOriginalConstructor()->getMock();
     $this->userSession = $this->getMockBuilder('\\OCP\\IUserSession')->disableOriginalConstructor()->getMock();
     $this->auth = new \OCA\DAV\Connector\Sabre\Auth($this->session, $this->userSession);
 }
开发者ID:TechArea,项目名称:core,代码行数:7,代码来源:auth.php

示例4: setUp

 protected function setUp()
 {
     parent::setUp();
     if (!function_exists('idn_to_ascii')) {
         $this->markTestSkipped('The intl extension is not available.');
     }
 }
开发者ID:riso,项目名称:owncloud-core,代码行数:7,代码来源:mail.php

示例5: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->tagManager = $this->getMock('\\OCP\\SystemTag\\ISystemTagManager');
     $this->tagMapper = $this->getMock('\\OCP\\SystemTag\\ISystemTagObjectMapper');
     $this->node = new \OCA\DAV\SystemTag\SystemTagsObjectMappingCollection(111, 'files', $this->tagManager, $this->tagMapper);
 }
开发者ID:gmurayama,项目名称:core,代码行数:7,代码来源:systemtagsobjectmappingcollection.php

示例6: setUp

 public function setUp()
 {
     $this->userManager = $this->getMockBuilder('\\OCP\\IUserManager')->disableOriginalConstructor()->getMock();
     $this->config = $this->getMockBuilder('\\OCP\\IConfig')->disableOriginalConstructor()->getMock();
     $this->connector = new \OCA\DAV\Connector\Sabre\Principal($this->config, $this->userManager);
     parent::setUp();
 }
开发者ID:evanjt,项目名称:core,代码行数:7,代码来源:principal.php

示例7: tearDown

 protected function tearDown()
 {
     $conn = \OC_DB::getConnection();
     $conn->executeQuery('DELETE FROM `*PREFIX*vcategory_to_object`');
     $conn->executeQuery('DELETE FROM `*PREFIX*vcategory`');
     parent::tearDown();
 }
开发者ID:heldernl,项目名称:owncloud8-extended,代码行数:7,代码来源:tags.php

示例8: tearDown

 protected function tearDown()
 {
     if ($this->instance) {
         $this->instance->clear();
     }
     parent::tearDown();
 }
开发者ID:rchicoli,项目名称:owncloud-core,代码行数:7,代码来源:TestCache.php

示例9: setUp

 protected function setUp()
 {
     parent::setUp();
     self::$logs = array();
     $this->config = $this->getMockBuilder('\\OC\\SystemConfig')->disableOriginalConstructor()->getMock();
     $this->logger = new Log('Test\\Logger', $this->config);
 }
开发者ID:julakali,项目名称:core,代码行数:7,代码来源:logger.php

示例10: setUp

	public function setUp() {
		parent::setUp();
		$this->view = $this->getMockBuilder('OC\Files\View')
			->disableOriginalConstructor()
			->getMock();

		$this->userManager = $this->getMockBuilder('OC\User\Manager')
			->disableOriginalConstructor()
			->getMock();

		$this->groupManager = $this->getMockBuilder('OC\Group\Manager')
			->disableOriginalConstructor()
			->getMock();

		$this->config = $this->getMockBuilder('OCP\IConfig')
			->disableOriginalConstructor()
			->getMock();

		$this->util = new Util(
			$this->view,
			$this->userManager,
			$this->groupManager,
			$this->config
		);

	}
开发者ID:ninjasilicon,项目名称:core,代码行数:26,代码来源:utiltest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $this->request = $this->getMockBuilder('\\OCP\\IRequest')->disableOriginalConstructor()->getMock();
     $this->externalManager = $this->getMockBuilder('\\OCA\\Files_Sharing\\External\\Manager')->disableOriginalConstructor()->getMock();
     $this->clientService = $this->getMockBuilder('\\OCP\\Http\\Client\\IClientService')->disableOriginalConstructor()->getMock();
 }
开发者ID:GitHubUser4234,项目名称:core,代码行数:7,代码来源:ExternalShareControllerTest.php

示例12: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->tagManager = $this->getMock('\\OCP\\SystemTag\\ISystemTagManager');
     $this->tagMapper = $this->getMock('\\OCP\\SystemTag\\ISystemTagObjectMapper');
     $this->user = $this->getMock('\\OCP\\IUser');
 }
开发者ID:rchicoli,项目名称:owncloud-core,代码行数:7,代码来源:SystemTagsObjectMappingCollectionTest.php

示例13: setUp

 protected function setUp()
 {
     parent::setUp();
     $this->user = new DummyUser('foo', \OC::$server->getTempManager()->getTemporaryFolder());
     $this->storage = new \OC\Files\Storage\Home(array('user' => $this->user));
     $this->cache = $this->storage->getCache();
 }
开发者ID:rchicoli,项目名称:owncloud-core,代码行数:7,代码来源:HomeCacheTest.php

示例14: setUp

	public function setUp() {
		parent::setUp();

		$this->request = $this->getMockBuilder('\OCP\IRequest')
			->disableOriginalConstructor()->getMock();
		$this->config = $this->getMockBuilder('\OCP\IConfig')
			->disableOriginalConstructor()->getMock();
		$this->config = $this->getMockBuilder('\OCP\IConfig')
			->disableOriginalConstructor()->getMock();
		$this->clientService = $this->getMockBuilder('\OCP\Http\Client\IClientService')
			->disableOriginalConstructor()->getMock();
		$this->util = $this->getMockBuilder('\OC_Util')
			->disableOriginalConstructor()->getMock();
		$this->urlGenerator = $this->getMockBuilder('\OCP\IURLGenerator')
			->disableOriginalConstructor()->getMock();

		$this->checkSetupController = new CheckSetupController(
			'settings',
			$this->request,
			$this->config,
			$this->clientService,
			$this->urlGenerator,
			$this->util
		);
	}
开发者ID:ninjasilicon,项目名称:core,代码行数:25,代码来源:CheckSetupControllerTest.php

示例15: setUp

 protected function setUp()
 {
     parent::setUp();
     $connection = \OC::$server->getDatabaseConnection();
     $this->expressionBuilder = new ExpressionBuilder($connection);
     $this->doctrineExpressionBuilder = new DoctrineExpressionBuilder($connection);
 }
开发者ID:0x17de,项目名称:core,代码行数:7,代码来源:expressionbuildertest.php


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