承接 phpactor/test-utils 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 #phpactor channel on the Slack Symfony Devs channel.

统计信息

  • 总下载量: 367.95k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 35
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-05