Exemplo n.º 1
0
 public function testConcatenatedSlug()
 {
     $post = new SluggablePost();
     $post->title = 'Sweetness and Light';
     $post->description = 'Itchee and Scratchee';
     $post->save();
     $this->assertEquals('sweetness-and-light-itchee-and-scratchee', $post->long_slug);
 }
Exemplo n.º 2
0
 public function testSetSlugAttributeManually()
 {
     $post = new SluggablePost();
     $post->title = 'We parked in a comfortable spot';
     $post->slug = 'war-is-pain';
     $post->save();
     $this->assertEquals('war-is-pain', $post->slug);
 }