2017 © Pedro Peláez
 

library test-utils

Utilities for managing the test environment

image

phpactor/test-utils

Utilities for managing the test environment

  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 38 % Grown

The README.md

Test Utils

Set of general test utilties for Phpactor., (*1)

Workspace

The Workspace class is used to manage a test file workspace., (*2)

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":, (*3)

$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., (*4)

Support

  • Create an issue on the main Phpactor repository.
  • Join the #phpactor channel on the Slack Symfony Devs channel.

The Versions

28/07 2018

dev-master

9999999-dev

Utilities for managing the test environment

  Sources   Download

MIT

The Development Requires

20/01 2018

dev-include_offset_end

dev-include_offset_end

Utilities for managing the test environment

  Sources   Download

MIT

The Development Requires