function ArgumentsResolverTest::testGetArgumentObject
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php \Drupal\Tests\Component\Utility\ArgumentsResolverTest::testGetArgumentObject()
- 8.9.x core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php \Drupal\Tests\Component\Utility\ArgumentsResolverTest::testGetArgumentObject()
- 11.x core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php \Drupal\Tests\Component\Utility\ArgumentsResolverTest::testGetArgumentObject()
Tests getArgument() with an object.
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ ArgumentsResolverTest.php, line 82
Class
- ArgumentsResolverTest
- @coversDefaultClass \Drupal\Component\Utility\ArgumentsResolver @group Access
Namespace
Drupal\Tests\Component\UtilityCode
public function testGetArgumentObject() : void {
$callable = function (\stdClass $object) {
};
$object = new \stdClass();
$arguments = (new ArgumentsResolver([], [
'object' => $object,
], []))->getArguments($callable);
$this->assertSame([
$object,
], $arguments);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.