{"id":36251481,"url":"https://github.com/sakharovmaksim/annotation-processor","last_synced_at":"2026-01-11T07:00:12.702Z","repository":{"id":62539463,"uuid":"133509412","full_name":"sakharovmaksim/annotation-processor","owner":"sakharovmaksim","description":"Utility for parsing constants from the description of the test methods. Created by tutu.ru","archived":false,"fork":false,"pushed_at":"2019-03-21T14:29:17.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-12T08:48:42.538Z","etag":null,"topics":["annotation-processor","annotations","description","phpunit","phpunit-tests","test","test-management","testing-tools","ui-tests"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sakharovmaksim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-15T11:56:27.000Z","updated_at":"2019-03-21T14:29:18.000Z","dependencies_parsed_at":"2022-11-02T15:30:57.000Z","dependency_job_id":null,"html_url":"https://github.com/sakharovmaksim/annotation-processor","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/sakharovmaksim/annotation-processor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakharovmaksim%2Fannotation-processor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakharovmaksim%2Fannotation-processor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakharovmaksim%2Fannotation-processor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakharovmaksim%2Fannotation-processor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sakharovmaksim","download_url":"https://codeload.github.com/sakharovmaksim/annotation-processor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sakharovmaksim%2Fannotation-processor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28296941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T04:44:51.577Z","status":"ssl_error","status_checked_at":"2026-01-11T04:44:44.232Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["annotation-processor","annotations","description","phpunit","phpunit-tests","test","test-management","testing-tools","ui-tests"],"created_at":"2026-01-11T07:00:11.281Z","updated_at":"2026-01-11T07:00:12.694Z","avatar_url":"https://github.com/sakharovmaksim.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Annotation Processor — utility for parsing constants from the description of test methods\n========================================================\n\n##  Install\n\n### 1. Download project from the repository\n\nNavigate to the directory where you want to store the directory with project. For instance, your home directory `cd ~`.\n\n`git clone git@github.com:sakharovmaksim/annotation-processor.git`\n\nAnd when downloading is done, navigate to the project directory `cd annotation-processor`.\n\n### 2. Install dependencies\n\n`composer install`\n\n##  Usage\n\n### 1. In your TestCase class\n\nIn your TestCase class, in setUp() method, which extends from \\PHPUnit\\Framework\\TestCase create and use function like:\n\n```\npublic function setUp()\n{\n\t$this-\u003e_processAnnotations();\n}\n\nprivate function _processAnnotations()\n{\n\t$class = get_class($this);\n\t$methodName = $this-\u003egetName(false);\n\t$annotationProcessor = new AnnotationProcessor($class, $methodName);\n\t// @domains\n\tif ($domainsExcept = $annotationProcessor-\u003eprocess(new Annotation\\ArrayAnnotation(AnnotationsNames::DOMAINS_EXCEPT)))\n\t{\n\t\tif (Env::isRC() \u0026\u0026 in_array(Env::RC, $domainsExcept))\n\t\t{\n\t\t\t$this-\u003emarkTestSkipped(\"Skip the test that is not for RC: {$class}::{$methodName}\");\n\t\t}\n\t\telseif (Env::isProduction() \u0026\u0026 in_array(Env::PROD, $domainsExcept))\n\t\t{\n\t\t\t$this-\u003emarkTestSkipped(\"Skip the test that is not for Production: {$class}::{$methodName}\");\n\t\t}\n\t\telseif (Env::isStand() \u0026\u0026 in_array(Env::STAND, $domainsExcept))\n\t\t{\n\t\t\t$this-\u003emarkTestSkipped(\"Skip the test that is not for stands: {$class}::{$methodName}\");\n\t\t}\n\t}\n\t// @bug\n\tif ($annotationProcessor-\u003eprocess(new Annotation\\BoolAnnotation(AnnotationsNames::BUG)))\n\t{\n\t\t$this-\u003emarkTestSkipped(\"Skip the test {$class}::{$methodName}, because it has deactivated due to a @bug!\");\n\t}\n\t// @todocase\n\tif ($annotationProcessor-\u003eprocess(new Annotation\\BoolAnnotation(AnnotationsNames::TODOCASE)))\n\t{\n\t\t$this-\u003emarkTestSkipped(\"Skip the test {$class}::{$methodName}, because it has @todocase, write it!\");\n\t}\n}\n```\nThis function, when starting each test, will analyze the constants from the description and apply the actions described in the function above.\n\n### 2. Create AnnotationsNames file with annotation constants\n\nUse constants in _processAnnotations()\n```\nclass AnnotationsNames\n{\n\tconst DOMAINS_EXCEPT = '@domainsExcept';\n\tconst BUG = '@bug';\n\tconst TODOCASE = '@todocase';\n}\n```\n\n### 3. Usage in tests annotations\n\n```\n/**\n * @labels Labels::RELEASE\n * @todocase Проверка поиска \"Только туда\"\n */\npublic function testSearchOW() {}\n```\n\n### 4. Run unit-tests for project\n\n`sh run_tests.sh`\n\n### 5. Deploy\n\nTravis CI run unit-tests for all Pull Requests. Look '.travis.yml'-file with CI-config\n\n\n-----\nCreated by tutu.ru\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsakharovmaksim%2Fannotation-processor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsakharovmaksim%2Fannotation-processor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsakharovmaksim%2Fannotation-processor/lists"}