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
This commit is contained in:
Boone Gorges 2016-04-21 15:52:33 +00:00
parent 23d737bc53
commit ce350d5d5d
1 changed files with 4 additions and 2 deletions

View File

@ -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(