On Mon, 16 Jan 2012 19:06:31 +0100, Jan Dolecek <juzna...@gmail.com> wrote:

Hi,

reflection is a great tool for testing, but it still misses support
for mocking classes/methods marked as final. I created a small patch
https://gist.github.com/1621839#file_php_finals.patch, examples how to
use it https://gist.github.com/1621839#file_final_test.php and wrote a
short article explaining it:
http://blog.juzna.cz/2012/01/mock-vs-final-fights-in-testing/.


This doesn't seem right. Correct me if I'm wrong: for internal classes, their data structures are allocated permanently, so I'd say the effects of removing the flag would be permanent (i.e., would affect subsequent requests). And for threaded builds this could cause races between the threads.

--
Gustavo Lopes

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to