Example #1
0
 function testTermEditLink()
 {
     wp_set_current_user(1);
     $tid = $this->factory->term->create(array('name' => 'News', 'taxonomy' => 'category'));
     $term = new TimberTerm($tid);
     $links = array();
     $links[] = 'http://example.org/wp-admin/term.php?taxonomy=category&tag_ID=' . $tid . '&post_type=post';
     $links[] = 'http://example.org/wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=' . $tid . '&post_type=post';
     $links[] = 'http://example.org/wp-admin/edit-tags.php?action=edit&taxonomy=category&tag_ID=' . $tid;
     $links[] = 'http://example.org/wp-admin/term.php?taxonomy=category&term_id=' . $tid . '&post_type=post';
     $this->assertContains($term->edit_link(), $links);
 }
Example #2
0
 public function edit_link()
 {
     return $this->term->edit_link();
 }