Ejemplo n.º 1
0
 /**
  * @test
  */
 public function testPluralize()
 {
     $word = Utils::pluralize("success");
     $this->assertEquals($word, "successes");
     $word = Utils::pluralize("connectivity");
     $this->assertEquals($word, "connectivities");
     $word = Utils::pluralize("account");
     $this->assertEquals($word, "accounts");
 }
 /**
  * Automagic used to determine the collection name
  * for use in the URL snippet.  This should
  * be implemented in the entity class if
  * it is an exception to the standard naming.
  *
  */
 protected function getCollectionName()
 {
     $entityName = Utils::underscoreClassName($this);
     return Utils::pluralize($entityName);
 }
 /**
  *
  *
  */
 protected function getEntityName()
 {
     $className = Utils::shortClassName($this);
     return Utils::depluralize($className);
 }