[wp-trac] [WordPress Trac] #38853: WordPress Test Suite causes Fatal Error when used for Theme Testing
WordPress Trac
noreply at wordpress.org
Fri Nov 18 18:39:49 UTC 2016
#38853: WordPress Test Suite causes Fatal Error when used for Theme Testing
---------------------------+-----------------------------
Reporter: michaeltaheri | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
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/
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"
I have tested this in different situations and systems all with same
result, This even happen with WordPress default Theme.
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.
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]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38853>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list