public function tearDown() { parent::tearDown(); Mockery::close(); Test::clean(); $this->dropDatabase(); }
protected function _after() { // unset the api class after each test unset($this->api); // Clear any mocks etc Test::clean(); }
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)); }
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(); }
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); }
protected function setUp() { test::clean(); }
protected function tearDown() { test::clean(); // 登録したモックをすべて削除 }
/** * @param TestCase $testcase */ public function _after(TestCase $testcase) { Test::clean(); parent::_after($testcase); }
function _after(TestCase $test) { test::clean(); }
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(); }
protected function tearDown() { // remove all registered test doubles AspectMock::clean(); }
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'); }
public function _after(\Codeception\TestCase $test) { \AspectMock\Test::clean(); Runner::setPrinter(null); }
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(); }
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(); }
function _after(TestCase $test) { \AspectMock\Test::clean(); }
/** * executed after each test */ public function _after() { Test::clean(); unset($_SERVER["REQUEST_METHOD"]); }
protected function tearDown() { test::clean(); // remove all registered test doubles }
protected function _after() { Test::clean(); }
public function tearDown() { test::clean(); }
public function _after(\Codeception\TestCase $test) { \AspectMock\Test::clean(); Config::setOutput(new ConsoleOutput()); }
function _after(\Codeception\TestCase $test) { \AspectMock\Test::clean(); }
protected function tearDown() { m::close(); am::clean(); }
public function setUp() { test::clean(); test::double('common\\models\\User', ['findByUsername' => new User(), 'getId' => 1]); }