Skip to content

Commit e4d446b

Browse files
committed
Merge branch '2.14'
# Conflicts: # tests/Report/ReporterFactoryTest.php # tests/TextDiffTest.php
2 parents 3a7e034 + ff43c7b commit e4d446b

File tree

144 files changed

+966
-966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+966
-966
lines changed

src/Fixer/PhpUnit/PhpUnitSizeClassFixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private function createDocBlock(Tokens $tokens, $docBlockIndex)
116116
$originalIndent = $this->detectIndent($tokens, $tokens->getNextNonWhitespace($docBlockIndex));
117117
$group = $this->configuration['group'];
118118
$toInsert = [
119-
new Token([T_DOC_COMMENT, '/**'.$lineEnd."${originalIndent} * @".$group.$lineEnd."${originalIndent} */"]),
119+
new Token([T_DOC_COMMENT, '/**'.$lineEnd."{$originalIndent} * @".$group.$lineEnd."{$originalIndent} */"]),
120120
new Token([T_WHITESPACE, $lineEnd.$originalIndent]),
121121
];
122122
$index = $tokens->getNextMeaningfulToken($docBlockIndex);

src/RuleSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ final class RuleSet implements RuleSetInterface
275275
'php_unit_set_up_tear_down_visibility' => true,
276276
'php_unit_strict' => true,
277277
'php_unit_test_annotation' => true,
278-
'php_unit_test_case_static_method_calls' => ['call_type' => 'this'],
278+
'php_unit_test_case_static_method_calls' => true,
279279
'strict_comparison' => true,
280280
'strict_param' => true,
281281
'string_line_ending' => true,

tests/AbstractFunctionReferenceFixerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function testAbstractFunctionReferenceFixer(
5656
) {
5757
$tokens = Tokens::fromCode($source);
5858

59-
$this->assertSame(
59+
static::assertSame(
6060
$expected,
6161
$this->fixer->findTest(
6262
$functionNameToSearch,
@@ -66,7 +66,7 @@ public function testAbstractFunctionReferenceFixer(
6666
)
6767
);
6868

69-
$this->assertFalse($tokens->isChanged());
69+
static::assertFalse($tokens->isChanged());
7070
}
7171

7272
public function provideAbstractFunctionReferenceFixerCases()

tests/AutoReview/CommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ final class CommandTest extends TestCase
3434
*/
3535
public function testCommandHasNameConst(Command $command)
3636
{
37-
$this->assertSame($command->getName(), \constant(\get_class($command).'::COMMAND_NAME'));
37+
static::assertSame($command->getName(), \constant(\get_class($command).'::COMMAND_NAME'));
3838
}
3939

4040
public function provideCommandHasNameConstCases()

tests/AutoReview/ComposerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testBranchAlias()
3535
return;
3636
}
3737

38-
$this->assertSame(
38+
static::assertSame(
3939
['dev-master' => $this->convertAppVersionToAliasedVersion(Application::VERSION)],
4040
$composerJson['extra']['branch-alias']
4141
);

tests/AutoReview/DescribeCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testDescribeCommand(FixerFactory $factory, $fixerName)
4646
'name' => $fixerName,
4747
]);
4848

49-
$this->assertSame(0, $commandTester->getStatusCode());
49+
static::assertSame(0, $commandTester->getStatusCode());
5050
}
5151

5252
public function provideDescribeCommandCases()

tests/AutoReview/FixerFactoryTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public function testFixersPriorityEdgeFixers()
3333
$factory->registerBuiltInFixers();
3434
$fixers = $factory->getFixers();
3535

36-
$this->assertSame('encoding', $fixers[0]->getName(), 'Expected "encoding" fixer to have the highest priority.');
37-
$this->assertSame('full_opening_tag', $fixers[1]->getName(), 'Expected "full_opening_tag" fixer has second highest priority.');
38-
$this->assertSame('single_blank_line_at_eof', $fixers[\count($fixers) - 1]->getName(), 'Expected "single_blank_line_at_eof" to have the lowest priority.');
36+
static::assertSame('encoding', $fixers[0]->getName(), 'Expected "encoding" fixer to have the highest priority.');
37+
static::assertSame('full_opening_tag', $fixers[1]->getName(), 'Expected "full_opening_tag" fixer has second highest priority.');
38+
static::assertSame('single_blank_line_at_eof', $fixers[\count($fixers) - 1]->getName(), 'Expected "single_blank_line_at_eof" to have the lowest priority.');
3939
}
4040

