Skip to content

Commit

Permalink
use factory
Browse files Browse the repository at this point in the history
  • Loading branch information
torounit committed Jul 20, 2020
1 parent 40d1368 commit c9c531b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/test-cptp-module-permalink.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,14 @@ public function test_to_disable_post_type( $structure ) {
* @group permalink
*/
public function test_wpml_st_post_type_link_filter_original_slug() {
$post = (object) [ 'post_type' => 'some-type' ];

register_post_type( $this->post_type, array(
'public' => true,
) );

$post = $this->factory->post->create_and_get( array(
'post_type' => $this->post_type,
) );

$this->assertEquals(
CPTP_Module_Rewrite::get_slug_placeholder( $post->post_type ),
Expand Down

0 comments on commit c9c531b

Please sign in to comment.