Пример #1
0
 public function testUserSlug()
 {
     $user = new User();
     $user->firstName = 'Kirk';
     $user->lastName = 'Bushell';
     $user->save();
     $this->assertEquals('kirk-bushell', (string) $user->slug);
 }
Пример #2
0
 private function setupUserAndPost()
 {
     $user = new User();
     $user->firstName = 'Kirk';
     $user->lastName = 'Bushell';
     $user->save();
     $post = new Post();
     $post->userId = $user->id;
     $post->save();
     return compact('user', 'post');
 }