コード例 #1
0
 public function tearDown()
 {
     parent::tearDown();
     Mockery::close();
     Test::clean();
     $this->dropDatabase();
 }
コード例 #2
0
 protected function _after()
 {
     // unset the api class after each test
     unset($this->api);
     // Clear any mocks etc
     Test::clean();
 }
コード例 #3
0
ファイル: CodeHelper.php プロジェクト: jjok/Robo
 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));
 }
コード例 #4
0
ファイル: DaemonTest.php プロジェクト: fortrabbit/beelzebub
 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();
 }
コード例 #5
0
ファイル: RequestTest.php プロジェクト: EvercodeLab/esia
 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);
 }
コード例 #6
0
 protected function setUp()
 {
     test::clean();
 }
コード例 #7
0
 protected function tearDown()
 {
     test::clean();
     // 登録したモックをすべて削除
 }
コード例 #8
0
ファイル: CodeHelper.php プロジェクト: manyoubaby123/imshop
 /**
  * @param TestCase $testcase
  */
 public function _after(TestCase $testcase)
 {
     Test::clean();
     parent::_after($testcase);
 }
コード例 #9
0
 function _after(TestCase $test)
 {
     test::clean();
 }
コード例 #10
0
ファイル: ControlTest.php プロジェクト: mpyw/co
 public function _after()
 {
     test::clean();
 }
コード例 #11
0
 public function _before()
 {
     $this->funcInjector = new FunctionInjector('demo', 'strlen');
     test::clean();
 }
コード例 #12
0
 protected function teardown()
 {
     test::clean();
 }
コード例 #13
0
 protected function tearDown()
 {
     fclose($this->out);
     $this->listener = null;
     AspectMock\Test::clean();
 }
コード例 #14
0
 protected function tearDown()
 {
     // remove all registered test doubles
     AspectMock::clean();
 }
コード例 #15
0
 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');
 }
コード例 #16
0
ファイル: CodeHelper.php プロジェクト: sliver/Robo
 public function _after(\Codeception\TestCase $test)
 {
     \AspectMock\Test::clean();
     Runner::setPrinter(null);
 }
コード例 #17
0
 protected function _after()
 {
     // unset the api class after each test
     unset($this->api);
     Test::clean();
 }
コード例 #18
0
 public function tearDown()
 {
     // Always clean test doubles registry between tests to prevent
     // potential conflicts and unnecessary confusion.
     test::clean();
 }
コード例 #19
0
ファイル: OpenIdTest.php プロジェクト: EvercodeLab/esia
 public function testGetUrl()
 {
     $url = $this->openId->getUrl();
     $this->assertNotFalse(filter_var($url, FILTER_VALIDATE_URL));
     test::double($this->openId, ['signPKCS7' => false]);
     $url = $this->openId->getUrl();
     $this->assertFalse(filter_var($url, FILTER_VALIDATE_URL));
     test::clean();
 }
コード例 #20
0
ファイル: UnitHelper.php プロジェクト: mayconbordin/reloquent
 function _after(TestCase $test)
 {
     \AspectMock\Test::clean();
 }
コード例 #21
0
ファイル: FileTest.php プロジェクト: phalcon/cphalcon
 /**
  * executed after each test
  */
 public function _after()
 {
     Test::clean();
     unset($_SERVER["REQUEST_METHOD"]);
 }
コード例 #22
0
 protected function tearDown()
 {
     test::clean();
     // remove all registered test doubles
 }
コード例 #23
0
 protected function _after()
 {
     Test::clean();
 }
コード例 #24
0
 public function tearDown()
 {
     test::clean();
 }
コード例 #25
0
ファイル: CodeHelper.php プロジェクト: stefanhuber/Robo
 public function _after(\Codeception\TestCase $test)
 {
     \AspectMock\Test::clean();
     Config::setOutput(new ConsoleOutput());
 }
コード例 #26
0
ファイル: Unit.php プロジェクト: awesomemotive/drip
 function _after(\Codeception\TestCase $test)
 {
     \AspectMock\Test::clean();
 }
コード例 #27
0
ファイル: ProxyTest.php プロジェクト: menthol/Flexible
 protected function tearDown()
 {
     m::close();
     am::clean();
 }
コード例 #28
0
 public function setUp()
 {
     test::clean();
     test::double('common\\models\\User', ['findByUsername' => new User(), 'getId' => 1]);
 }