PHPackages                             insolita/yii2-skeletest - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. insolita/yii2-skeletest

AbandonedArchivedYii2-extension[Testing &amp; Quality](/categories/testing)

insolita/yii2-skeletest
=======================

Generate test skeletons for file or whole directory with target file methods (codeception/phpunit - based on template)

1.1.0(8y ago)3178MITPHPPHP &gt;=7.0

Since May 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Insolita/skeletest)[ Packagist](https://packagist.org/packages/insolita/yii2-skeletest)[ RSS](/packages/insolita-yii2-skeletest/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (7)Versions (3)Used By (0)

Test Skeleton generator
=======================

[](#test-skeleton-generator)

[![Status](https://camo.githubusercontent.com/536e53bec9ce57cf4bbef4f7766d81d00f1c90f91e74ac5015a9011d57c9703c/68747470733a2f2f7472617669732d63692e6f72672f496e736f6c6974612f796969322d736b656c65746573742e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/536e53bec9ce57cf4bbef4f7766d81d00f1c90f91e74ac5015a9011d57c9703c/68747470733a2f2f7472617669732d63692e6f72672f496e736f6c6974612f796969322d736b656c65746573742e7376673f6272616e63683d6d6173746572)[![Latest Stable Version](https://camo.githubusercontent.com/5289a06b72b9dfec08f4b5eb0d2344cc6f9bbd9374e85ff5d8264d8a9260458f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e736f6c6974612f796969322d736b656c65746573742e737667)](https://camo.githubusercontent.com/5289a06b72b9dfec08f4b5eb0d2344cc6f9bbd9374e85ff5d8264d8a9260458f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e736f6c6974612f796969322d736b656c65746573742e737667)[![Total Downloads](https://camo.githubusercontent.com/8e032c2e7365de3ccfb545f2cfc4d5a2715d7c9776a323191823426e9cf0f109/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e736f6c6974612f796969322d736b656c65746573742e737667)](https://packagist.org/packages/insolita/yii2-skeletest.svg)[![License](https://camo.githubusercontent.com/905c4d789bfd6afa2c194f2d2abcd6d0e599582116065f9940f4de724f15dab2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696e736f6c6974612f796969322d736b656c65746573742e737667)](https://camo.githubusercontent.com/905c4d789bfd6afa2c194f2d2abcd6d0e599582116065f9940f4de724f15dab2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696e736f6c6974612f796969322d736b656c65746573742e737667)

Generate test skeletons for file or whole directory with target file methods (codeception/phpunit - based on template)

[CHANGELOG!](CHANGELOG.md)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require -dev --prefer-dist insolita/yii2-skeletest "~1.1"

```

or add

```
"insolita/yii2-skeletest": "~1.1"

```

to the require-dev section of your `composer.json` file.

Usage
-----

[](#usage)

in console application config add to controllerMap section

```
'skeletest'=>[
            'class'=>\insolita\skeletest\controllers\SkeletestController::class,
            'apps' => [
            //register each application with own test directory - for basic template like this
                            'app'=>[
                                'appPath'  => '@app/',
                                'testPath' => '@app/tests/codeception/unit',
                                'testNs'   => 'tests\codeception\unit',
                                'testerNs' => 'tests\codeception\UnitTester', //optional
                            ]
                        ],
            'app'=>'app',//default application key
            'templateFile' => '@vendor/insolita/yii2-skeletest/templates/codeception.php', //or own template
            'overwrite' => false, //overwrite existed test
            'ignoreGetters' => true, //skip getter methods
            'ignoreSetters' => true, //skip setter methods
            'withProtectedMethods' => false, //include protected methods in test skeleton
            'withPrivateMethods' => false,//include private methods in test skeleton
            'withStaticMethods' => true,//include static methods in test skeleton
            'ignoreFilePatterns'=>['~(controllers|widget|asset|interface|contract|migration)~i'],//array of regexp patterns for skip files
            'ignoreMethodPatterns'=>['~^(behaviors|find|rules|tableName|attributeLabels|scenarios)$~'],//array of regexp patterns for skip methods
        ],
```

after configuration you can use it in console

- generate single test by file alias

```
  ./yii skeletest @app/components/MyComponent.php

```

- generate tests recursive for all files by directory alias (Be careful, if directory contains sub-directory with non-psr namespace roots, for that directories you must generate test directly) ```
    ./yii skeletest/dir @frontend/services/registration --app=front

    ```
- show options ```
    ./yii help skeletest/file

    ```

Template customization
----------------------

[](#template-customization)

Copy @vendor/insolita/yii2-skeletest/templates/codeception.php in any project directory and modify as you want Change in controllerMap 'templateFile' parameter of skeletest controller to you own template path Share in issue usefull template variants

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Total

2

Last Release

3273d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/40f26825f8c130796e3151e6c076721cf5bb222c42148102bb31a341a1a5c789?d=identicon)[Insolita](/maintainers/Insolita)

---

Top Contributors

[![Insolita](https://avatars.githubusercontent.com/u/1847402?v=4)](https://github.com/Insolita "Insolita (23 commits)")

---

Tags

hacktoberfestphpunitcodeceptiontestsyii2extension

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/insolita-yii2-skeletest/health.svg)

```
[![Health](https://phpackages.com/badges/insolita-yii2-skeletest/health.svg)](https://phpackages.com/packages/insolita-yii2-skeletest)
```

###  Alternatives

[mcustiel/phiremock-codeception-extension

Codeception extension for Phiremock. Allows to stub remote services for HTTP requests.

311.0M5](/packages/mcustiel-phiremock-codeception-extension)[aik099/phpunit-mink

Library for using Mink in PHPUnit tests. Supports session sharing between tests in a test case.

72136.2k1](/packages/aik099-phpunit-mink)[janmarek/mockista

Mockista is library for mocking, which I've written, because I find mocking in PHPUnit awful.

29221.0k28](/packages/janmarek-mockista)[whatthejeff/emoji-phpunit-resultprinter

Emojis for your PHPUnit test results!

213.9k](/packages/whatthejeff-emoji-phpunit-resultprinter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
