<commit_before>Feature: Manage user term

  Scenario: Userterm CRUD
    Given a WP install
    And a wp-content/plugins/test-add-tax/plugin.php file:
      """
      <?php
      // Plugin Name: Test Add Tax

      function add_cli_tax(){
        register_taxonomy( 'user_type', 'user' );
      }

      add_action('init','add_cli_tax');
      """
    And I run `wp plugin activate test-add-tax`


    When I run `wp user term add 1 user_type foo`
    Then STDOUT should be:
      """
      Success: Added term.
      """

    When I run `wp user term list 1 user_type --fields=name,slug,taxonomy`
    Then STDOUT should be a table containing rows:
      | name | slug | taxonomy |
      | foo  | foo  | user_type |

    When I run `wp user term add 1 user_type bar`
    Then STDOUT should be:
      """
      Success: Added term.
      """

    When I run `wp user term list 1 user_type --fields=name,slug,taxonomy`
    Then STDOUT should be a table containing rows:
      | name | slug | taxonomy |
      | foo  | foo  | user_type |
      | bar  | bar  | user_type |

    When I run `wp user term list 1 user_type --format=ids`
    Then STDOUT should be:
      """
      3 2
      """

    When I run `wp user term set 1 user_type new`
    Then STDOUT should be:
      """
      Success: Set terms.
      """

    When I run `wp user term list 1 user_type --fields=name,slug,taxonomy --format=count`
    Then STDOUT should be:
      """
      1
      """

    When I run `wp user term remove 1 user_type new`
    Then STDOUT should be:
      """
      Success: Deleted term.
      """

    When I run `wp user term list 1 user_type --fields=name,slug,taxonomy --format=count`
    Then STDOUT should be:
      """
      0
      """
<commit_msg>Update `user-term.feature` for changes in 6bc7a8e225d8e588cefe29df29a54f0796e9510c<commit_after>Feature: Manage user term

  Scenario: Userterm CRUD
    Given a WP install
    And a wp-content/plugins/test-add-tax/plugin.php file:
      """
      <?php
      // Plugin Name: Test Add Tax

      function add_cli_tax(){
        register_taxonomy( 'user_type', 'user' );
      }

      add_action('init','add_cli_tax');
      """
    And I run `wp plugin activate test-add-tax`


    When I run `wp user term add 1 user_type foo`
    Then STDOUT should be:
      """
      Success: Added term.
      """

    When I run `wp user term list 1 user_type --fields=name,slug,taxonomy`
    Then STDOUT should be a table containing rows:
      | name | slug | taxonomy |
      | foo  | foo  | user_type |

    When I run `wp user term add 1 user_type bar`
    Then STDOUT should be:
      """
      Success: Added term.
      """

    When I run `wp user term list 1 user_type --fields=name,slug,taxonomy`
    Then STDOUT should be a table containing rows:
      | name | slug | taxonomy |
      | foo  | foo  | user_type |
      | bar  | bar  | user_type |

    When I run `wp user term list 1 user_type --format=ids`
    Then STDOUT should be:
      """
      3 2
      """

    When I run `wp user term set 1 user_type new`
    Then STDOUT should be:
      """
      Success: Set term.
      """

    When I run `wp user term list 1 user_type --fields=name,slug,taxonomy --format=count`
    Then STDOUT should be:
      """
      1
      """

    When I run `wp user term remove 1 user_type new`
    Then STDOUT should be:
      """
      Success: Removed term.
      """

    When I run `wp user term list 1 user_type --fields=name,slug,taxonomy --format=count`
    Then STDOUT should be:
      """
      0
      """

{'fraction_non_alphanumeric': 0.09898762654668167, 'fraction_numerical': 0.0140607424071991, 'mean_word_length': 2.045376712328767, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7360369', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1129, 'n_words': 407}