1 | <?php |
||
12 | class MethodNumberOfTest extends AbstractProcessTest |
||
13 | { |
||
14 | /** |
||
15 | * @covers MS\PHPMD\Rule\Test\MethodNumberOfAsserts |
||
16 | * @covers MS\PHPMD\Rule\Test\MethodNumberOfMocks |
||
17 | * @covers MS\PHPMD\Rule\Test\AbstractMethodNumberOf |
||
18 | * @covers MS\PHPMD\Rule\Test\AbstractTestRule |
||
19 | */ |
||
20 | public function testMethodNumberOfRule() |
||
21 | { |
||
22 | $output = $this |
||
23 | ->runPhpmd('Tests/Test.php', 'test.xml') |
||
24 | ->getOutput(); |
||
25 | |||
26 | $this->assertContains('Tests/Test.php:37 4 mocks are found in this test. Try to reduce the mocks to 3 or less.', $output); |
||
27 | $this->assertContains('Tests/Test.php:52 6 asserts are found in this test. Try to reduce the asserts to 5 or less.', $output); |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @covers MS\PHPMD\Rule\Test\MethodNumberOfAsserts |
||
32 | * @covers MS\PHPMD\Rule\Test\MethodNumberOfMocks |
||
33 | * @covers MS\PHPMD\Rule\Test\AbstractMethodNumberOf |
||
34 | * @covers MS\PHPMD\Rule\Test\AbstractTestRule |
||
35 | */ |
||
36 | public function testRuleNoTest() |
||
44 | } |
||
45 |