mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Always pass back the custom classes get_post_class() was called with, even if the post was not found.
props F J Kaiser, Bueltge. fixes #22271. git-svn-id: https://develop.svn.wordpress.org/trunk@31408 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -44,6 +44,15 @@ class Tests_Post_GetPostClass extends WP_UnitTestCase {
|
||||
$this->assertContains( 'wptests_tax-bar', $found );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 22271
|
||||
*/
|
||||
public function test_with_custom_classes_and_no_post() {
|
||||
$this->assertEquals( array(), get_post_class( '', null ) );
|
||||
$this->assertEquals( array( 'foo' ), get_post_class( 'foo', null ) );
|
||||
$this->assertEquals( array( 'foo', 'bar' ), get_post_class( array( 'foo', 'bar' ), null ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @group cache
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user