Пример #1
0
 function testGetTermWithObject()
 {
     $term_id = $this->factory->term->create(array('name' => 'Famous Commissioners'));
     $term_data = get_term($term_id, 'post_tag');
     $this->assertTrue(in_array(get_class($term_data), array('WP_Term', 'stdClass')));
     $term = new TimberTerm($term_id);
     $this->assertEquals('Famous Commissioners', $term->name());
     $this->assertEquals('Timber\\Term', get_class($term));
 }