Skip to content

Commit 2e97f1a

Browse files
committed
Tweak tests
1 parent 2604149 commit 2e97f1a

3 files changed

Lines changed: 3 additions & 11 deletions

File tree

‎features/font-face.feature‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Feature: Manage WordPress font faces
115115
Then the return code should be 1
116116
And STDERR should contain:
117117
"""
118-
--post_parent parameter is required
118+
missing --post_parent parameter
119119
"""
120120

121121
@require-wp-6.5
@@ -179,7 +179,7 @@ Feature: Manage WordPress font faces
179179
Then the return code should be 1
180180
And STDERR should contain:
181181
"""
182-
--src parameter is required
182+
missing --src parameter
183183
"""
184184

185185
@less-than-wp-6.5

‎features/font-family.feature‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Feature: Manage WordPress font families
9494
Then STDOUT should be a number
9595
And save STDOUT as {FONT_FAMILY_ID}
9696

97-
When I run `wp font family get {FONT_FAMILY_ID} --field=post_title`
97+
When I run `wp font family get {FONT_FAMILY_ID} --field=name`
9898
Then STDOUT should contain:
9999
"""
100100
Roboto

‎src/Font_Face_Command.php‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,6 @@ public function get( $args, $assoc_args ) {
263263
* 17
264264
*/
265265
public function create( $args, $assoc_args ) {
266-
if ( ! isset( $assoc_args['post_parent'] ) ) {
267-
WP_CLI::error( 'The --post_parent parameter is required.' );
268-
}
269-
270-
if ( ! isset( $assoc_args['post_title'] ) ) {
271-
WP_CLI::error( 'The --post_title parameter is required.' );
272-
}
273-
274266
// Verify parent font family exists.
275267
$parent_post = get_post( $assoc_args['post_parent'] );
276268
if ( ! $parent_post || 'wp_font_family' !== $parent_post->post_type ) {

0 commit comments

Comments
 (0)