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


PHP PHPUnit_Framework_TestCase::verifyMockObjects方法代码示例

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

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

示例4: verifyMockObjects

 protected function verifyMockObjects()
 {
     parent::verifyMockObjects();
     $this->dumper->verifyCalls();
 }
开发者ID:trismegiste,项目名称:mondrian,代码行数:5,代码来源:RefactorTemplate.php

示例5: verifyMockObjects

 public function verifyMockObjects()
 {
     parent::verifyMockObjects();
     WpOptions::verify();
 }
开发者ID:fuegas,项目名称:wp_mock,代码行数:5,代码来源:WordPressTestCase.php


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