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
 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
 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
 /**
  * @param TestCase $testcase
  */
 public function _after(TestCase $testcase)
 {
     Test::clean();
     parent::_after($testcase);
 }
 function _after(TestCase $test)
 {
     test::clean();
 }
示例#10
0
文件: ControlTest.php 项目: mpyw/co
 public function _after()
 {
     test::clean();
 }
 public function _before()
 {
     $this->funcInjector = new FunctionInjector('demo', 'strlen');
     test::clean();
 }
 protected function teardown()
 {
     test::clean();
 }
 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
 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();
 }
 public function tearDown()
 {
     // Always clean test doubles registry between tests to prevent
     // potential conflicts and unnecessary confusion.
     test::clean();
 }
示例#19
0
 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
 function _after(TestCase $test)
 {
     \AspectMock\Test::clean();
 }
示例#21
0
 /**
  * executed after each test
  */
 public function _after()
 {
     Test::clean();
     unset($_SERVER["REQUEST_METHOD"]);
 }
 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
 public function _after(\Codeception\TestCase $test)
 {
     \AspectMock\Test::clean();
     Config::setOutput(new ConsoleOutput());
 }
示例#26
0
 function _after(\Codeception\TestCase $test)
 {
     \AspectMock\Test::clean();
 }
示例#27
0
 protected function tearDown()
 {
     m::close();
     am::clean();
 }
示例#28
0
 public function setUp()
 {
     test::clean();
     test::double('common\\models\\User', ['findByUsername' => new User(), 'getId' => 1]);
 }