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


PHP Test::clean方法代码示例

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


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

示例1: tearDown

 public function tearDown()
 {
     parent::tearDown();
     Mockery::close();
     Test::clean();
     $this->dropDatabase();
 }
开发者ID:estebanmatias92,项目名称:pull-automatically-galleries,代码行数:7,代码来源:TestCase.php

示例2: _after

 protected function _after()
 {
     // unset the api class after each test
     unset($this->api);
     // Clear any mocks etc
     Test::clean();
 }
开发者ID:delboy1978uk,项目名称:phpbitcoin,代码行数:7,代码来源:ControlTest.php

示例3: _after

 public function _after(\Codeception\TestCase $test)
 {
     // Ensure that $stopOnFail global static is reset, as tests
     // that set it to true will force an exception, and therefor
     // will not have a chance to clean this up.
     \Robo\Result::$stopOnFail = false;
     \AspectMock\Test::clean();
     $consoleOutput = new ConsoleOutput();
     static::$container->add('output', $consoleOutput);
     static::$container->add('logger', new \Consolidation\Log\Logger($consoleOutput));
 }
开发者ID:jjok,项目名称:Robo,代码行数:11,代码来源:CodeHelper.php

示例4: tearDown

 public function tearDown()
 {
     $this->addToAssertionCount($this->logger->mockery_getExpectationCount());
     $this->addToAssertionCount($this->manager->mockery_getExpectationCount());
     if ($this->worker) {
         $this->addToAssertionCount($this->worker->mockery_getExpectationCount());
     }
     m::close();
     test::clean();
     parent::tearDown();
 }
开发者ID:fortrabbit,项目名称:beelzebub,代码行数:11,代码来源:DaemonTest.php

示例5: testCall

 public function testCall()
 {
     $request = $this->prepareRequest();
     // check if curl is not installed
     test::func('esia', 'curl_init', false);
     $response = $request->call('stub');
     $this->assertNull($response);
     // check if correct call
     test::clean();
     test::func('esia', 'curl_exec', '{}');
     $response = $request->call('stub');
     $this->assertTrue($response instanceof \stdClass);
 }
开发者ID:EvercodeLab,项目名称:esia,代码行数:13,代码来源:RequestTest.php

示例6: setUp

 protected function setUp()
 {
     test::clean();
 }
开发者ID:theypsilon,项目名称:AspectMock,代码行数:4,代码来源:NamespacesTest.php

示例7: tearDown

 protected function tearDown()
 {
     test::clean();
     // 登録したモックをすべて削除
 }
开发者ID:sato5603,项目名称:fuelphp1st-2nd,代码行数:5,代码来源:amtestcase.php

示例8: _after

 /**
  * @param TestCase $testcase
  */
 public function _after(TestCase $testcase)
 {
     Test::clean();
     parent::_after($testcase);
 }
开发者ID:manyoubaby123,项目名称:imshop,代码行数:8,代码来源:CodeHelper.php

示例9:

 function _after(TestCase $test)
 {
     test::clean();
 }
开发者ID:cubicmushroom,项目名称:slim-service-manager,代码行数:4,代码来源:UnitHelper.php

示例10: _after

 public function _after()
 {
     test::clean();
 }
开发者ID:mpyw,项目名称:co,代码行数:4,代码来源:ControlTest.php

示例11: _before

 public function _before()
 {
     $this->funcInjector = new FunctionInjector('demo', 'strlen');
     test::clean();
 }
开发者ID:stefandoorn,项目名称:AspectMock,代码行数:5,代码来源:FunctionInjectorTest.php

示例12: teardown

 protected function teardown()
 {
     test::clean();
 }
开发者ID:marcellorvalle,项目名称:php-sandbox,代码行数:4,代码来源:AutoloaderTest.php

示例13: tearDown

 protected function tearDown()
 {
     fclose($this->out);
     $this->listener = null;
     AspectMock\Test::clean();
 }
开发者ID:munkie,项目名称:phpunit-teamcity-testlistener,代码行数:6,代码来源:TestListenerTest.php

示例14: tearDown

 protected function tearDown()
 {
     // remove all registered test doubles
     AspectMock::clean();
 }
开发者ID:carstenwindler,项目名称:cleansman,代码行数:5,代码来源:ModuleInitTest.php

示例15: testCleanupSpecificObj

 public function testCleanupSpecificObj()
 {
     $model = test::double('demo\\UserModel');
     $user1 = test::doubleProxy($model->make(), ['getName' => 'bad boy']);
     $user2 = test::doubleProxy($model->make(), ['getName' => 'good boy']);
     verify($user1->getName())->equals('bad boy');
     verify($user2->getName())->equals('good boy');
     test::clean($user1);
     verify($user1->getName())->null();
     verify($user2->getName())->equals('good boy');
 }
开发者ID:theypsilon,项目名称:AspectMock,代码行数:11,代码来源:testDoubleTest.php


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