Skip to content
Snippets Groups Projects
Commit 2d596014 authored by Jess's avatar Jess
Browse files

Issue #2676346 by alexpott, dawehner: Coding standards check on DB dump...

Issue #2676346 by alexpott, dawehner: Coding standards check on DB dump fixtures causes PHPCS to out of memory on PHP5.5 and is slow cause of huge files
parent d5af2551
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -375,8 +375,12 @@ protected function getFieldOrder(Connection $connection, $table) { ...@@ -375,8 +375,12 @@ protected function getFieldOrder(Connection $connection, $table) {
* The template for the generated PHP script. * The template for the generated PHP script.
*/ */
protected function getTemplate() { protected function getTemplate() {
// The template contains an instruction for the file to be ignored by PHPCS.
// This is because the files can be huge and coding standards are
// irrelevant.
$script = <<<'ENDOFSCRIPT' $script = <<<'ENDOFSCRIPT'
<?php <?php
// @codingStandardsIgnoreFile
/** /**
* @file * @file
* A database agnostic dump for testing purposes. * A database agnostic dump for testing purposes.
......
<?php <?php
// @codingStandardsIgnoreFile
/** /**
* @file * @file
* A database agnostic dump for testing purposes. * A database agnostic dump for testing purposes.
......
<?php <?php
// @codingStandardsIgnoreFile
/** /**
* @file * @file
* A database agnostic dump for testing purposes. * A database agnostic dump for testing purposes.
...@@ -58,6 +58,7 @@ public function testDbDumpCommand() { ...@@ -58,6 +58,7 @@ public function testDbDumpCommand() {
$this->assertContains("'name' => 'test", $output, 'Insert name field found'); $this->assertContains("'name' => 'test", $output, 'Insert name field found');
$this->assertContains("'path' => 'test", $output, 'Insert path field found'); $this->assertContains("'path' => 'test", $output, 'Insert path field found');
$this->assertContains("'pattern_outline' => 'test", $output, 'Insert pattern_outline field found'); $this->assertContains("'pattern_outline' => 'test", $output, 'Insert pattern_outline field found');
$this->assertContains("// @codingStandardsIgnoreFile", $output);
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment