Example #1
0
 public function testSlugify()
 {
     $this->assertEquals('sensio', Jobeet::slugify('Sensio'));
     $this->assertEquals('sensio-labs', Jobeet::slugify('sensio labs'));
     $this->assertEquals('paris-france', Jobeet::slugify('Paris, france'));
     $this->assertEquals('n-a', Jobeet::slugify(''));
     $this->assertEquals('n-a', Jobeet::slugify(' - '));
     $this->assertEquals('developpeur-web', Jobeet::slugify('Développeur Web'));
 }
Example #2
0
 /**
  * @ORM\PrePersist
  * @ORM\PreUpdate
  */
 public function setSlugValue()
 {
     $this->slug = Jobeet::slugify($this->getName());
 }
Example #3
0
 public function testGetLocationSlug()
 {
     $job = $this->em->createQuery('SELECT j FROM EtiJobeetBundle:Job j ')->setMaxResults(1)->getSingleResult();
     $this->assertEquals($job->getLocationSlug(), Jobeet::slugify($job->getLocation()));
 }
Example #4
0
 public function getLocationSlug()
 {
     return Jobeet::slugify($this->getLocation());
 }