Skip to content

Commit f2265fc

Browse files
committed
Add test case for jublo#244
1 parent 5c8bf0c commit f2265fc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/requestparse_tests.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,22 @@ public function testMapFnToApiMethod()
9797
], $result);
9898
// check that inline parameter was removed from array
9999
$this->assertArrayNotHasKey('account_id', $apiparams);
100+
101+
$apiparams = [
102+
'test' => 1,
103+
'env_name' => 'testenv'
104+
];
105+
$result = $cb->call(
106+
'_mapFnToApiMethod',
107+
'accountActivity_all_ENV_NAME_webhooks',
108+
$apiparams
109+
);
110+
$this->assertEquals([
111+
'account_activity/all/testenv/webhooks',
112+
'account_activity/all/:env_name/webhooks'
113+
], $result);
114+
// check that inline parameter was removed from array
115+
$this->assertArrayNotHasKey('env_name', $apiparams);
100116
}
101117

102118
/**

0 commit comments

Comments
 (0)