{"id":15065490,"url":"https://github.com/nielsdeblaauw/wp-qualitycontrol","last_synced_at":"2025-04-10T16:51:12.633Z","repository":{"id":57026863,"uuid":"115195738","full_name":"NielsdeBlaauw/wp-qualitycontrol","owner":"NielsdeBlaauw","description":"Allows for automated testing of the various inputs possible with ACF fields.","archived":false,"fork":false,"pushed_at":"2018-06-11T06:30:35.000Z","size":87,"stargazers_count":3,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T14:41:49.660Z","etag":null,"topics":["acf-field","automated-testing","wordpress","wordpress-development","wp-qualitycontrol"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NielsdeBlaauw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-23T13:00:30.000Z","updated_at":"2024-12-26T03:25:06.000Z","dependencies_parsed_at":"2022-08-23T15:31:20.516Z","dependency_job_id":null,"html_url":"https://github.com/NielsdeBlaauw/wp-qualitycontrol","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NielsdeBlaauw%2Fwp-qualitycontrol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NielsdeBlaauw%2Fwp-qualitycontrol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NielsdeBlaauw%2Fwp-qualitycontrol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NielsdeBlaauw%2Fwp-qualitycontrol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NielsdeBlaauw","download_url":"https://codeload.github.com/NielsdeBlaauw/wp-qualitycontrol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248255943,"owners_count":21073423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acf-field","automated-testing","wordpress","wordpress-development","wp-qualitycontrol"],"created_at":"2024-09-25T00:39:12.708Z","updated_at":"2025-04-10T16:51:12.615Z","avatar_url":"https://github.com/NielsdeBlaauw.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CodeFactor](https://www.codefactor.io/repository/github/nielsdeblaauw/wp-qualitycontrol/badge/master)](https://www.codefactor.io/repository/github/nielsdeblaauw/wp-qualitycontrol/overview/master)\n\n# WP Qualitycontrol\n\nWith complex themes it is often impossible to try every single combination\nof settings and fields provided in post-types.\n\nWP Qualitycontrol creates many fuzzed posts with minimal configuration. After\ngenerating semi-realistic content the created posts are tested to see if they\nproduce a valid webpage.\n\n# Setup\n\n## 1. Define WP Qualitycontrol as a dependency\n\n`composer require niels-de-blaauw/wp-qualitycontrol`\n\nThe tool will load automatically.\n\n## 2. Run the generate command\n\nInside WordPress install, use the generate command:\n\n`wp qualitycontrol generate`\n\n# Customisation\n\nIt is possible to overwrite and extend the field processing with custom\nclasses. This method can be used to add non-standard ACF field types, or\nmodify output generation when the default does not fit the project.\n\n## Tests\n\nYou can add tests to the URL validation by using the following filters:\n\n- `ndb/qualitycontrol/test/fulfilled` possibly succeeded.\n- `ndb/qualitycontrol/test/rejected` probably failed.\n\n## Fields\nThere are three filters to hijack the field object.\n\n### 1. Field name\n\n```\nadd_filter('ndb/qualitycontrol/field_name=post_option_name', function($returnValue, $field, $post_type){\n\treturn new CustomObject($field, $post_type);\n}, 10, 3);\n```\n\n### 2. Field key\n\n```\nadd_filter('ndb/qualitycontrol/field_key=field_597c8fd614621', function($returnValue, $field, $post_type){\n  return new CustomObject($field, $post_type);\n}, 10, 3);\n```\n\n### 3. Field type\n\n```\nadd_filter('ndb/qualitycontrol/field_type=color_picker', function($returnValue, $field, $post_type){\n\treturn new CustomObject($field, $post_type);\n}, 10, 3);\n```\n\n## Return value\n\nReturning `false` skips to the next filter. Otherwise you must return\nan object implementing `\\NDB\\QualityControl\\FieldTypes\\iFieldType`.\n\n# Notes\n\n- The generate command will clean generated posts before and after running\nthe command, unless you tell it not to.\n- If the testing sequence is enabled and fails, cleaning the generated posts\nis skipped so you can debug with the generated content that failed.\n- You can manually clean generated posts with `wp qualitycontrol clean`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnielsdeblaauw%2Fwp-qualitycontrol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnielsdeblaauw%2Fwp-qualitycontrol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnielsdeblaauw%2Fwp-qualitycontrol/lists"}