phpactor/test-utils
最新稳定版本:2.0.0
Composer 安装命令:
composer require phpactor/test-utils
包简介
Utilities for managing the test environment
README 文档
README
Set of general test utilties for Phpactor.
Workspace
The Workspace class is used to manage a test file workspace.
Resetting / Creating a workspace
$workspace = Workspace::create(__DIR__ . '/workspace'); $workspace->reset(); // creates or deletes then creates the workspace directory
Loading test files
Load a set of test files from a "manifest":
$manifest = <<<'EOT' // File: lib/ClassOne.php <?php class ClassOne {} // File: lib/Foo/ClassTwo.php <?php namespace Foo; class ClassTwo {} EOT ; $workspace = Workspace::create(__DIR__ . '/workspace'); $workspace->loadManifest($manifest); // create the files in the manifest Assert::assertTrue($workspace->exists('lib/ClassOne.php')); Assert::assertTrue($workspace->exists('lib/Foo/ClassTwo.php')); echo $workspace->getContents('/lib/Foo/ClassTwo.php');
Contributing
This package is open source and welcomes contributions! Feel free to open a pull request on this repository.
Support
- Create an issue on the main Phpactor repository.
- Join the
#phpactorchannel on the Slack Symfony Devs channel.
统计信息
- 总下载量: 367.95k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 35
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-01-05