Opened 3 years ago
Closed 3 years ago
#2883 closed defect (fixed)
Fix failing unit tests
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | trunk |
Component: | Tools - Unit Tests | Keywords: | has-patch |
Cc: |
Description
We have a number of failing unit tests. The attached patch, makes them happy.
- [WP34172] sets
$_SERVER[ 'REMOTE_ADDR' ]
to 127.0.0.1, which is overriding our setting of$_SERVER[ 'REMOTE_ADDR' ] = '0.0.0.0'
. I've updated our setting and updated tests to match. - [WP34802], [WP34803], [WP34807], and [WP34810] introduce
set_permalink_structure
. It's implementation breaks ours, and is also more robust. I've updated our version to be compatible with tests on trunk/4.4+. I've also made moved ourset_permalinks_method()
to the mainBBP_UnitTestCase
class. - Update two tests to use WP's
assertEqualSets()
when comparing arrays that may not be in the same order. We should probably update our other tests, and then use this method going forward. For now, this fixes the failing tests.
Attachments (2)
Change History (6)
Note: See
TracTickets for help on using
tickets.
[WP35244] improves
WP_UnitTest_Generator_Sequence
to be a static generator. This is nice, but it significantly effects our tests. Updated patch to explicitly set content and titles when we are running tests that depend on this content.