Skip to content

Commit

Permalink
Unit test for Query::addParam() (#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomascorthals authored Jul 24, 2024
1 parent ed974de commit 19838ed
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/Core/Query/RequestBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ public function testBuildWithInteger()
);
}

public function testBuildWithArray()
{
$query = new SelectQuery();
$query->addParam('p1', 'v1');
$query->addParam('p2', ['a1', 'a2']);
$query->setResponseWriter('xyz');
$request = $this->builder->build($query);

$this->assertSame(
'select?omitHeader=true&p1=v1&p2=a1&p2=a2&wt=xyz',
urldecode($request->getUri())
);
}

public function testBuildWithHeader()
{
$query = new SelectQuery();
Expand Down

0 comments on commit 19838ed

Please sign in to comment.