File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,39 @@ Feature: Manage post custom fields
219219 My\New\Meta
220220 """
221221
222+ Scenario : List post meta with or without single flag
223+ Given a WP install
224+
225+ When I run `wp post meta add 1 apple banana`
226+ And I run `wp post meta add 1 apple banana`
227+ Then STDOUT should not be empty
228+
229+ When I run `wp post meta get 1 apple`
230+ Then STDOUT should be:
231+ """
232+ banana
233+ """
234+
235+ When I run `wp post meta get 1 apple --single`
236+ Then STDOUT should be:
237+ """
238+ banana
239+ """
240+
241+ When I run `wp post meta get 1 apple --no-single`
242+ Then STDOUT should be:
243+ """
244+ array (
245+ 0 => 'banana',
246+ 1 => 'banana',
247+ )
248+ """
249+ When I run `wp post meta get 1 apple --no-single --format=json`
250+ Then STDOUT should be:
251+ """
252+ ["banana","banana"]
253+ """
254+
222255 @pluck
223256 Scenario : Nested values can be retrieved.
224257 Given a WP install
You can’t perform that action at this time.
0 commit comments