4141
/**
@@ -44,7 +44,7 @@ public function testFixersPriorityEdgeFixers()
4444
*/
4545
public function testFixersPriority(FixerInterface $first, FixerInterface $second)
4646
{
47-
$this->assertLessThan($first->getPriority(), $second->getPriority(), sprintf('"%s" should have less priority than "%s"', \get_class($second), \get_class($first)));
47+
static::assertLessThan($first->getPriority(), $second->getPriority(), sprintf('"%s" should have less priority than "%s"', \get_class($second), \get_class($first)));
4848
}
4949

5050
public function provideFixersPriorityCases()
@@ -296,11 +296,11 @@ public function testFixersPriorityPairsHaveIntegrationTest(FixerInterface $first
296296
$integrationTestName = $this->generateIntegrationTestName($first, $second);
297297

298298
if (\in_array($integrationTestName, $casesWithoutTests, true)) {
299-
$this->assertFalse($integrationTestExists, sprintf('Case "%s" already has an integration test, so it should be removed from "$casesWithoutTests".', $integrationTestName));
300-
$this->markTestIncomplete(sprintf('Case "%s" has no integration test yet, please help and add it.', $integrationTestName));
299+
static::assertFalse($integrationTestExists, sprintf('Case "%s" already has an integration test, so it should be removed from "$casesWithoutTests".', $integrationTestName));
300+
static::markTestIncomplete(sprintf('Case "%s" has no integration test yet, please help and add it.', $integrationTestName));
301301
}
302302

303-
$this->assertTrue($integrationTestExists, sprintf('There shall be an integration test "%s". How do you know that priority set up is good, if there is no integration test to check it?', $integrationTestName));
303+
static::assertTrue($integrationTestExists, sprintf('There shall be an integration test "%s". How do you know that priority set up is good, if there is no integration test to check it?', $integrationTestName));
304304
}
305305

306306
public function provideFixersPriorityPairsHaveIntegrationTestCases()
@@ -333,8 +333,8 @@ public function testPriorityIntegrationDirectoryOnlyContainsFiles()
333333
}
334334

335335
$fileName = $candidate->getFilename();
336-
$this->assertTrue($candidate->isFile(), sprintf('Expected only files in the priority integration test directory, got "%s".', $fileName));
337-
$this->assertFalse($candidate->isLink(), sprintf('No (sym)links expected the priority integration test directory, got "%s".', $fileName));
336+
static::assertTrue($candidate->isFile(), sprintf('Expected only files in the priority integration test directory, got "%s".', $fileName));
337+
static::assertFalse($candidate->isLink(), sprintf('No (sym)links expected the priority integration test directory, got "%s".', $fileName));
338338
}
339339
}
340340

@@ -365,16 +365,16 @@ public function testPriorityIntegrationTestFilesAreListedPriorityCases($fileName
365365
if (\in_array($fileName, [
366366
'braces,indentation_type,no_break_comment.test',
367367
], true)) {
368-
$this->markTestIncomplete(sprintf('Case "%s" has unexpected name, please help fixing it.', $fileName));
368+
static::markTestIncomplete(sprintf('Case "%s" has unexpected name, please help fixing it.', $fileName));
369369
}
370370

371371
if (\in_array($fileName, [
372372
'combine_consecutive_issets,no_singleline_whitespace_before_semicolons.test',
373373
], true)) {
374-
$this->markTestIncomplete(sprintf('Case "%s" is not fully handled, please help fixing it.', $fileName));
374+
static::markTestIncomplete(sprintf('Case "%s" is not fully handled, please help fixing it.', $fileName));
375375
}
376376

377-
$this->assertSame(
377+
static::assertSame(
378378
1,
379379
preg_match('#^([a-z][a-z0-9_]*),([a-z][a-z_]*)(?:_\d{1,3})?\.test(-(in|out)\.php)?$#', $fileName, $matches),
380380
sprintf('File with unexpected name "%s" in the priority integration test directory.', $fileName)
@@ -383,7 +383,7 @@ public function testPriorityIntegrationTestFilesAreListedPriorityCases($fileName
383383
$fixerName1 = $matches[1];
384384
$fixerName2 = $matches[2];
385385

386-
$this->assertTrue(
386+
static::assertTrue(
387387
isset($priorityCases[$fixerName1][$fixerName2]) || isset($priorityCases[$fixerName2][$fixerName1]),
388388
sprintf('Missing priority test entry for file "%s".', $fileName)
389389
);

0 commit comments

Comments
 (0)