Skip to content
This repository was archived by the owner on Apr 12, 2018. It is now read-only.

Example 9.22: mock filesystem errors #277

Closed
franzholz opened this issue Jan 13, 2015 · 2 comments
Closed

Example 9.22: mock filesystem errors #277

franzholz opened this issue Jan 13, 2015 · 2 comments

Comments

@franzholz
Copy link
Contributor

When I start Example 9.22 to mock the filesystem, then I get this error:

 [13-Jan-2015 11:05:42 UTC] PHP Warning:  require_once(vfsStream/vfsStream.php): failed to open stream: No such file or directory in /var/www/html/phpunit/franz/ExampleTest.php on line 3

So I comment out the first line, because Composer did install the vfs package inside the vendor folder and it uses autoload.

 // require_once 'vfsStream/vfsStream.php';

However another error shows up in the PHP error_log:

   [13-Jan-2015 11:08:31 UTC] PHP Fatal error:  Class 'vfsStreamWrapper' not found in /var/www/html/phpunit/franz/ExampleTest.php on line 10
@webmaestro365
Copy link

I had to use these three lines MISSING from the documentation and hinted to me by Netbeans IDE:
use org\bovigo\vfs\vfsStreamWrapper;
use org\bovigo\vfs\vfsStreamDirectory;
use org\bovigo\vfs\vfsStream;

@sebastianbergmann
Copy link
Owner

Dear contributor,

thanks to the hard work by @belanur, @starikovm, @trueromio, and others, the changes outlined in #471 (comment) have been implemented.

This repository, https://github.com/sebastianbergmann/phpunit-documentation, is now archived and read-only. The documentation for PHPUnit version prior to PHPUnit 7.0 will no longer be changed or updated. It is still hosted at

  • Multiple HTML files: https://phpunit.de/manual/6.5/en/index.html
  • Multiple HTML files (in a .tar.bz2 archive): https://phpunit.de/manual/current/en/download.tar.bz2
  • Single HTML file: https://phpunit.de/manual/current/en/phpunit-book.html
  • PDF: https://phpunit.de/manual/current/en/phpunit-book.pdf
  • ePub: https://phpunit.de/manual/current/en/phpunit-book.epub

Simply replace 6.5 with the version number you are looking for. Simply replace en with fr, pt_br, ja, or zh_cn to access the French, Brazilian Portuguese, Japanese, or Simplified Chinese translation, respectively.

Starting with the documentation for PHPUnit 7.0, the PHPUnit documentation is hosted at https://phpunit.readthedocs.io/.

I am sorry that I have to close this issue here as GitHub does not support moving issues from one project to another. Please open a new ticket for this issue in one of the new issue trackers (see above).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants