/**
  * @covers \Nia\RequestResponse\Cli\CliRequest::getArguments
  */
 public function testGetArguments()
 {
     $expected = ['foo' => 'bar', 'bar' => 'foo', 'baz' => ''];
     $this->assertSame($expected, iterator_to_array($this->request->getArguments()->getIterator()));
 }
Example #2
0
 /**
  *
  * {@inheritDoc}
  *
  * @see \Nia\Routing\Condition\ConditionInterface::checkCondition($request, $context)
  */
 public function checkCondition(RequestInterface $request, MapInterface $context) : bool
 {
     return $request->getArguments()->has($this->argumentName);
 }