- Timestamp:
- 12/13/2025 08:10:50 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/filesystem/unzipFilePclzip.php
r61212 r61374 38 38 public function test_should_apply_pre_unzip_file_filters() { 39 39 $filter = new MockAction(); 40 add_filter( 'pre_unzip_file', array( $filter, 'filter' ) );40 add_filter( 'pre_unzip_file', array( $filter, 'filter' ), 10, 2 ); 41 41 42 42 // Prepare test environment. … … 54 54 $this->delete_folders( $unzip_destination ); 55 55 56 $this->assertSame( 1, $filter->get_call_count() ); 56 $this->assertSame( 1, $filter->get_call_count(), 'The filter should be called once.' ); 57 $this->assertSame( self::$test_data_dir . 'archive.zip', $filter->get_args()[0][1], 'The $file parameter should be correct.' ); 57 58 } 58 59 … … 64 65 public function test_should_apply_unzip_file_filters() { 65 66 $filter = new MockAction(); 66 add_filter( 'unzip_file', array( $filter, 'filter' ) );67 add_filter( 'unzip_file', array( $filter, 'filter' ), 10, 2 ); 67 68 68 69 // Prepare test environment. … … 80 81 $this->delete_folders( $unzip_destination ); 81 82 82 $this->assertSame( 1, $filter->get_call_count() ); 83 $this->assertSame( 1, $filter->get_call_count(), 'The filter should be called once.' ); 84 $this->assertSame( self::$test_data_dir . 'archive.zip', $filter->get_args()[0][1], 'The $file parameter should be correct.' ); 83 85 } 84 86 }
Note: See TracChangeset
for help on using the changeset viewer.