public function testSlugify() { $this->assertEquals('sensio', Jobs::slugify('Sensio')); $this->assertEquals('sensio-labs', Jobs::slugify('sensio labs')); $this->assertEquals('sensio-labs', Jobs::slugify('sensio labs')); $this->assertEquals('paris-france', Jobs::slugify('paris,france')); $this->assertEquals('sensio', Jobs::slugify(' sensio')); $this->assertEquals('sensio', Jobs::slugify('sensio ')); $this->assertEquals('n-a', Jobs::slugify('')); $this->assertEquals('n-a', Jobs::slugify(' - ')); if (function_exists('iconv')) { $this->assertEquals('developpeur-web', Jobs::slugify('Développeur Web')); } }
/** * @ORM\PrePersist */ public function setSlugValue() { $this->slug = Jobs::slugify($this->getName()); }
public function getLocationSlug() { return Jobs::slugify($this->getLocation()); }