PHPackages                             vektor-inc/vk-wp-unit-test-tools - 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. vektor-inc/vk-wp-unit-test-tools

ActiveLibrary[Testing &amp; Quality](/categories/testing)

vektor-inc/vk-wp-unit-test-tools
================================

WordPress PHPUnit test tools

0.12.0(3y ago)048.7k↑200.7%[1 issues](https://github.com/vektor-inc/vk-wp-unit-test-tools/issues)[1 PRs](https://github.com/vektor-inc/vk-wp-unit-test-tools/pulls)3MITPHP

Since Sep 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/vektor-inc/vk-wp-unit-test-tools)[ Packagist](https://packagist.org/packages/vektor-inc/vk-wp-unit-test-tools)[ RSS](/packages/vektor-inc-vk-wp-unit-test-tools/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (14)Used By (3)

VK WP Unit Test Tools
=====================

[](#vk-wp-unit-test-tools)

これは何？
-----

[](#これは何)

### テーマやプラグインの PHP Fatal Error をチェック

[](#テーマやプラグインの-php-fatal-error-をチェック)

WordPress のサイトの各ページで PHP の Fatal Error が発生しないかをPHPUnitテストで確認するためのツールです。 通常 PHPUnit では特定のクラスや関数などのチェックを行いますが、例えば以下のようなケースは検出できません。

- 関数名を変更して、そのテストは変更したが、利用先の関数名の変更漏れ
- テストを書いてない部分の 読み込み順やメソッド名間違いによる Fatal Error や SyntaxError
- 特定のページでしか発生しない Fatal Error

そこで、PHPUnit でテスト用のページを投稿して、各ページを巡回してエラーが発生していないかテストします。

使い方
---

[](#使い方)

### 前提条件

[](#前提条件)

既に wp-env で PHPUnit が動くように設定されているリポジトリでの利用前提です。

### インストールと設定

[](#インストールと設定)

#### インストール

[](#インストール)

```
$ composer require --dev vektor-inc/vk-wp-unit-test-tools

```

#### 設定

[](#設定)

PHPUnitの設定ファイル phpunit.xml などに 以下を追加

```
./vendor/vektor-inc/vk-wp-unit-test-tools/src/tests/

```

これで、各リポジトリの package.json などで設定してある PHPUnit を走らせるコマンドを叩けば動きます。

試しにテーマファイルなどに意図的に未定義の関数など入れるとひっかかるはずです。

ただし、手探りで作ったので、普通のエンジニアの方からしたらツッコミ所満載だと思います。

これおかしいんじゃね？普通はこうじゃね？というご意見・プルリクお待ちしております。

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~54 days

Recently: every ~148 days

Total

12

Last Release

1128d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/670d919fa5be975d4cd59efa993eed674283385d205add1a7fd1773c949060b5?d=identicon)[vektor-inc](/maintainers/vektor-inc)

---

Top Contributors

[![kurudrive](https://avatars.githubusercontent.com/u/3272660?v=4)](https://github.com/kurudrive "kurudrive (22 commits)")[![drill-lancer](https://avatars.githubusercontent.com/u/38716787?v=4)](https://github.com/drill-lancer "drill-lancer (2 commits)")

### Embed Badge

![Health badge](/badges/vektor-inc-vk-wp-unit-test-tools/health.svg)

```
[![Health](https://phpackages.com/badges/vektor-inc-vk-wp-unit-test-tools/health.svg)](https://phpackages.com/packages/vektor-inc-vk-wp-unit-test-tools)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

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