{"action":"closed","issue":{"url":"https://api.github.com/repos/php-mock/php-mock/issues/11","labels_url":"https://api.github.com/repos/php-mock/php-mock/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/php-mock/php-mock/issues/11/comments","events_url":"https://api.github.com/repos/php-mock/php-mock/issues/11/events","html_url":"https://github.com/php-mock/php-mock/issues/11","id":70811759,"number":11,"title":"Missing argument 5 for My/Space/mcrypt_decrypt()","user":{"login":"Raederle","id":763901,"avatar_url":"https://avatars.githubusercontent.com/u/763901?v=3","gravatar_id":"","url":"https://api.github.com/users/Raederle","html_url":"https://github.com/Raederle","followers_url":"https://api.github.com/users/Raederle/followers","following_url":"https://api.github.com/users/Raederle/following{/other_user}","gists_url":"https://api.github.com/users/Raederle/gists{/gist_id}","starred_url":"https://api.github.com/users/Raederle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Raederle/subscriptions","organizations_url":"https://api.github.com/users/Raederle/orgs","repos_url":"https://api.github.com/users/Raederle/repos","events_url":"https://api.github.com/users/Raederle/events{/privacy}","received_events_url":"https://api.github.com/users/Raederle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-24T22:36:33Z","updated_at":"2015-04-24T23:49:55Z","closed_at":"2015-04-24T23:49:55Z","body":"Just starting to use this library, hoping I'm not missing something obvious.\r\n\r\nI have a method that uses mcrypt_decrypt().  The call looks like this:\r\n\r\n    $plainTextToken = mcrypt_decrypt(\r\n        MCRYPT_RIJNDAEL_128 , \r\n        $hashedKey, \r\n        hex2bin($token),  \r\n        'ecb'\r\n    );\r\n\r\nWhen I try to set this up using PHP-Mock, I do this:\r\n\r\n    $dummyPlainTextToken = 'foo|bar';\r\n    $mcrypt = $this->getFunctionMock(__NAMESPACE__, \"mcrypt_decrypt\");\r\n    $mcrypt->expects($this->once())->willReturn($dummyPlainTextToken);\r\n    ...\r\n    $result = myFunc();\r\n\r\nThe error I get is:\r\n\r\n    Missing argument 5 for mcrypt_decrypt()...\r\n\r\nThe fifth argument ($iv) is optional, and the function works outside of the test, so I'm not sure why it's required."}}