Add excluded rule for tests to avoid repetition

Our tests use method _after and _before, so we would need to add ignore to each usage.
[MAILPOET-6240]
This commit is contained in:
Jan Lysý
2024-11-04 12:57:44 +01:00
committed by Jan Lysý
parent d0c8cde59c
commit c6f6eeef53
7 changed files with 12 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ class Highlighting_Postprocessor_Test extends \MailPoetUnitTest {
/**
* Set up the test.
*/
public function _before() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
public function _before() {
parent::_before();
$this->postprocessor = new Highlighting_Postprocessor();
}

View File

@@ -33,7 +33,7 @@ class Variables_Postprocessor_Test extends \MailPoetUnitTest {
/**
* Set up the test
*/
public function _before() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
public function _before() {
parent::_before();
$this->theme_controller_mock = $this->createMock( Theme_Controller::class );
$this->postprocessor = new Variables_Postprocessor( $this->theme_controller_mock );

View File

@@ -39,7 +39,7 @@ class Blocks_Width_Preprocessor_Test extends \MailPoetUnitTest {
/**
* Set up the test
*/
public function _before() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
public function _before() {
parent::_before();
$this->preprocessor = new Blocks_Width_Preprocessor();
$this->layout = array( 'contentSize' => '660px' );

View File

@@ -57,7 +57,7 @@ class Cleanup_Preprocessor_Test extends \MailPoetUnitTest {
/**
* Set up the test
*/
public function _before() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
public function _before() {
parent::_before();
$this->preprocessor = new Cleanup_Preprocessor();
$this->layout = array( 'contentSize' => '660px' );

View File

@@ -39,7 +39,7 @@ class Spacing_Preprocessor_Test extends \MailPoetUnitTest {
/**
* Set up the test
*/
public function _before() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
public function _before() {
parent::_before();
$this->preprocessor = new Spacing_Preprocessor();
$this->layout = array( 'contentSize' => '660px' );

View File

@@ -40,7 +40,7 @@ class Typography_Preprocessor_Test extends \MailPoetUnitTest {
/**
* Set up the test
*/
public function _before() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
public function _before() {
parent::_before();
$settings_mock = $this->createMock( Settings_Controller::class );
$theme_mock = $this->createMock( \WP_Theme_JSON::class );