Skip to content

Generate test file using menus #10

@bogdananton

Description

@bogdananton

Description

Generate scaffolds (files, folders, bootstraps, phpunit.xml sample files), customize types of tests (generic - single layer - or multiple layers: unit, integration, functional, etc)

Triggers

When right clicking on a method name found in the source file (be it the call or the method definition), append the items described below to the context menu:

  • Jump to tests
  • Generate test class

When "levels of tests" are set to multiple layers, the methods above will have a sub-layer for each level (as in "Generate unit tests class" [for this marked method]).

When building the test namespace (the path generation), the source will be the project root (by default) or - if marked as "Sources Root" - the marked sources folder.

Settings

There will be a global and project settings pages. The following configuration items will be available:

  • level of tests: single level (all placed in the tests/ folder) or multiple layerrs (default: unit, integration, functional, but can be customized to map custom folder names)
  • path generation: all tests for a class in a single file or (default) each method in its own test class
  • namespace / folder passing: strict psr4 namespace mirror or (default) folder mirror

"level of tests" should be implemented, others are TBD / low priority.


Specs are subject to change, any feedback is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions