コード例 #1
0
ファイル: InflectorTest.php プロジェクト: rokite/windwalker
 /**
  * Method to test StringInflector::addCountableRule().
  *
  * @return  void
  *
  * @covers  Windwalker\String\StringInflector::addCountableRule
  * @since   1.0
  */
 public function testAddCountableRule()
 {
     // Add string.
     $this->StringInflector->addCountableRule('foo');
     $rules = TestHelper::getValue($this->StringInflector, 'rules');
     $this->assertContains('foo', $rules['countable'], 'Checks a countable rule was added.');
     // Add array.
     $this->StringInflector->addCountableRule(array('goo', 'car'));
     $rules = TestHelper::getValue($this->StringInflector, 'rules');
     $this->assertContains('car', $rules['countable'], 'Checks a countable rule was added by array.');
 }