From ce350d5d5d95e868c6d15b3fbbccc46193d8f885 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 21 Apr 2016 15:52:33 +0000 Subject: [PATCH] Tests: More explicit fixture content when testing `s=0` query string. After [36647], the unit test generator sequence can put a 0 into the 'post_excerpt' field of a post fixture, causing false positives. See [36520] for a parallel fix involving 'post_content'. Fixes #36622. git-svn-id: https://develop.svn.wordpress.org/trunk@37280 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/query/search.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/query/search.php b/tests/phpunit/tests/query/search.php index 7f7db1986f..a228f91d78 100644 --- a/tests/phpunit/tests/query/search.php +++ b/tests/phpunit/tests/query/search.php @@ -170,13 +170,15 @@ class Tests_Query_Search extends WP_UnitTestCase { $p1 = $this->factory->post->create( array( 'post_status' => 'publish', 'post_title' => '1', - 'post_content' => '', + 'post_content' => 'this post contains no zeroes', + 'post_excerpt' => 'this post contains no zeroes', ) ); $p2 = $this->factory->post->create( array( 'post_status' => 'publish', 'post_title' => '0', - 'post_content' => '', + 'post_content' => 'this post contains zeroes', + 'post_excerpt' => 'this post containts zeroes', ) ); $q = new WP_Query( array(