Changeset 38382 for trunk/tests/phpunit/tests/cron.php
- Timestamp:
- 08/26/2016 08:21:30 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/cron.php
r31622 r38382 40 40 function test_schedule_event_single_args() { 41 41 // schedule an event with arguments and make sure it's returned by wp_next_scheduled 42 $hook = rand_str();43 $timestamp = strtotime('+1 hour'); 44 $args = array( rand_str());42 $hook = 'event'; 43 $timestamp = strtotime('+1 hour'); 44 $args = array('foo'); 45 45 46 46 wp_schedule_single_event( $timestamp, $hook, $args ); … … 49 49 // these don't match so return nothing 50 50 $this->assertEquals( false, wp_next_scheduled($hook) ); 51 $this->assertEquals( false, wp_next_scheduled($hook, array( rand_str())) );51 $this->assertEquals( false, wp_next_scheduled($hook, array('bar')) ); 52 52 53 53 // it's a non recurring event … … 70 70 function test_schedule_event_args() { 71 71 // schedule an event and make sure it's returned by wp_next_scheduled 72 $hook = rand_str();72 $hook = 'event'; 73 73 $timestamp = strtotime('+1 hour'); 74 74 $recur = 'hourly'; 75 $args = array( rand_str());75 $args = array('foo'); 76 76 77 77 wp_schedule_event( $timestamp, 'hourly', $hook, $args ); … … 80 80 // these don't match so return nothing 81 81 $this->assertEquals( false, wp_next_scheduled($hook) ); 82 $this->assertEquals( false, wp_next_scheduled($hook, array( rand_str())) );82 $this->assertEquals( false, wp_next_scheduled($hook, array('bar')) ); 83 83 84 84 $this->assertEquals( $recur, wp_get_schedule($hook, $args) );
Note: See TracChangeset
for help on using the changeset viewer.