Making WordPress.org

Changeset 12938


Ignore:
Timestamp:
10/06/2023 10:27:51 PM (11 months ago)
Author:
iandunn
Message:

Events: Set correct promo_start to fix failing test

This was missed in r11861. That commit removed the property from $region_data, so it needs to be created here.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/events/1.0/tests/test-index.php

    r12937 r12938  
    178178            'number' => '5',
    179179            'nearby' => array(
     180                // Off the coast of Robben Island, South Africa.
    180181                'latitude'  => '-33.849951',
    181182                'longitude' => '18.426246',
     
    210211        $other_user_agent = 'Smith';
    211212
     213        $promo_start               = strtotime( $region_data['us']['event']['date'] . ' - 2 months' );
    212214        $time_before_promo         = strtotime( '2019-08-15 00:00:00' );
    213         $time_during_promo_phase_1 = strtotime( '+ 1 day', $region_data['us']['promo_start'] );
    214         $time_during_promo_phase_2 = strtotime( '+ 2 weeks + 1 day', $region_data['us']['promo_start'] );
    215         $time_during_promo_phase_3 = strtotime( '+ 4 weeks + 1 day', $region_data['us']['promo_start'] );
    216         $time_after_promo          = strtotime( '+ 6 weeks + 1 day', $region_data['us']['promo_start'] );
     215        $time_during_promo_phase_1 = strtotime( '+ 1 day', $promo_start );
     216        $time_during_promo_phase_2 = strtotime( '+ 2 weeks + 1 day', $promo_start );
     217        $time_during_promo_phase_3 = strtotime( '+ 4 weeks + 1 day', $promo_start );
     218        $time_after_promo          = strtotime( '+ 6 weeks + 1 day', $promo_start );
    217219
    218220        $location_country_within_region = array(
Note: See TracChangeset for help on using the changeset viewer.