2017 © Pedro Peláez
 

library expect-filesystem

File system matcher for expect

image

expect/expect-filesystem

File system matcher for expect

  • Wednesday, August 10, 2016
  • by holyshared
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

expect-filesystem

Build Status HHVM Status Coverage Status Scrutinizer Code Quality Dependency Status, (*1)

Basic usage

Create a configuration file of expect.
The format of the file is toml., (*2)

packages = [
  "expect\\filesystem\\FileSystem"
]

Load the configuration file that you created., (*3)

use expect\Expect;
use expect\configurator\FileConfigurator;

$configurator = new FileConfigurator(__DIR__ . '/.expect.toml');
Expect::configure($configurator);

Expect::that('log.txt')->toBeExists(); //pass
Expect::that('not_found_log.txt')->toBeExists(); //failed

All of matcher

toBeExists

Expect::that($file)->toBeExists();

toBeReadable

Expect::that($file)->toBeReadable();

toBeWritable

Expect::that($file)->toBeWritable();

toBeExecutable

Expect::that($file)->toBeExecutable();

toBeDirectory

Expect::that($file)->toBeDirectory();

toBeFile

Expect::that($file)->toBeFile();

toBeMode

Expect::that($file)->toBeMode(644);

The Versions