예제 #1
0
 function testSetSlugResilient()
 {
     $unique = md5(time() . rand(0, 9999));
     $title = "IndieWebCamp Nürnberg {$unique} is live!";
     $slug = "indiewebcamp-n%C3%BCrnberg-{$unique}-is-live";
     $entity = new Entity();
     $entity->setSlugResilient($title);
     $this->assertEquals($slug, $entity->getSlug());
     $entity->save();
     $this->toDelete[] = $entity;
     $entity = new Entity();
     $entity->setSlugResilient($title);
     $this->assertEquals($slug . '-1', $entity->getSlug());
     $entity->save();
     $this->toDelete[] = $entity;
 }