Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#31389 closed enhancement (fixed)

Test coverage for get_page_template_slug()

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

Description

The get_page_template_slug() function could use some unit tests that cover the possible cases.

Attachments (2)

31389.patch (1.5 KB) - added by tyxla 9 years ago.
Add test coverage for get_page_template_slug()
31389.2.patch (1.5 KB) - added by tyxla 9 years ago.
Proper parameter order usage in assertEquals()

Download all attachments as: .zip

Change History (6)

@tyxla
9 years ago

Add test coverage for get_page_template_slug()

#1 @tyxla
9 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
9 years ago

  • Component changed from Build/Test Tools to Posts, Post Types
  • Milestone changed from Awaiting Review to 4.2

assertEquals() should list the expected result first:

$this->assertEquals( 'example.php', get_page_template_slug() );

@tyxla
9 years ago

Proper parameter order usage in assertEquals()

#3 @tyxla
9 years ago

Oops. @SergeyBiryukov: thanks for noticing.

Added a patch with proper order of the parameters in assertEquals().

#4 @SergeyBiryukov
9 years ago

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

In 31522:

Add unit tests for get_page_template_slug().

props tyxla.
fixes #31389.

Note: See TracTickets for help on using tickets.