Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Tracking: Test generator MVP

未关闭
#631 2 条评论 1 个 reaction 已指派 1 人 在 GitHub 查看

@mk-mxp 已经在做这个了。

开始于 2024年2月23日。

评估

这个 Issue 还没有评估数据。

描述

Test generator MVP to use after configlet generate for practice exercises:

  • #638 Integrate POC test generator into new directory contrib/generator, so it is not installed in CI
  • #638 Add a parameter to choose the exercise by slug
  • #638 Use local configlet cached problem specification repository as information source
  • #663 Do not do anything, if exercise has no canonical-data (there are some)
  • #663 Use /exercises/practice/${slug}/.meta/config.json>files>test and check that there is only one entry
  • #638 Write tests to already created /exercises/practice/${slug}
  • #638 Have test class skeleton
  • #663 Have test class DocBlock with "PHP track rules"
  • #638 Have testdox with description
  • #638 Have UUID in DocBlock
  • #638 Have all tests marked incomplete
  • #663 Have $input, $expected
  • #663 Have $subject = new ${PascalSlug};, $actual = $subject->${property}($input); and assertSame($expected, $actual);
  • #663 Handle unknown data, so the user can act on it
  • #663 Handle nested groups of tests
  • Bonus: Add composer script to handle exercise generation from scratch. The problem is handling the slug required for exercise generation. That requires some additional scripting, so that only those commands get the slug that need it and the others do not fail.
  • #663 adds unit tests, but no integration tests Bonus: Add golden tests for test generation of some exercises
  • #663 handles unknow data instead Bonus: Add JSON validation using the configlet scheme (if that exists), else at least field existance and character sets
  • Bonus: Add PHP CodeSniffer (with rules for test-generator only) and more static analysis

Not MVP:

Open questions:

  • Should it be a single command app or do we want to add more commands like update-exercise (or so)?
  • Should we use another code producer library like laminas/laminas-code?
主要语言
PHP
星标
167
派生
150
平均合并
22 小时 18 分钟
30 天内合并 PR
7

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

exercism/php 的其他 Issue

查看 exercism/php 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。