public static function PHPUnit_Util_InvalidArgumentHelper::factory

Parameters

integer $argument:

string $type:

mixed $value:

65 calls to PHPUnit_Util_InvalidArgumentHelper::factory()
PHPUnit_Extensions_PhptTestCase::__construct in drupal/core/vendor/phpunit/phpunit/PHPUnit/Extensions/PhptTestCase.php
Constructs a test case with the given filename.
PHPUnit_Extensions_PhptTestSuite::__construct in drupal/core/vendor/phpunit/phpunit/PHPUnit/Extensions/PhptTestSuite.php
Constructs a new TestSuite for .phpt test cases.
PHPUnit_Extensions_RepeatedTest::__construct in drupal/core/vendor/phpunit/phpunit/PHPUnit/Extensions/RepeatedTest.php
Constructor.
PHPUnit_Framework_Assert::assertArrayHasKey in drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php
Asserts that an array has a specified key.
PHPUnit_Framework_Assert::assertArrayNotHasKey in drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php
Asserts that an array does not have a specified key.

... See full list

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/InvalidArgumentHelper.php, line 65

Class

PHPUnit_Util_InvalidArgumentHelper
Factory for PHPUnit_Framework_Exception objects that are used to describe invalid arguments passed to a function or method.

Code

public static function factory($argument, $type, $value = NULL) {
  $stack = debug_backtrace(FALSE);
  return new PHPUnit_Framework_Exception(sprintf('Argument #%d%sof %s::%s() must be a %s', $argument, $value !== NULL ? ' (' . $value . ')' : ' ', $stack[1]['class'], $stack[1]['function'], $type));
}