protected function UnitTestBase::invokeMethod in Feeds extensible parsers 8
Calls a private or protected method on an object.
Parameters
object $object: The object to invoke a method on.
string $method: The name of the method.
array $arguments: (optional) The arguments to provide to the method. Defaults to an empty array.
Return value
mixed Whatever the method returns.
5 calls to UnitTestBase::invokeMethod()
- JmesPathParserTest::testValidateExpression in tests/
src/ Unit/ Feeds/ Parser/ JmesPathParserTest.php - Tests JMESPath validation.
- JsonPathParserTest::testErrorHandling in tests/
src/ Unit/ Feeds/ Parser/ JsonPathParserTest.php - Tests parsing error handling.
- JsonPathParserTest::testValidateExpression in tests/
src/ Unit/ Feeds/ Parser/ JsonPathParserTest.php - Tests JSONPath validation.
- QueryPathXmlParserTest::testValidateExpression in tests/
src/ Unit/ Feeds/ Parser/ QueryPathXmlParserTest.php - Tests QueryPath validation.
- XmlParserTest::testValidateExpression in tests/
src/ Unit/ Feeds/ Parser/ XmlParserTest.php - Tests XPath validation.
File
- tests/
src/ Unit/ UnitTestBase.php, line 52
Class
- UnitTestBase
- Base class for units tests.
Namespace
Drupal\Tests\feeds_ex\UnitCode
protected function invokeMethod($object, $method, array $arguments = []) {
$reflector = new ReflectionMethod($object, $method);
$reflector
->setAccessible(TRUE);
return $reflector
->invokeArgs($object, $arguments);
}