Changeset 51182 for trunk/tests/phpunit/tests/file.php
- Timestamp:
- 06/18/2021 02:02:44 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/file.php
r48937 r51182 45 45 46 46 /** 47 * @ticket 19854 47 48 * @group plugins 48 49 * @group themes 49 50 */ 50 function test_get_file_data_ cr_line_endings() {51 $headers 51 function test_get_file_data_with_cr_line_endings() { 52 $headers = array( 52 53 'SomeHeader' => 'Some Header', 53 54 'Description' => 'Description', 54 55 'Author' => 'Author', 55 56 ); 56 $actual = get_file_data( DIR_TESTDATA . '/formatting/cr-line-endings-file-header.php', $headers ); 57 58 $actual = get_file_data( DIR_TESTDATA . '/formatting/file-header-cr-line-endings.php', $headers ); 57 59 $expected = array( 58 60 'SomeHeader' => 'Some header value!', 59 61 'Description' => 'This file is using CR line endings for a testcase.', 60 62 'Author' => 'A Very Old Mac', 63 ); 64 65 foreach ( $actual as $header => $value ) { 66 $this->assertSame( $expected[ $header ], $value, $header ); 67 } 68 } 69 70 /** 71 * @ticket 47186 72 * @group plugins 73 * @group themes 74 */ 75 function test_get_file_data_with_php_open_tag_prefix() { 76 $headers = array( 77 'TemplateName' => 'Template Name', 78 ); 79 80 $actual = get_file_data( DIR_TESTDATA . '/formatting/file-header-php-open-tag-prefix.php', $headers ); 81 $expected = array( 82 'TemplateName' => 'Something', 61 83 ); 62 84
Note: See TracChangeset
for help on using the changeset viewer.