Changes between Initial Version and Version 2 of Ticket #38853
- Timestamp:
- 11/19/2016 01:57:37 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #38853
- Property Keywords close reporter-feedback added
-
Ticket #38853 – Description
initial v2 2 2 I have been playing with Theme Unit Testing using WP_UnitTestCase for some days, And I might have find an issue here: http://develop.svn.wordpress.org/trunk/tests/phpunit/includes/ 3 3 4 It seems a change in testcase.php (line 238) now causes a fatal error when you run phpunit "Fatal error: __clone method called on non-object"4 It seems a change in testcase.php (line 238) now causes a fatal error when you run phpunit `Fatal error: __clone method called on non-object` 5 5 6 6 I have tested this in different situations and systems all with same result, This even happen with WordPress default Theme. 7 7 8 I know that WP_UnitTestCase is not designed for Theme Testing but this can be resolved simply by using an "is_object( $hook_object )"condition.8 I know that WP_UnitTestCase is not designed for Theme Testing but this can be resolved simply by using an `is_object( $hook_object )` condition. 9 9 10 10 If anyone is wondering how Theme Testing works using WP_UnitTestCase [https://nerds.inn.org/2014/10/22/unit-testing-themes-and-plugins-in-wordpress/ here's a good start]