Make WordPress Core


Ignore:
Timestamp:
01/30/2022 07:40:57 PM (4 years ago)
Author:
johnbillion
Message:

Build/Test Tools: Switch to some more appropriate assertions.

See #54725

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/includes/factory.php

    r52010 r52654  
    99    public function test_create_creates_a_category() {
    1010        $id = $this->category_factory->create();
    11         $this->assertTrue( (bool) get_term_by( 'id', $id, 'category' ) );
     11        $this->assertInstanceOf( 'WP_Term', get_term_by( 'id', $id, 'category' ) );
    1212    }
    1313
    1414    public function test_get_object_by_id_gets_an_object() {
    1515        $id = $this->category_factory->create();
    16         $this->assertTrue( (bool) $this->category_factory->get_object_by_id( $id ) );
     16        $this->assertInstanceOf( 'WP_Term', $this->category_factory->get_object_by_id( $id ) );
    1717    }
    1818
Note: See TracChangeset for help on using the changeset viewer.