Пример #1
0
 public function testOnUpdateSameSlug()
 {
     $topic = new Topic();
     $topic->addBehavior(new SlugBehavior(['onUpdate' => false]));
     $topic->update(1, ['title' => 'Batman vs Superman']);
     $this->assertEquals(new Entity(['title' => 'Batman vs Superman', 'slug' => 'batman-vs-superman']), $topic->select('title', 'slug')->where('id', 1)->first());
 }