Commit 08bf5f7a authored by catch's avatar catch

Issue #2901787 by mfernea: Fix 'Generic.NamingConventions.ConstructorName' coding standard

parent 45524a7d
......@@ -189,7 +189,7 @@ public function testNoUpdateFunctionality() {
public function testSuccessfulUpdateFunctionality() {
$initial_maintenance_mode = $this->container->get('state')->get('system.maintenance_mode');
$this->assertFalse($initial_maintenance_mode, 'Site is not in maintenance mode.');
$this->updateScriptTest($initial_maintenance_mode);
$this->runUpdates($initial_maintenance_mode);
$final_maintenance_mode = $this->container->get('state')->get('system.maintenance_mode');
$this->assertEqual($final_maintenance_mode, $initial_maintenance_mode, 'Maintenance mode should not have changed after database updates.');
......@@ -226,7 +226,7 @@ public function testMaintenanceModeUpdateFunctionality() {
$initial_maintenance_mode = $this->container->get('state')
->get('system.maintenance_mode');
$this->assertTrue($initial_maintenance_mode, 'Site is in maintenance mode.');
$this->updateScriptTest($initial_maintenance_mode);
$this->runUpdates($initial_maintenance_mode);
$final_maintenance_mode = $this->container->get('state')
->get('system.maintenance_mode');
$this->assertEqual($final_maintenance_mode, $initial_maintenance_mode, 'Maintenance mode should not have changed after database updates.');
......@@ -286,7 +286,7 @@ public function testSuccessfulMultilingualUpdateFunctionality() {
/**
* Helper function to run updates via the browser.
*/
protected function updateScriptTest($maintenance_mode) {
protected function runUpdates($maintenance_mode) {
$schema_version = drupal_get_installed_schema_version('update_script_test');
$this->assertEqual($schema_version, 8001, 'update_script_test is initially installed with schema version 8001.');
......
......@@ -105,6 +105,7 @@
<!-- Generic sniffs -->
<rule ref="Generic.Files.LineEndings"/>
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
<rule ref="Generic.NamingConventions.ConstructorName" />
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
......
......@@ -24,7 +24,7 @@ public function testSystemQueue() {
$queue2 = new DatabaseQueue($this->randomMachineName(), Database::getConnection());
$queue2->createQueue();
$this->queueTest($queue1, $queue2);
$this->runQueueTest($queue1, $queue2);
}
/**
......@@ -37,7 +37,7 @@ public function testMemoryQueue() {
$queue2 = new Memory($this->randomMachineName());
$queue2->createQueue();
$this->queueTest($queue1, $queue2);
$this->runQueueTest($queue1, $queue2);
}
/**
......@@ -48,7 +48,7 @@ public function testMemoryQueue() {
* @param \Drupal\Core\Queue\QueueInterface $queue2
* An instantiated queue object.
*/
protected function queueTest($queue1, $queue2) {
protected function runQueueTest($queue1, $queue2) {
// Create four items.
$data = [];
for ($i = 0; $i < 4; $i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment