loresjoberg/warp
Composer 安装命令:
composer require loresjoberg/warp
包简介
A passthrough to WordPress, used to enable unit testing.
README 文档
README
Here's why this class exists: WordPress pollutes the global namespace something awful, and there's nothing we can do about that.
However, we can voluntarily "wrap" WordPress in a class, and choose to only access it through that class. Why would we want to do that? The main reason is unit testing. By accessing WordPress's global functions only through this class, we can easily mock it up and test without instantiating all of WordPress, setting up a database, so on and so forth.
Installation
Install using [Composer][composer]:
composer require loresjoberg/warp
Usage
$warp = new \LoreSjoberg\Warp();
$result = $warp->count_users();
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-07-23