Skip to content

Commit 0b5f3b6

Browse files
committed
Merge branch '2.15' into 2.16
* 2.15: Add test on some return types
2 parents 56e7a83 + 3c74737 commit 0b5f3b6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/AutoReview/FixerTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,17 @@ public function provideFixerConfigurationDefinitionsCases()
262262
}, $fixers);
263263
}
264264

265+
/**
266+
* @dataProvider provideFixerDefinitionsCases
267+
*/
268+
public function testFixersReturnTypes(FixerInterface $fixer)
269+
{
270+
static::assertInternalType('int', $fixer->getPriority(), sprintf('Return type for ::getPriority of "%s" is invalid.', $fixer->getName()));
271+
static::assertInternalType('bool', $fixer->isCandidate(Tokens::fromCode('<?php ')), sprintf('Return type for ::isCandidate of "%s" is invalid.', $fixer->getName()));
272+
static::assertInternalType('bool', $fixer->isRisky(), sprintf('Return type for ::isRisky of "%s" is invalid.', $fixer->getName()));
273+
static::assertInternalType('bool', $fixer->supports(new \SplFileInfo(__FILE__)), sprintf('Return type for ::supports of "%s" is invalid.', $fixer->getName()));
274+
}
275+
265276
private function getAllFixers()
266277
{
267278
$factory = new FixerFactory();

0 commit comments

Comments
 (0)