-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
namespace morhos\test\Russian; | ||
|
||
use morphos\Gender; | ||
use morphos\Russian\AdjectiveDeclension; | ||
use morphos\Russian\AdjectivePluralization; | ||
use morphos\Russian\NounDeclension; | ||
|
||
class AdjectivePluralizationTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
/** | ||
* @dataProvider wordsProvider | ||
* | ||
* @param $word | ||
* @param $animateness | ||
* @param $inflected | ||
*/ | ||
public function testInflection($word, $animateness, $inflected) | ||
{ | ||
$this->assertEquals($inflected, array_values(AdjectivePluralization::getCases($word, $animateness))); | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function wordsProvider() | ||
{ | ||
return [ | ||
['адресный', false, ['адресные', 'адресных', 'адресным', 'адресные', 'адресными', 'адресных']], | ||
['выездной', false, ['выездные', 'выездных', 'выездным', 'выездные', 'выездными', 'выездных']], | ||
['домашний', false, ['домашние', 'домашних', 'домашним', 'домашние', 'домашними', 'домашних']], | ||
['дилерский', false, ['дилерские', 'дилерских', 'дилерским', 'дилерские', 'дилерскими', 'дилерских']], | ||
['сухой', false, ['сухие', 'сухих', 'сухим', 'сухие', 'сухими', 'сухих']], | ||
['большой', false, ['большие', 'больших', 'большим', 'большие', 'большими', 'больших']], | ||
]; | ||
} | ||
} |