Skip to content

Commit 64c8273

Browse files
committed
#27 added missing test case for empty array default parameter if no query params are set
Signed-off-by: Pascal Paulis <ppaulis@gmail.com>
1 parent 1336434 commit 64c8273

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/AbstractResourceListenerTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,17 @@ public function testDispatchShouldPassWhitelistedQueryParamsToFetchAllMethod()
133133

134134
$this->assertEquals($queryParams, $this->listener->testCase->paramsPassedToListener);
135135
}
136+
137+
/**
138+
* @group 7
139+
*/
140+
public function testDispatchShouldPassEmptyArrayToFetchAllMethodIfNoQueryParamsArePresent()
141+
{
142+
$event = new ResourceEvent();
143+
$event->setName('fetchAll');
144+
145+
$this->listener->dispatch($event);
146+
147+
$this->assertEquals([], $this->listener->testCase->paramsPassedToListener);
148+
}
136149
}

0 commit comments

Comments
 (0)