Skip to content

Commit d755af7

Browse files
Add more tests to clarify expected behavior
1 parent 63fd9e7 commit d755af7

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

features/checksum-core.feature

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,43 @@ Feature: Validate checksums for WordPress install
138138
"""
139139
And the return code should be 0
140140

141+
@daniel
141142
Scenario: Verify core checksums when extra files are included in WordPress root and --include-root is passed
142143
Given a WP install
143144
And a extra-file.php file:
144145
"""
145146
hello world
146147
"""
148+
And a unknown-folder/unknown-file.php file:
149+
"""
150+
taco burrito
151+
"""
152+
And a wp-content/unknown-file.php file:
153+
"""
154+
foobar
155+
"""
147156

148157
When I try `wp core verify-checksums --include-root`
149158
Then STDERR should be:
150159
"""
160+
Warning: File should not exist: unknown-folder/unknown-file.php
161+
Warning: File should not exist: extra-file.php
162+
"""
163+
And STDERR should not contain:
164+
"""
165+
Warning: File should not exist: wp-content/unknown-file.php
166+
"""
167+
And STDOUT should be:
168+
"""
169+
Success: WordPress installation verifies against checksums.
170+
"""
171+
And the return code should be 0
172+
173+
When I run `wp core verify-checksums`
174+
Then STDERR should not contain:
175+
"""
176+
Warning: File should not exist: wp-content/unknown-file.php
177+
Warning: File should not exist: unknown-folder/unknown-file.php
151178
Warning: File should not exist: extra-file.php
152179
"""
153180
And STDOUT should be:

0 commit comments

Comments
 (0)