Exemplo n.º 1
0
 /**
  * Get all post types associated with this taxonomy.
  *
  * @return Collection
  */
 public function postTypes()
 {
     return Collection::make($this->object_type)->map(function ($post_type) {
         return PostType::load($post_type);
     });
 }
Exemplo n.º 2
0
 /**
  * @test
  */
 function it_has_readonly_magic_properties()
 {
     $type = PostType::load('post');
     $this->assertSame('post', $type->slug);
     $this->assertSame('Post', $type->one);
     $this->assertSame('Posts', $type->many);
     $this->assertNull($type->nonExistentProperty);
 }