本文整理汇总了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();
}
示例2: _after
protected function _after()
{
// unset the api class after each test
unset($this->api);
// Clear any mocks etc
Test::clean();
}
示例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));
}
示例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();
}
示例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);
}
示例6: setUp
protected function setUp()
{
test::clean();
}
示例7: tearDown
protected function tearDown()
{
test::clean();
// 登録したモックをすべて削除
}
示例8: _after
/**
* @param TestCase $testcase
*/
public function _after(TestCase $testcase)
{
Test::clean();
parent::_after($testcase);
}
示例9:
function _after(TestCase $test)
{
test::clean();
}
示例10: _after
public function _after()
{
test::clean();
}
示例11: _before
public function _before()
{
$this->funcInjector = new FunctionInjector('demo', 'strlen');
test::clean();
}
示例12: teardown
protected function teardown()
{
test::clean();
}
示例13: tearDown
protected function tearDown()
{
fclose($this->out);
$this->listener = null;
AspectMock\Test::clean();
}
示例14: tearDown
protected function tearDown()
{
// remove all registered test doubles
AspectMock::clean();
}
示例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');
}