[wp-trac] [WordPress Trac] #42672: Unexpected incorrect usage notice for wpdb::prepare in wordpress test lib
WordPress Trac
noreply at wordpress.org
Thu Nov 23 12:19:08 UTC 2017
#42672: Unexpected incorrect usage notice for wpdb::prepare in wordpress test lib
------------------------------+-----------------------------
Reporter: skarabeq | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: 4.9
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
When I use phpunit for wordpress with factory like as:
{{{#!php
<?php
public function testCategory()
{
// Create category
$category = $this->factory()->term->create([
'name' => 'Test',
'taxonomy' => 'category'
]);
$this->assertTrue(is_int($category) ? true : false);
}
}}}
I got error
{{{
Unexpected incorrect usage notice for wpdb::prepare
Failed asserting that an array is empty.
}}}
I tested it with wordpress test lib 4.8.1, 4.8.2 , 4.8.3 and 4.9. Only
4.8.1 and 4.8.2 is works as expected. After version 4.8.2 I think you are
changes something and all tests who used factory create are broken. I am
very disappointed with this!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42672>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list