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

Commit b331b45

Browse files
committed
fix tests
1 parent e273171 commit b331b45

17 files changed

+411
-391
lines changed

.github/dependabot.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "daily"
7+
ignore:
8+
- dependency-name: 'acquia/coding-standards'

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"symfony/yaml": "^6"
4444
},
4545
"require-dev": {
46-
"acquia/coding-standards": "^2.0",
46+
"acquia/coding-standards": "^1.0",
4747
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
4848
"squizlabs/php_codesniffer": "^3.6"
4949
},
@@ -68,8 +68,8 @@
6868
],
6969
"config": {
7070
"allow-plugins": {
71-
"dealerdirect/phpcodesniffer-composer-installer": true,
72-
"acquia/drupal-recommended-settings": true
71+
"acquia/drupal-recommended-settings": true,
72+
"dealerdirect/phpcodesniffer-composer-installer": true
7373
},
7474
"php": "8",
7575
"platform": {

composer.lock

+354-347
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Robo/Blt.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function __construct(
6767
Config $config,
6868
InputInterface $input = NULL,
6969
OutputInterface $output = NULL,
70-
ClassLoader $classLoader = NULL
70+
ClassLoader $classLoader = NULL,
7171
) {
7272

7373
$this->setConfig($config);
@@ -136,7 +136,7 @@ private function addBuiltInCommandsAndHooks() {
136136
* An array of Command classes
137137
*/
138138
private function getCommands(
139-
array $options = ['path' => NULL, 'namespace' => NULL]
139+
array $options = ['path' => NULL, 'namespace' => NULL],
140140
) {
141141
$discovery = new CommandFileDiscovery();
142142
$discovery
@@ -157,7 +157,7 @@ private function getCommands(
157157
* An array of Hook classes
158158
*/
159159
private function getHooks(
160-
array $options = ['path' => NULL, 'namespace' => NULL]
160+
array $options = ['path' => NULL, 'namespace' => NULL],
161161
) {
162162
$discovery = new CommandFileDiscovery();
163163
$discovery->setSearchPattern('*Hook.php')->setSearchLocations([]);

src/Robo/Commands/Artifact/DeployCommand.php

+10-8
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,16 @@ public function initialize() {
109109
* @throws \Robo\Exception\TaskException
110110
* @throws \Exception
111111
*/
112-
public function deploy(array $options = [
113-
'branch' => InputOption::VALUE_REQUIRED,
114-
'tag' => InputOption::VALUE_REQUIRED,
115-
'commit-msg' => InputOption::VALUE_REQUIRED,
116-
'ignore-dirty' => FALSE,
117-
'dry-run' => FALSE,
118-
'ignore-platform-reqs' => FALSE,
119-
]) {
112+
public function deploy(
113+
array $options = [
114+
'branch' => InputOption::VALUE_REQUIRED,
115+
'tag' => InputOption::VALUE_REQUIRED,
116+
'commit-msg' => InputOption::VALUE_REQUIRED,
117+
'ignore-dirty' => FALSE,
118+
'dry-run' => FALSE,
119+
'ignore-platform-reqs' => FALSE,
120+
],
121+
) {
120122
if ($options['dry-run']) {
121123
$this->logger->warning("This will be a dry run, the artifact will not be pushed.");
122124
}

src/Robo/Commands/Blt/WizardCommand.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ class WizardCommand extends BltTasks {
2323
*
2424
* @command wizard
2525
*/
26-
public function wizard($options = [
27-
'recipe' => InputOption::VALUE_REQUIRED,
28-
]) {
26+
public function wizard(
27+
$options = [
28+
'recipe' => InputOption::VALUE_REQUIRED,
29+
],
30+
) {
2931
$recipe_filename = $options['recipe'];
3032
if ($recipe_filename) {
3133
$answers = $this->loadRecipeFile($recipe_filename);

src/Robo/Commands/Drupal/SyncCommand.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ public function allSites() {
4848
* @command drupal:sync:default:site
4949
* @aliases ds drupal:sync drupal:sync:default sync sync:refresh
5050
*/
51-
public function sync(array $options = [
52-
'sync-public-files' => FALSE,
53-
'sync-private-files' => FALSE,
54-
]) {
51+
public function sync(
52+
array $options = [
53+
'sync-public-files' => FALSE,
54+
'sync-private-files' => FALSE,
55+
],
56+
) {
5557
$commands = $this->getConfigValue('sync.commands');
5658
if ($options['sync-public-files'] || $this->getConfigValue('sync.public-files')) {
5759
$commands[] = 'drupal:sync:public-files';

src/Robo/Commands/Source/LinkPackageCommand.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ class LinkPackageCommand extends BltTasks {
3535
*
3636
* @throws \Acquia\Blt\Robo\Exceptions\BltException
3737
*/
38-
public function linkComposer(array $options = [
39-
'name' => 'acquia/blt',
40-
'path' => '../../dev/blt',
41-
'version-constraint' => '*',
42-
]) {
38+
public function linkComposer(
39+
array $options = [
40+
'name' => 'acquia/blt',
41+
'path' => '../../dev/blt',
42+
'version-constraint' => '*',
43+
],
44+
) {
4345
$path_parts = explode('/', $options['path']);
4446
$path_counts = array_count_values($path_parts);
4547
$levels = $path_counts['..'];

src/Robo/Common/ArrayManipulator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ArrayManipulator {
2424
*/
2525
public static function arrayMergeRecursiveDistinct(
2626
array &$array1,
27-
array &$array2
27+
array &$array2,
2828
) {
2929
$merged = $array1;
3030
foreach ($array2 as $key => &$value) {

src/Robo/Common/IO.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected function askRequired($message) {
103103
*/
104104
protected function printArrayAsTable(
105105
array $array,
106-
array $headers = ['Property', 'Value']
106+
array $headers = ['Property', 'Value'],
107107
) {
108108
$table = new Table($this->output);
109109
$table->setHeaders($headers)

src/Robo/Common/StringManipulator.php

+10-7
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,16 @@ public static function trimStartingLines($text, $num_lines) {
4949
* @return mixed
5050
* Safe string.
5151
*/
52-
public static function convertStringToMachineSafe($identifier, array $filter = [
53-
' ' => '_',
54-
'-' => '_',
55-
'/' => '_',
56-
'[' => '_',
57-
']' => '',
58-
]) {
52+
public static function convertStringToMachineSafe(
53+
$identifier,
54+
array $filter = [
55+
' ' => '_',
56+
'-' => '_',
57+
'/' => '_',
58+
'[' => '_',
59+
']' => '',
60+
],
61+
) {
5962
$identifier = str_replace(array_keys($filter), array_values($filter), $identifier);
6063
// Valid characters are:
6164
// - a-z (U+0030 - U+0039)

src/Robo/Doctor/DoctorCheck.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function __construct(
4848
Config $config,
4949
Inspector $inspector,
5050
Executor $executor,
51-
$drush_status
51+
$drush_status,
5252
) {
5353
$this->setConfig($config);
5454
$this->setInspector($inspector);

src/Robo/Exceptions/BltException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class BltException extends \Exception {
1515
public function __construct(
1616
$message = "",
1717
$code = 0,
18-
\Throwable $previous = NULL
18+
\Throwable $previous = NULL,
1919
) {
2020

2121
$message .= "\nFor troubleshooting guidance and support, see https://docs.acquia.com/blt/support/";

src/Robo/Hooks/InteractHook.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function setOutput(OutputInterface $output) {
3939
public function interactGenerateSettingsFiles(
4040
InputInterface $input,
4141
OutputInterface $output,
42-
AnnotationData $annotationData
42+
AnnotationData $annotationData,
4343
) {
4444
/** @var \Acquia\Blt\Robo\Wizards\SetupWizard $setup_wizard */
4545
$setup_wizard = $this->getContainer()->get(SetupWizard::class);
@@ -54,7 +54,7 @@ public function interactGenerateSettingsFiles(
5454
public function interactInstallDrupal(
5555
InputInterface $input,
5656
OutputInterface $output,
57-
AnnotationData $annotationData
57+
AnnotationData $annotationData,
5858
) {
5959
/** @var \Acquia\Blt\Robo\Wizards\SetupWizard $setup_wizard */
6060
$setup_wizard = $this->getContainer()->get(SetupWizard::class);
@@ -69,7 +69,7 @@ public function interactInstallDrupal(
6969
public function interactExecuteUpdates(
7070
InputInterface $input,
7171
OutputInterface $output,
72-
AnnotationData $annotationData
72+
AnnotationData $annotationData,
7373
) {
7474
if ($this->invokeDepth == 0
7575
&& $input->getFirstArgument() != 'blt:update'
@@ -94,7 +94,7 @@ public function interactExecuteUpdates(
9494
public function interactConfigIdentical(
9595
InputInterface $input,
9696
OutputInterface $output,
97-
AnnotationData $annotationData
97+
AnnotationData $annotationData,
9898
) {
9999
$cm_strategies = [
100100
'config-split',

tests/phpunit/Robo/ArrayManipulatorTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class ArrayManipulatorTest extends TestCase {
1818
public function testArrayMergeRecursiveDistinct(
1919
$array1,
2020
$array2,
21-
$expected_array
21+
$expected_array,
2222
) {
2323
$this->assertEquals(ArrayManipulator::arrayMergeRecursiveDistinct($array1,
2424
$array2), $expected_array);

tests/phpunit/Robo/TextMungeTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class TextMungeTest extends TestCase {
2020
public function testArrayMergeNoDuplicates(
2121
$array1,
2222
$array2,
23-
$expected_array
23+
$expected_array,
2424
) {
2525
$munged = TextMunge::arrayMergeNoDuplicates($array1, $array2);
2626
$this->assertEquals($munged, $expected_array);

tests/phpunit/Robo/YamlMungeTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class YamlMungeTest extends TestCase {
2020
public function testArrayMergeRecursiveExceptEmpty(
2121
$array1,
2222
$array2,
23-
$expected_array
23+
$expected_array,
2424
) {
2525
$this->assertEquals(YamlMunge::arrayMergeRecursiveExceptEmpty($array1,
2626
$array2), $expected_array);

0 commit comments

Comments
 (0)