Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ProphecyTrait.php

function ProphecyTrait::countProphecyAssertions

@internal

2 calls to ProphecyTrait::countProphecyAssertions()
ProphecyTrait::tearDownProphecy in vendor/phpspec/prophecy-phpunit/src/ProphecyTrait.php
@after
ProphecyTrait::verifyProphecyDoubles in vendor/phpspec/prophecy-phpunit/src/ProphecyTrait.php
@postCondition

File

vendor/phpspec/prophecy-phpunit/src/ProphecyTrait.php, line 98

Class

ProphecyTrait
@mixin TestCase

Namespace

Prophecy\PhpUnit

Code

private function countProphecyAssertions() : void {
    \assert($this instanceof TestCase);
    \assert($this->prophet !== null);
    $this->prophecyAssertionsCounted = true;
    foreach ($this->prophet
        ->getProphecies() as $objectProphecy) {
        foreach ($objectProphecy->getMethodProphecies() as $methodProphecies) {
            foreach ($methodProphecies as $methodProphecy) {
                \assert($methodProphecy instanceof MethodProphecy);
                $this->addToAssertionCount(\count($methodProphecy->getCheckedPredictions()));
            }
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal