2017 © Pedro Peláez
 

library stream-wrapper

PHP stream wrapper for testing classes which interact with files

image

bcncommerce/stream-wrapper

PHP stream wrapper for testing classes which interact with files

  • Tuesday, October 20, 2015
  • by skolodyazhnyy
  • Repository
  • 1 Watchers
  • 4 Stars
  • 412 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Stream Wrapper

This library provide a lightweight class which allows substitute PHP streams. It's very useful for Unit Testing when you need to test a class which interact with files., (*1)

Stream class create an unique stream wrapper which redirect file system calls to instance of Stream class, making the process fully controllable., (*2)

Usage

Reading, (*3)

$stream = new Stream("Content");

// This code use variable instead of using actual file
$fh = fopen($stream, "r");
echo fgets($fh); // output Content
fclose($fh);

Writing, (*4)

$stream = new Stream();

// This code write everything into variable
$fh = fopen($stream, "r");
fputs($fh, "Content");
fclose($fh);

// Now you can perform actions on generated content
echo $stream->getContent(); // output Content

The Versions

20/10 2015

dev-master

9999999-dev

PHP stream wrapper for testing classes which interact with files

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Sergey Kolodyazhnyy

test mock phpunit file filesystem wrapper stream unit-test

20/10 2015

1.0.1

1.0.1.0

PHP stream wrapper for testing classes which interact with files

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Sergey Kolodyazhnyy

test mock phpunit file filesystem wrapper stream unit-test

31/07 2015

1.0.0

1.0.0.0

PHP stream wrapper for testing classes which interact with files

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Sergey Kolodyazhnyy

test mock phpunit file filesystem wrapper stream unit-test

09/04 2014

0.1.0

0.1.0.0

PHP stream wrapper for testing classes which interact with files

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Sergey Kolodyazhnyy

test mock phpunit file filesystem wrapper stream unit-test