loadsys / loadsys/CakePHP-LoadsysTheme

Generate controller test cases?

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
PHP
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

If possible, baking a controller class and its associated test class should produce a test suite that passes and covers the majority (if not all) of the baked controller. The bake process is fairly deterministic-- so the tests should likewise be predictable.

There may be issues in how much information we have about the controller when rendering the test class of course, but this topic warrants some research and experimentation. Anything to improve upon an empty test class with a bunch of `->markTestIncomplete()`s.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points; start by locating the CakePHP 3 bake templates for controllers and their associated test classes. Compare the generated output and existing incomplete tests, then define predictable passing coverage for most baked controller behavior while reducing markTestIncomplete() placeholders.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.