Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#29545 closed defect (bug) (fixed)

Update Tests_Paginate_Links for PHPUnit 4.2

Reported by: jeffstieler's profile jeffstieler Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.1 Priority: normal
Severity: normal Version: 4.1
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:

Description

PHPUnit 4.2 deprecated assertTag. See https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-4.2.0

I've changed the test_paginate_links_base_value case to use DOMDocument instead.

An alternate solution could be to have WP_UnitTestCase inherit from PHPUnit_Framework_DOMTestCase.

Attachments (1)

paginateLinks.php.diff (2.6 KB) - added by jeffstieler 10 years ago.

Download all attachments as: .zip

Change History (9)

#1 @nacin
10 years ago

  • Milestone changed from Awaiting Review to 4.1

#2 @jeffstieler
10 years ago

  • Keywords has-patch added

#3 @wonderboymusic
10 years ago

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

In 29746:

assertTag() has been deprecated in PHPUnit 4.2. Rewrite some of the tests in Tests_Paginate_Links to use DOMDocument.

Props effstieler.
Fixes #29545.

#4 follow-ups: @jeffstieler
10 years ago

Thanks Scott!

Can we fix the "props"? I use a widget that pulls in core contributions based on that and it can't find me.

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

Replying to jeffstieler:

Thanks Scott!

Can we fix the "props"? I use a widget that pulls in core contributions based on that and it can't find me.

Sorry, commit messages can't be changed after the fact. Maybe just add a new rule. :)

#6 in reply to: ↑ 4 @rmccue
10 years ago

Replying to jeffstieler:

Can we fix the "props"? I use a widget that pulls in core contributions based on that and it can't find me.

Welcome to the club. ;)

#7 @wonderboymusic
10 years ago

In 29780:

In paginate_links(), ensure that query string args are propagated to the resulting paginated links.

Adds unit tests that use DOMDocument since assertTag is being deprecated - see #29545, [29746].

Props obenland, wonderboymusic.
Fixes #29636.

#8 @johnbillion
7 years ago

In 40447:

assertTag() has been deprecated in PHPUnit 4.2. Rewrite some of the tests in Tests_Paginate_Links to use DOMDocument.

See #29545.

Merges [29746] to the 4.0 branch.

Note: See TracTickets for help on using tickets.