Skip to content

Instantly share code, notes, and snippets.

@Ikke
Created May 24, 2011 13:16
Show Gist options
  • Save Ikke/988672 to your computer and use it in GitHub Desktop.
Save Ikke/988672 to your computer and use it in GitHub Desktop.
<?php
/**
* @dataProvider provider
*/
public function test_set_access_token_sets_right_post_values($name, $value)
{
$mock_request = $this->getMock('HTTP_RequestWrapper');
$mock_request->expects($this->atLeastOnce())
->method('setPostParameter')
->with($this->equalTo($name), $this->equalTo($value));
}
public function provider()
{
return array(
array('code', 'abcde'),
array('client_id', ""),
array('client_secret', ""),
array('redirect_uri', ""),
array('grant_type', 'authorization_code')
);
}
//Error: PHPUnit_Framework_Error_Warning : E_WARNING: Missing argument 1 for OAuth2_Test::test_set_access_token_sets_right_post_values()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment