| Total Complexity | 5 | 
| Total Lines | 59 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php namespace Unit\Chekote\NounStore\Key; | ||
| 8 | class IsPossessiveTest extends KeyTest | ||
| 9 | { | ||
| 10 | public function setUp() | ||
| 16 | } | ||
| 17 | |||
| 18 | /** | ||
| 19 | * @dataProvider possessiveNouns | ||
| 20 | */ | ||
| 21 | public function testReturnsTrueForPossessiveNoun($noun) | ||
| 22 |     { | ||
| 23 | /* @noinspection PhpUndefinedMethodInspection */ | ||
| 24 | $this->assertTrue( | ||
| 25 | Phake::makeVisible($this->key)->isPossessive($noun), | ||
|  | |||
| 26 | "'$noun' should be considered a possessive noun" | ||
| 27 | ); | ||
| 28 | } | ||
| 29 | |||
| 30 | /** | ||
| 31 | * Data provider of possessive nouns. | ||
| 32 | * | ||
| 33 | * @return array[] | ||
| 34 | */ | ||
| 35 | public function possessiveNouns() | ||
| 36 |     { | ||
| 37 | return [ | ||
| 38 | ["Customer's Car"], | ||
| 39 | ["8th Customer's Car"], | ||
| 40 | ["Customer's 2nd Car"], | ||
| 41 | ["7th Customer's 4th Car"], | ||
| 42 | ]; | ||
| 43 | } | ||
| 44 | |||
| 45 | /** | ||
| 46 | * @dataProvider nonPossessiveNouns | ||
| 47 | */ | ||
| 48 | public function testReturnsFalseForNonPossessiveNoun($noun) | ||
| 54 | ); | ||
| 55 | } | ||
| 56 | |||
| 57 | /** | ||
| 58 | * Data provider of non possessive nouns. | ||
| 59 | * | ||
| 60 | * @return array[] | ||
| 61 | */ | ||
| 62 | public function nonPossessiveNouns() | ||
| 67 | ]; | ||
| 68 | } | ||
| 70 |