Skip to content

Instantly share code, notes, and snippets.

@torounit
Last active September 15, 2015 15:54
Show Gist options
  • Save torounit/b62a96afb3d7c7cb74af to your computer and use it in GitHub Desktop.
Save torounit/b62a96afb3d7c7cb74af to your computer and use it in GitHub Desktop.
<?php
class SampleTest extends WP_UnitTestCase {
function test_sample() {
$args = array(
'public' => true,
'label' => 'Books'
);
register_post_type( 'book', $args );
$pre = get_post_type_object( 'book' )->labels;
get_post_type_labels( get_post_type_object( 'book' ) );
$post = get_post_type_object( 'book' )->labels;
$this->assertEquals( $pre, $post );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment