Changeset 49551
- Timestamp:
- 11/09/2020 07:40:41 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions.php
r49547 r49551 277 277 if ( get_class( $value ) === 'Requests_Utility_FilteredIterator' ) { 278 278 $new_value = unserialize( $serialized ); 279 if ( version_compare( PHP_VERSION, '5.3', '>=' ) ) { 280 $property = ( new ReflectionClass( 'Requests_Utility_FilteredIterator' ) )->getProperty( 'callback' ); 281 $property->setAccessible( true ); 282 $callback_value = $property->getValue( $new_value ); 283 $this->assertSame( null, $callback_value ); 284 } else { 285 $current_item = @$new_value->current(); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged 286 $this->assertSame( null, $current_item ); 287 } 279 $property = ( new ReflectionClass( 'Requests_Utility_FilteredIterator' ) )->getProperty( 'callback' ); 280 $property->setAccessible( true ); 281 $callback_value = $property->getValue( $new_value ); 282 $this->assertSame( null, $callback_value ); 288 283 } else { 289 284 $this->assertEquals( $value->count(), unserialize( $serialized )->count() );
Note: See TracChangeset
for help on using the changeset viewer.