예제 #1
0
파일: TagTest.php 프로젝트: waavi/tagging
 /**
  * @test
  */
 public function delete_tag()
 {
     $tag = Tag::create(['name' => '9 Ball']);
     $this->assertEquals(1, Tag::count());
     $tag->delete();
     $this->assertEquals(0, Tag::count());
 }
예제 #2
0
 /**
  * @test
  */
 public function add_new_tag()
 {
     $this->post->tag('new TaG');
     $this->assertEquals('new tag', $this->post->tagNames);
     $this->assertEquals(['new tag'], $this->post->tagArray);
     $this->assertEquals(1, $this->post->tags->count());
     $this->assertEquals(4, Tag::count());
 }