| Total Complexity | 5 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Chekote\NounStore\Key; |
||
| 8 | class IsPossessiveTest extends KeyTest |
||
| 9 | { |
||
| 10 | public function setUp() |
||
| 11 | { |
||
| 12 | parent::setUp(); |
||
| 13 | |||
| 14 | /* @noinspection PhpUndefinedMethodInspection */ |
||
| 15 | Phake::when($this->key)->isPossessive(Phake::anyParameters())->thenCallParent(); |
||
|
|
|||
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @dataProvider possessiveNouns |
||
| 20 | */ |
||
| 21 | public function testReturnsTrueForPossessiveNoun($noun) { |
||
| 22 | /* @noinspection PhpUndefinedMethodInspection */ |
||
| 23 | $this->assertTrue( |
||
| 24 | Phake::makeVisible($this->key)->isPossessive($noun), |
||
| 25 | "'$noun' should be considered a possessive noun" |
||
| 26 | ); |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Data provider of possessive nouns |
||
| 31 | * |
||
| 32 | * @return string[] |
||
| 33 | */ |
||
| 34 | public function possessiveNouns() { |
||
| 40 | ]; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @dataProvider nonPossessiveNouns |
||
| 45 | */ |
||
| 46 | public function testReturnsFalseForNonPossessiveNoun($noun) { |
||
| 47 | /* @noinspection PhpUndefinedMethodInspection */ |
||
| 48 | $this->assertFalse( |
||
| 49 | Phake::makeVisible($this->key)->isPossessive($noun), |
||
| 50 | "'$noun' should not be considered a possessive noun" |
||
| 51 | ); |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Data provider of non possessive nouns |
||
| 56 | * |
||
| 57 | * @return string[] |
||
| 58 | */ |
||
| 59 | public function nonPossessiveNouns() { |
||
| 63 | ]; |
||
| 64 | } |
||
| 65 | } |
||
| 66 |