Пример #1
0
 /**
  * @dataProvider inflectionExceptionProvider
  */
 public function testAddException($singular, $plural)
 {
     $this->assertNotEquals(Inflector::pluralize($singular), $plural);
     Inflector::addException($singular, $plural);
     $this->assertEquals(Inflector::pluralize($singular), $plural);
 }
Пример #2
0
 /**
  * Specify an exception for table name inflection.
  * For example, if your table of fish is called 'fishes',
  * call setInflection('fish', 'fishes')
  *
  * @param string $singular singular form of the word.
  * @param string $plural plural form of the word.
  *
  */
 public function setInflection($singular, $plural)
 {
     Inflector::addException($singular, $plural);
 }