@@ -9,25 +9,28 @@ assert_files_present_common() {
9
9
10
10
pushd " ${dir} " > /dev/null || exit 1
11
11
12
- # Assert that some files must be exist.
13
- assert_file_exists " force_crystal.info.yml"
14
- assert_file_exists " phpcs.xml"
15
- assert_file_exists " phpmd.xml"
16
- assert_file_exists " phpstan.neon"
12
+ # Assert that some files must exist.
13
+ assert_file_exists " .ahoy.yml"
17
14
assert_file_exists " .editorconfig"
18
15
assert_file_exists " .gitattributes"
19
16
assert_file_exists " .gitignore"
20
17
assert_file_exists " README.md"
18
+ assert_file_exists " composer.dev.json"
19
+ assert_file_exists " composer.json"
20
+ assert_file_exists " force_crystal.info.yml"
21
21
assert_file_exists " logo.png"
22
+ assert_file_exists " phpcs.xml"
23
+ assert_file_exists " phpmd.xml"
24
+ assert_file_exists " phpstan.neon"
25
+ assert_file_exists " rector.php"
22
26
23
- # Assert that some files must not be exist.
27
+ # Assert that some files must not exist.
28
+ assert_dir_not_exists " .scaffold"
29
+ assert_file_not_exists " .github/workflows/scaffold-release.yml"
30
+ assert_file_not_exists " .github/workflows/scaffold-test.yml"
31
+ assert_file_not_exists " LICENSE"
24
32
assert_file_not_exists " README.dist.md"
25
33
assert_file_not_exists " logo.tmp.png"
26
- assert_file_not_exists " LICENSE"
27
- assert_file_not_exists " .github/workflows/test-scaffold.yml"
28
-
29
- # Assert some dirs/files must not be exist.
30
- assert_dir_not_exists " .scaffold"
31
34
32
35
# Assert that .gitignore were processed correctly.
33
36
assert_file_contains " .gitignore" " composer.lock"
@@ -56,14 +59,14 @@ assert_files_present_common() {
56
59
assert_file_not_contains " .gitattributes" " # phpmd.xml"
57
60
assert_file_not_contains " .gitattributes" " # phpstan.neon"
58
61
59
- # Assert that composer.json were processed correctly.
62
+ # Assert that composer.json was processed correctly.
60
63
assert_file_contains " composer.json" ' "name": "drupal/force_crystal"'
61
64
assert_file_contains " composer.json" ' "description": "Provides force_crystal functionality."'
62
65
assert_file_contains " composer.json" ' "homepage": "https://drupal.org/project/force_crystal"'
63
66
assert_file_contains " composer.json" ' "issues": "https://drupal.org/project/issues/force_crystal"'
64
67
assert_file_contains " composer.json" ' "source": "https://git.drupalcode.org/project/force_crystal"'
65
68
66
- # Assert that extension info file were processed correctly.
69
+ # Assert that extension info file was processed correctly.
67
70
assert_file_contains " force_crystal.info.yml" ' name: Force Crystal'
68
71
69
72
# Assert other things.
@@ -83,10 +86,10 @@ assert_files_present_extension_type_module() {
83
86
assert_file_not_contains " force_crystal.info.yml" ' type: theme'
84
87
assert_file_not_contains " force_crystal.info.yml" ' base theme: false'
85
88
86
- # Assert that composer.json file were processed correctly.
89
+ # Assert that composer.json file was processed correctly.
87
90
assert_file_contains " composer.json" ' "type": "drupal-module"'
88
91
89
- # Assert some dirs/files must be exist.
92
+ # Assert some dirs/files must exist.
90
93
assert_dir_exists " tests/src/Unit"
91
94
assert_dir_exists " tests/src/Functional"
92
95
@@ -106,7 +109,7 @@ assert_files_present_extension_type_theme() {
106
109
# Assert that composer.json file were processed correctly.
107
110
assert_file_contains " composer.json" ' "type": "drupal-theme"'
108
111
109
- # Assert some dirs/files must not be exist.
112
+ # Assert some dirs/files must not exist.
110
113
assert_dir_not_exists " tests/src/Unit"
111
114
assert_dir_not_exists " tests/src/Functional"
112
115
@@ -122,11 +125,13 @@ assert_workflow() {
122
125
123
126
# Lint.
124
127
pushd " build" > /dev/null || exit 1
128
+
125
129
vendor/bin/phpcs
126
130
vendor/bin/phpstan
127
131
vendor/bin/rector --clear-cache --dry-run
128
132
vendor/bin/phpmd . text phpmd.xml
129
133
vendor/bin/twigcs
134
+
130
135
popd > /dev/null || exit 1
131
136
132
137
# Change mode to make bats have enough permission to clean tmp test directory.
0 commit comments