Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #38853


Ignore:
Timestamp:
11/19/2016 01:57:37 AM (10 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #38853

    • Property Keywords close reporter-feedback added
  • Ticket #38853 – Description

    initial v2  
    22I 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/
    33
    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"
     4It 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`
    55
    66I have tested this in different situations and systems all with same result, This even happen with WordPress default Theme.
    77
    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.
     8I know that WP_UnitTestCase is not designed for Theme Testing but this can be resolved simply by using an `is_object( $hook_object )` condition.
    99
    1010If 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]