/** * Test the getResourceMethod method for getting the proper request method * * @param string|int $expected * @param string $requestKey * @param string|int $requestValue * @param string $paramAlias * @param string $paramId * @dataProvider providerGetResourceMethod */ public function testGetResourceMethod($expected, $requestKey, $requestValue, $paramAlias = 'q', $paramId = 'id') { $_REQUEST[$requestKey] = $requestValue; $this->modx->setOption('request_param_alias', $paramAlias); $this->modx->setOption('request_param_id', $paramId); $method = $this->request->getResourceMethod(); $this->assertEquals($expected, $method, 'The Resource Method did not match the expected value.'); unset($_REQUEST[$requestKey]); }