Changeset 53854 for trunk/tests/phpunit/tests/file.php
- Timestamp:
- 08/07/2022 02:48:42 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/file.php
r52932 r53854 6 6 class Tests_File extends WP_UnitTestCase { 7 7 8 const BADCHARS = '"\'[]*&?$'; 9 10 private $dir; 11 8 12 public function set_up() { 9 13 parent::set_up(); 10 14 11 15 $this->dir = untrailingslashit( get_temp_dir() ); 12 13 $this->badchars = '"\'[]*&?$';14 16 } 15 17 … … 138 140 public function test_unique_filename_is_sanitized() { 139 141 $name = __FUNCTION__; 140 $filename = wp_unique_filename( $this->dir, $name . $this->badchars. '.txt' );142 $filename = wp_unique_filename( $this->dir, $name . self::BADCHARS . '.txt' ); 141 143 142 144 // Make sure the bad characters were all stripped out.
Note: See TracChangeset
for help on using the changeset viewer.