本文整理汇总了PHP中PHPUnit_Framework_TestCase::verifyMockObjects方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_TestCase::verifyMockObjects方法的具体用法?PHP PHPUnit_Framework_TestCase::verifyMockObjects怎么用?PHP PHPUnit_Framework_TestCase::verifyMockObjects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Framework_TestCase
的用法示例。
在下文中一共展示了PHPUnit_Framework_TestCase::verifyMockObjects方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: verifyMockObjects
protected function verifyMockObjects()
{
parent::verifyMockObjects();
if (null === $this->prophet) {
return;
}
try {
$this->prophet->checkPredictions();
} catch (\Exception $e) {
/** Intentionally left empty */
}
$this->countProphecyAssertions();
if (isset($e)) {
throw $e;
}
}
示例2: verifyMockObjects
/**
* {@inheritdoc}
*/
protected function verifyMockObjects()
{
parent::verifyMockObjects();
if ($this->prophet !== null) {
try {
$this->prophet->checkPredictions();
} catch (\Exception $e) {
/** Intentionally left empty */
}
foreach ($this->prophet->getProphecies() as $objectProphecy) {
foreach ($objectProphecy->getMethodProphecies() as $methodProphecies) {
foreach ($methodProphecies as $methodProphecy) {
$this->addToAssertionCount(count($methodProphecy->getCheckedPredictions()));
}
}
}
if (isset($e)) {
throw $e;
}
}
}
示例3: verifyMockObjects
protected function verifyMockObjects()
{
$container = Mockery::getContainer();
if (isset($container)) {
$reflected_container = new ReflectionClass($container);
$reflected_mocks = $reflected_container->getProperty('_mocks');
$reflected_mocks->setAccessible(true);
$mocks = $reflected_mocks->getValue($container);
foreach ($mocks as $mock) {
$reflected_mock = new ReflectionClass($mock);
$reflected_expectations = $reflected_mock->getProperty('_mockery_expectations');
$reflected_expectations->setAccessible(true);
$expectations = $reflected_expectations->getValue($mock);
foreach ($expectations as $director) {
$this->addToAssertionCount(count($director->getExpectations()));
}
}
Mockery::close();
}
parent::verifyMockObjects();
}
示例4: verifyMockObjects
protected function verifyMockObjects()
{
parent::verifyMockObjects();
$this->dumper->verifyCalls();
}
示例5: verifyMockObjects
public function verifyMockObjects()
{
parent::verifyMockObjects();
WpOptions::verify();
}