예제 #1
0
파일: PostTest.php 프로젝트: akwatra/corcel
 public function testPostType()
 {
     $post = Post::type('page')->first();
     $this->assertEquals($post->post_type, 'page');
     $page = Page::first();
     $this->assertEquals($page->post_type, 'page');
 }
예제 #2
0
파일: PostTest.php 프로젝트: jgrossi/corcel
 public function testClearRegisteredPostTypes()
 {
     Post::registerPostType('page', "\\Corcel\\Page");
     Post::clearRegisteredPostTypes();
     $page = Post::type('page')->first();
     $this->assertInstanceOf("\\Corcel\\Post", $page);
 }