You are here

public function ArgumentsResolverTest::testGetArgumentObject in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 76
Contains \Drupal\Tests\Component\Utility\ArgumentsResolverTest.

Class

ArgumentsResolverTest
@coversDefaultClass \Drupal\Component\Utility\ArgumentsResolver @group Access

Namespace

Drupal\Tests\Component\Utility

Code

public function testGetArgumentObject() {
  $callable = function (\stdClass $object) {
  };
  $object = new \stdClass();
  $arguments = (new ArgumentsResolver([], [
    'object' => $object,
  ], []))
    ->getArguments($callable);
  $this
    ->assertSame([
    $object,
  ], $arguments);
}