Skip to content

Search Class -> arrValidator($param) Method is not working #3

@purencool

Description

@purencool

Issue

The Search Class -> arrValidator Method is designed for incorrect input data to fail gracefully. However, at this point it will fail everything.

    if($this->arrValidator($param)){
      return [];
    }

Solution

  1. Create tests for SearchGetters -> getArrValidator($param) Method so it can test the Search -> arrValidator($param) Method
  2. Change the Search -> arrValidator($param) Method to protected and not private
  3. Add arrValidator($param) Method the Search abstract Class
  4. Wire up the SearchGetter Method to the Search method
  5. Run tests, commit, deploy

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions