Skip to content

Commit

Permalink
Add test case for #244
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetx committed Nov 18, 2018
1 parent 5c8bf0c commit f2265fc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/requestparse_tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,22 @@ public function testMapFnToApiMethod()
], $result);
// check that inline parameter was removed from array
$this->assertArrayNotHasKey('account_id', $apiparams);

$apiparams = [
'test' => 1,
'env_name' => 'testenv'
];
$result = $cb->call(
'_mapFnToApiMethod',
'accountActivity_all_ENV_NAME_webhooks',
$apiparams
);
$this->assertEquals([
'account_activity/all/testenv/webhooks',
'account_activity/all/:env_name/webhooks'
], $result);
// check that inline parameter was removed from array
$this->assertArrayNotHasKey('env_name', $apiparams);
}

/**
Expand Down

0 comments on commit f2265fc

Please sign in to comment.