| Total Complexity | 5 |
| Total Lines | 65 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Chekote\NounStore\Key; |
||
| 8 | class IsPossessiveTest extends KeyTest |
||
| 9 | { |
||
| 10 | /** @var string */ |
||
| 11 | const KEY = 'Customer'; |
||
| 12 | |||
| 13 | public function setUp() |
||
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @dataProvider possessiveNouns |
||
| 23 | */ |
||
| 24 | public function testReturnsTrueForPossessiveNoun($noun) |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * @noinspection PhpUndefinedMethodInspection |
||
| 28 | * @scrutinizer ignore-call |
||
| 29 | */ |
||
| 30 | $this->assertTrue( |
||
| 31 | Phake::makeVisible($this->key)->isPossessive($noun), |
||
|
|
|||
| 32 | "'$noun' should be considered a possessive noun" |
||
| 33 | ); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Data provider of possessive nouns. |
||
| 38 | * |
||
| 39 | * @return array[] |
||
| 40 | */ |
||
| 41 | public function possessiveNouns() |
||
| 48 | ]; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @dataProvider nonPossessiveNouns |
||
| 53 | */ |
||
| 54 | public function testReturnsFalseForNonPossessiveNoun($noun) |
||
| 55 | { |
||
| 56 | /* @noinspection PhpUndefinedMethodInspection */ |
||
| 57 | $this->assertFalse( |
||
| 58 | Phake::makeVisible($this->key)->isPossessive($noun), |
||
| 59 | "'$noun' should not be considered a possessive noun" |
||
| 60 | ); |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Data provider of non possessive nouns. |
||
| 65 | * |
||
| 66 | * @return array[] |
||
| 67 | */ |
||
| 68 | public function nonPossessiveNouns() |
||
| 73 | ]; |
||
| 74 | } |
||
| 75 | } |
||
| 76 |