當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。