--- /dev/null
+Feature: Manage WordPress options
+
+ Scenario: Option CRUD
+ Given a WP install
+
+ When I run `wp option add foo 'bar'`
+ Then STDOUT should be empty
+
+ When I run `wp option get foo`
+ Then STDOUT should be:
+ """
+ bar
+ """
+
+ When I run `wp option set foo '[ 1, 2 ]' --format=json`
+ Then STDOUT should be empty
+
+ When I run `wp option get foo --format=json`
+ Then STDOUT should be:
+ """
+ [1,2]
+ """
+
+ When I run `wp option delete foo`
+ Then STDOUT should be empty
+
+ When I try `wp option get foo`
+ Then the return code should be 1
/**
* Get an option.
*
- * @synopsis <key> [--json]
+ * @synopsis <key> [--format=<format>]
*/
public function get( $args, $assoc_args ) {
list( $key ) = $args;
/**
* Add an option.
*
- * @synopsis <key> <value> [--json]
+ * @synopsis <key> [--format=<format>]
*/
public function add( $args, $assoc_args ) {
$key = $args[0];
* Update an option.
*
* @alias set
- * @synopsis <key> <value> [--json]
+ * @synopsis <key> [--format=<format>]
*/
public function update( $args, $assoc_args ) {
$key = $args[0];