Skip to:
Content

BuddyPress.org

Changeset 8796


Ignore:
Timestamp:
08/11/2014 10:26:55 PM (12 years ago)
Author:
djpaul
Message:

Revert r8795; instead, fix the tests by skipping them if running in a PHP environment < 5.3.

The https://core.trac.wordpress.org/changeset/29251 change in WordPress trunk/4.0's unit test suite surfaces a bug in PHP 5.2 environments which causes segfaults with _destruct() for static class variables. See https://bugs.php.net/bug.php?id=51822.

As the new tests are only failing in PHP 5.2.17 with WP trunk (at revision 29466 at time of writing), we've decided to fix by requiring the date_query unit tests run only in PHP 5.3+ environments.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-classes.php

    r8795 r8796  
    15441544
    15451545        /**
     1546         * Destructor.
     1547         */
     1548        public function __destruct() {
     1549                remove_filter( 'date_query_valid_columns', array( $this, 'register_date_column' ) );   
     1550        }
     1551
     1552        /**
    15461553         * Registers our date column with WP Date Query to pass validation.
    15471554         *
  • trunk/tests/phpunit/testcases/activity/class.BP_Activity_Activity.php

    r8789 r8796  
    147147         * @group get
    148148         * @group date_query
     149         * @requires PHP 5.3
    149150         */
    150151        public function test_get_with_date_query_before() {
     
    177178         * @group get
    178179         * @group date_query
     180         * @requires PHP 5.3
    179181         */
    180182        public function test_get_with_date_query_range() {
     
    209211         * @group get
    210212         * @group date_query
     213         * @requires PHP 5.3
    211214         */
    212215        public function test_get_with_date_query_after() {
  • trunk/tests/phpunit/testcases/activity/template.php

    r8787 r8796  
    518518         *
    519519         * @group date_query
     520         * @requires PHP 5.3
    520521         */
    521522        function test_bp_has_activities_with_date_query() {
Note: See TracChangeset for help on using the changeset viewer.