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/taxonomy.php

    r40921 r41174  
    765765        register_taxonomy( 'foo', 'post' );
    766766
    767         $this->assertSame( 1, count( $wp_filter['wp_ajax_add-foo'] ) );
     767        $this->assertArrayHasKey( 'wp_ajax_add-foo', $wp_filter );
     768        $this->assertSame( 1, count( $wp_filter['wp_ajax_add-foo']->callbacks ) );
    768769        $this->assertTrue( unregister_taxonomy( 'foo' ) );
    769770        $this->assertArrayNotHasKey( 'wp_ajax_add-foo', $wp_filter );
Note: See TracChangeset for help on using the changeset viewer.