You are here

public function TermMergerSpy::assertFunctionCalled in Term Merge 8

Checks a function was called on the object.

File

tests/src/Kernel/TestDoubles/TermMergerSpy.php, line 33

Class

TermMergerSpy
A term merge test class that keeps a list of called functions.

Namespace

Drupal\Tests\term_merge\Kernel\TestDoubles

Code

public function assertFunctionCalled($function) {
  if (!isset($this->functionCalls[$function])) {
    throw new \Exception("{$function} was not called");
  }
}