Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 8d368c6

Browse files
dunglasOndraM
authored andcommitted
Add more php-cs-fixer rules
1 parent 9491a71 commit 8d368c6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.php_cs.dist

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ return PhpCsFixer\Config::create()
1212
'cast_spaces' => true,
1313
'concat_space' => ['spacing' => 'one'],
1414
'function_typehint_space' => true,
15+
'general_phpdoc_annotation_remove' => ['author'],
1516
'linebreak_after_opening_tag' => true,
1617
'lowercase_cast' => true,
1718
'mb_str_functions' => true,
@@ -50,6 +51,9 @@ return PhpCsFixer\Config::create()
5051
'ordered_imports' => true,
5152
'php_unit_construct' => true,
5253
'php_unit_dedicate_assert' => true,
54+
'php_unit_expectation' => true,
55+
'php_unit_mock' => true,
56+
'php_unit_no_expectation_annotation' => true,
5357
'phpdoc_add_missing_param_annotation' => true,
5458
'phpdoc_indent' => true,
5559
'phpdoc_no_access' => true,
@@ -73,6 +77,7 @@ return PhpCsFixer\Config::create()
7377
'unary_operator_spaces' => true,
7478
'visibility_required' => true,
7579
'whitespace_after_comma_in_array' => true,
80+
'yoda_style' => false,
7681
])
7782
->setRiskyAllowed(true)
7883
->setFinder($finder);

tests/unit/Remote/DesiredCapabilitiesTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ public function testShouldProvideAccessToCapabilitiesUsingSettersAndGetters()
6262
$this->assertSame(333, $capabilities->getVersion());
6363
}
6464

65-
/**
66-
* @expectedException \Exception
67-
* @expectedExceptionMessage isJavascriptEnabled() is a htmlunit-only option
68-
*/
6965
public function testShouldNotAllowToDisableJavascriptForNonHtmlUnitBrowser()
7066
{
67+
$this->expectException(\Exception::class);
68+
$this->expectExceptionMessage('isJavascriptEnabled() is a htmlunit-only option');
69+
7170
$capabilities = new DesiredCapabilities();
7271
$capabilities->setBrowserName(WebDriverBrowserType::FIREFOX);
7372
$capabilities->setJavascriptEnabled(false);

0 commit comments

Comments
 (0)