I want to add test coverage to a method inside a PHP class which invokes a PHP-built-in method. To be able to mock copy(), I had to create a wrapper class. Is there a better way to mock PHP's built-in methods? By "better", I mean that I do not want to introduce a wrapper class just for the sake of the unit testing.
I've checked these docs but could not find an answer.
I use PHP and PHPUnit only for a side project, therefore I might overlook something obvious?