当前位置: 首页>>代码示例>>PHP>>正文


PHP Prophet::getProphecies方法代码示例

本文整理汇总了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()));
             }
         }
     }
 }
开发者ID:phpspec,项目名称:prophecy-phpunit,代码行数:11,代码来源:ProphecyTestCase.php

示例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;
         }
     }
 }
开发者ID:Arachnias,项目名称:FlobFoundationBundle,代码行数:24,代码来源:BaseTestCase.php

示例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;
         }
     }
 }
开发者ID:emsdog,项目名称:lumen-todo,代码行数:31,代码来源:TestCase.php

示例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();
     }
 }
开发者ID:potherca-contrib,项目名称:phpunit,代码行数:26,代码来源:TestCase.php


注:本文中的Prophecy\Prophet::getProphecies方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。