本文整理汇总了PHP中Prophecy\Prophet::getProphecies方法的典型用法代码示例。如果您正苦于以下问题:PHP Prophet::getProphecies方法的具体用法?PHP Prophet::getProphecies怎么用?PHP Prophet::getProphecies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Prophecy\Prophet
的用法示例。
在下文中一共展示了Prophet::getProphecies方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: countProphecyAssertions
private function countProphecyAssertions()
{
$this->prophecyAssertionsCounted = true;
foreach ($this->prophet->getProphecies() as $objectProphecy) {
foreach ($objectProphecy->getMethodProphecies() as $methodProphecies) {
foreach ($methodProphecies as $methodProphecy) {
$this->addToAssertionCount(count($methodProphecy->getCheckedPredictions()));
}
}
}
}
示例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
/**
* Verifies the mock object expectations.
*
* @since Method available since Release 3.5.0
*/
protected function verifyMockObjects()
{
foreach ($this->mockObjects as $mockObject) {
if ($mockObject->__phpunit_hasMatchers()) {
$this->numAssertions++;
}
$mockObject->__phpunit_verify();
}
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->numAssertions += count($methodProphecy->getCheckedPredictions());
}
}
}
if (isset($e)) {
throw $e;
}
}
}
示例4: verifyMockObjects
/**
* Verifies the mock object expectations.
*
* @since Method available since Release 3.5.0
*/
protected function verifyMockObjects()
{
foreach ($this->mockObjects as $mockObject) {
if ($mockObject->__phpunit_hasMatchers()) {
$this->numAssertions++;
}
$mockObject->__phpunit_verify();
}
if ($this->prophet !== null) {
foreach ($this->prophet->getProphecies() as $objectProphecy) {
foreach ($objectProphecy->getMethodProphecies() as $methodProphecies) {
foreach ($methodProphecies as $methodProphecy) {
if ($methodProphecy->getPrediction() !== null) {
$this->numAssertions++;
}
}
}
}
$this->prophet->checkPredictions();
}
}