Make WordPress Core


Ignore:
Timestamp:
07/27/2017 04:59:36 PM (7 years ago)
Author:
johnbillion
Message:

General: Avoid counting uncountable values when reading theme directories, and in some unit tests.

See #40109

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/types.php

    r40635 r41174  
    424424        ) );
    425425
    426         $this->assertSame( 1, count( $wp_filter['future_foo'] ) );
     426        $this->assertArrayHasKey( 'future_foo', $wp_filter );
     427        $this->assertSame( 1, count( $wp_filter['future_foo']->callbacks ) );
    427428        $this->assertTrue( unregister_post_type( 'foo' ) );
    428429        $this->assertArrayNotHasKey( 'future_foo', $wp_filter );
     
    440441        ) );
    441442
    442         $this->assertSame( 1, count( $wp_filter['add_meta_boxes_foo'] ) );
     443        $this->assertArrayHasKey( 'add_meta_boxes_foo', $wp_filter );
     444        $this->assertSame( 1, count( $wp_filter['add_meta_boxes_foo']->callbacks ) );
    443445        $this->assertTrue( unregister_post_type( 'foo' ) );
    444446        $this->assertArrayNotHasKey( 'add_meta_boxes_foo', $wp_filter );
Note: See TracChangeset for help on using the changeset viewer.