Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#31430 closed defect (bug) (fixed)

Tests_Post_Template::test_wp_dropdown_pages is failing

Reported by: valendesigns's profile valendesigns Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.2
Component: Posts, Post Types Keywords: needs-patch
Focuses: Cc:

Description

1) Tests_Post_Template::test_wp_dropdown_pages
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 '<select name='page_id' id='page_id'>
 	<option class="level-0" value="130">Post title 1</option>
 	<option class="level-1" value="131">&nbsp;&nbsp;&nbsp;Post title 2</option>
 	<option class="level-2" value="132">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Post title 3</option>
 </select>
 '

/tests/phpunit/tests/post/template.php:95

Change History (5)

#1 @DrewAPicture
10 years ago

  • Component changed from Build/Test Tools to Posts, Post Types
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.2

#2 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 31531:

Fix line endings after [31522].

fixes #31430.

#3 follow-up: @SergeyBiryukov
10 years ago

Apparently patching unit test files with grunt patch on Windows changes line endings.

We should probably set svn:eol-style to native for test files, like we did for core, but that breaks some tests that use the heredoc syntax (<<<), like Tests_Post_Template::test_wp_dropdown_pages() here.

[31531] fixes the issue at hand for now.

#4 in reply to: ↑ 3 ; follow-up: @valendesigns
10 years ago

Replying to SergeyBiryukov:

Apparently patching unit test files with grunt patch on Windows changes line endings.

We should probably set svn:eol-style to native for test files, like we did for core, but that breaks some tests that use the heredoc syntax (<<<), like Tests_Post_Template::test_wp_dropdown_pages() here.

[31531] fixes the issue at hand for now.

Could we safely update the tests to use a different syntax?

#5 in reply to: ↑ 4 @SergeyBiryukov
10 years ago

Replying to valendesigns:

Could we safely update the tests to use a different syntax?

Created #31432 to see what we can do.

Note: See TracTickets for help on using tickets.