Commit 4ec324ef authored by webchick's avatar webchick

Issue #2493913 by iMiksu: Update mikey179/vfsstream to the latest stable release

parent e6ea4170
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "ba1a97bf2c0bcef4fb771231a4c1fbdb",
......@@ -1007,28 +1007,28 @@
},
{
"name": "mikey179/vfsStream",
"version": "v1.4.0",
"version": "v1.5.0",
"source": {
"type": "git",
"url": "https://github.com/mikey179/vfsStream.git",
"reference": "61b12172292cf539685507aa65b076c1530e83c1"
"reference": "4dc0d2f622412f561f5b242b19b98068bbbc883a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mikey179/vfsStream/zipball/61b12172292cf539685507aa65b076c1530e83c1",
"reference": "61b12172292cf539685507aa65b076c1530e83c1",
"url": "https://api.github.com/repos/mikey179/vfsStream/zipball/4dc0d2f622412f561f5b242b19b98068bbbc883a",
"reference": "4dc0d2f622412f561f5b242b19b98068bbbc883a",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.2"
"phpunit/phpunit": "~4.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
"dev-master": "1.5.x-dev"
}
},
"autoload": {
......@@ -1038,10 +1038,18 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD"
"BSD-3-Clause"
],
"authors": [
{
"name": "Frank Kleine",
"homepage": "http://frankkleine.de/",
"role": "Developer"
}
],
"description": "Virtual file system to mock the real file system in unit tests.",
"homepage": "http://vfs.bovigo.org/",
"time": "2014-09-14 10:18:53"
"time": "2015-03-29 11:19:49"
},
{
"name": "phpdocumentor/reflection-docblock",
......@@ -2900,7 +2908,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Validator/zipball/6bb1b474d25cb80617d8da6cb14c955ba914e495",
"url": "https://api.github.com/repos/symfony/Validator/zipball/d667b6a563e233b24ae1599a9fde7a53ddd1c055",
"reference": "6bb1b474d25cb80617d8da6cb14c955ba914e495",
"shasum": ""
},
......@@ -3073,12 +3081,12 @@
"version": "2.4.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendEscaper.git",
"url": "https://github.com/zendframework/zend-escaper.git",
"reference": "65b3328627362b0be1d5e9067bc846511d1fbc96"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendEscaper/zipball/65b3328627362b0be1d5e9067bc846511d1fbc96",
"url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/15e5769e4fcdb4bf07ebd76500810e7070e23a97",
"reference": "65b3328627362b0be1d5e9067bc846511d1fbc96",
"shasum": ""
},
......@@ -3113,12 +3121,12 @@
"version": "2.4.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendFeed.git",
"url": "https://github.com/zendframework/zend-feed.git",
"reference": "aca2b42ecf06d94c621e3c3be8e95d61d3a79bf5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendFeed/zipball/aca2b42ecf06d94c621e3c3be8e95d61d3a79bf5",
"url": "https://api.github.com/repos/zendframework/zend-feed/zipball/0f59e560364f1f1fcb09a96874328ae3ff690db2",
"reference": "aca2b42ecf06d94c621e3c3be8e95d61d3a79bf5",
"shasum": ""
},
......@@ -3170,12 +3178,12 @@
"version": "2.4.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendStdlib.git",
"url": "https://github.com/zendframework/zend-stdlib.git",
"reference": "eab586f4c18af3fa63c977611939f1f4a3cf1030"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/eab586f4c18af3fa63c977611939f1f4a3cf1030",
"url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/cf05c5ba75606e47ffee91cedc72778da46f74c3",
"reference": "eab586f4c18af3fa63c977611939f1f4a3cf1030",
"shasum": ""
},
......
......@@ -381,46 +381,6 @@
"stream"
]
},
{
"name": "mikey179/vfsStream",
"version": "v1.4.0",
"version_normalized": "1.4.0.0",
"source": {
"type": "git",
"url": "https://github.com/mikey179/vfsStream.git",
"reference": "61b12172292cf539685507aa65b076c1530e83c1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mikey179/vfsStream/zipball/61b12172292cf539685507aa65b076c1530e83c1",
"reference": "61b12172292cf539685507aa65b076c1530e83c1",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.2"
},
"time": "2014-09-14 10:18:53",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"org\\bovigo\\vfs\\": "src/main/php"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD"
],
"homepage": "http://vfs.bovigo.org/"
},
{
"name": "phpunit/php-text-template",
"version": "1.2.0",
......@@ -2304,12 +2264,12 @@
"version_normalized": "2.4.0.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendStdlib.git",
"url": "https://github.com/zendframework/zend-stdlib.git",
"reference": "eab586f4c18af3fa63c977611939f1f4a3cf1030"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/eab586f4c18af3fa63c977611939f1f4a3cf1030",
"url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/cf05c5ba75606e47ffee91cedc72778da46f74c3",
"reference": "eab586f4c18af3fa63c977611939f1f4a3cf1030",
"shasum": ""
},
......@@ -2358,12 +2318,12 @@
"version_normalized": "2.4.0.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendEscaper.git",
"url": "https://github.com/zendframework/zend-escaper.git",
"reference": "65b3328627362b0be1d5e9067bc846511d1fbc96"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendEscaper/zipball/65b3328627362b0be1d5e9067bc846511d1fbc96",
"url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/15e5769e4fcdb4bf07ebd76500810e7070e23a97",
"reference": "65b3328627362b0be1d5e9067bc846511d1fbc96",
"shasum": ""
},
......@@ -2400,12 +2360,12 @@
"version_normalized": "2.4.0.0",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendFeed.git",
"url": "https://github.com/zendframework/zend-feed.git",
"reference": "aca2b42ecf06d94c621e3c3be8e95d61d3a79bf5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendFeed/zipball/aca2b42ecf06d94c621e3c3be8e95d61d3a79bf5",
"url": "https://api.github.com/repos/zendframework/zend-feed/zipball/0f59e560364f1f1fcb09a96874328ae3ff690db2",
"reference": "aca2b42ecf06d94c621e3c3be8e95d61d3a79bf5",
"shasum": ""
},
......@@ -3264,7 +3224,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Validator/zipball/6bb1b474d25cb80617d8da6cb14c955ba914e495",
"url": "https://api.github.com/repos/symfony/Validator/zipball/d667b6a563e233b24ae1599a9fde7a53ddd1c055",
"reference": "6bb1b474d25cb80617d8da6cb14c955ba914e495",
"shasum": ""
},
......@@ -3325,5 +3285,53 @@
],
"description": "Symfony Validator Component",
"homepage": "https://symfony.com"
},
{
"name": "mikey179/vfsStream",
"version": "v1.5.0",
"version_normalized": "1.5.0.0",
"source": {
"type": "git",
"url": "https://github.com/mikey179/vfsStream.git",
"reference": "4dc0d2f622412f561f5b242b19b98068bbbc883a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mikey179/vfsStream/zipball/4dc0d2f622412f561f5b242b19b98068bbbc883a",
"reference": "4dc0d2f622412f561f5b242b19b98068bbbc883a",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.5"
},
"time": "2015-03-29 11:19:49",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.5.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"org\\bovigo\\vfs\\": "src/main/php"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Frank Kleine",
"homepage": "http://frankkleine.de/",
"role": "Developer"
}
],
"description": "Virtual file system to mock the real file system in unit tests.",
"homepage": "http://vfs.bovigo.org/"
}
]
src_dir: src/main/php
coverage_clover: docs/phpunit/clover.xml
json_path: docs/phpunit/coveralls-upload.json
\ No newline at end of file
/composer.lock
/docs
/nbproject
/vendor
language: php
php:
- hhvm
- hhvm-nightly
- 5.6
- 5.3
- 5.4
- 5.5
matrix:
allow_failures:
- php: hhvm
- php: hhvm-nightly
install:
- composer install
- composer require satooshi/php-coveralls:dev-master
script:
- vendor/bin/phpunit --coverage-text
after_script:
- vendor/bin/coveralls
1.5.0 (2015-03-29)
------------------
* implemented #91: `vfsStream::copyFromFileSystem()` should create large file instances
* implemented #92: `vfsStream::copyFromFileSystem()` should respect block devices
* fixed #107: `touch()` does not respect file permissions
* fixed #105: vfs directory structure is not reset after each test
* fixed #104: vfsStream can't handle url encoded pathes
1.4.0 (2014-09-14)
------------------
......
Copyright (c) 2007-2014, Frank Kleine
Copyright (c) 2007-2015, Frank Kleine
All rights reserved.
Redistribution and use in source and binary forms, with or without
......
......@@ -2,19 +2,32 @@
"name": "mikey179/vfsStream",
"type": "library",
"homepage": "http://vfs.bovigo.org/",
"license": "BSD",
"description": "Virtual file system to mock the real file system in unit tests.",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Frank Kleine",
"homepage": "http://frankkleine.de/",
"role": "Developer"
}
],
"support": {
"issues": "https://github.com/mikey179/vfsStream/issues",
"source": "https://github.com/mikey179/vfsStream/tree/master",
"wiki": "https://github.com/mikey179/vfsStream/wiki"
},
"require": {
"php": ">=5.3.0"
},
"require-dev": {
"phpunit/phpunit": "~4.2"
"phpunit/phpunit": "~4.5"
},
"autoload": {
"psr-0": { "org\\bovigo\\vfs\\": "src/main/php" }
},
"extra": {
"branch-alias": {
"dev-master": "1.4.x-dev"
"dev-master": "1.5.x-dev"
}
}
}
\ No newline at end of file
}
<?php
/**
* This file is part of vfsStream.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package org\bovigo\vfs
*/
namespace org\bovigo\vfs\example;
/**
* Example class.
*/
class Example
{
/**
* id of the example
*
* @type string
*/
protected $id;
/**
* a directory where we do something..
*
* @type string
*/
protected $directory;
/**
* constructor
*
* @param string $id
*/
public function __construct($id)
{
$this->id = $id;
}
/**
* sets the directory
*
* @param string $directory
*/
public function setDirectory($directory)
{
$this->directory = $directory . DIRECTORY_SEPARATOR . $this->id;
if (file_exists($this->directory) === false) {
mkdir($this->directory, 0700, true);
}
}
// more source code here...
}
?>
\ No newline at end of file
<?php
/**
* This file is part of vfsStream.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package org\bovigo\vfs
*/
namespace org\bovigo\vfs\example;
require_once 'Example.php';
/**
* Test case for class Example.
*/
class ExampleTestCaseOldWay extends \PHPUnit_Framework_TestCase
{
/**
* set up test environmemt
*/
public function setUp()
{
if (file_exists(__DIR__ . '/id') === true) {
rmdir(__DIR__ . '/id');
}
}
/**
* clear up test environment
*/
public function tearDown()
{
if (file_exists(__DIR__ . '/id') === true) {
rmdir(__DIR__ . '/id');
}
}
/**
* @test
*/
public function directoryIsCreated()
{
$example = new Example('id');
$this->assertFalse(file_exists(__DIR__ . '/id'));
$example->setDirectory(__DIR__);
$this->assertTrue(file_exists(__DIR__ . '/id'));
}
}
?>
\ No newline at end of file
<?php
/**
* This file is part of vfsStream.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package org\bovigo\vfs
*/
namespace org\bovigo\vfs\example;
use org\bovigo\vfs\vfsStream;
require_once 'Example.php';
/**
* Test case for class Example.
*
* @package bovigo_vfs
* @subpackage examples
*/
class ExampleTestCaseWithVfsStream extends \PHPUnit_Framework_TestCase
{
/**
* root directory
*
* @type vfsStreamDirectory
*/
protected $root;
/**
* set up test environmemt
*/
public function setUp()
{
$this->root = vfsStream::setup('exampleDir');
}
/**
* @test
*/
public function directoryIsCreated()
{
$example = new Example('id');
$this->assertFalse($this->root->hasChild('id'));
$example->setDirectory(vfsStream::url('exampleDir'));
$this->assertTrue($this->root->hasChild('id'));
}
}
?>
\ No newline at end of file
<?php
/**
* This file is part of vfsStream.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package org\bovigo\vfs
*/
namespace org\bovigo\vfs\example;
/**
* Example class to demonstrate testing of failure behaviour with vfsStream.
*/
class FailureExample
{
/**
* filename to write data
*
* @type string
*/
protected $filename;
/**
* constructor
*
* @param string $id
*/
public function __construct($filename)
{
$this->filename = $filename;
}
/**
* sets the directory
*
* @param string $directory
*/
public function writeData($data)
{
$bytes = @file_put_contents($this->filename, $data);
if (false === $bytes) {
return 'could not write data';
}
return 'ok';
}
// more source code here...
}
?>
\ No newline at end of file
<?php
/**
* This file is part of vfsStream.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package org\bovigo\vfs
*/
namespace org\bovigo\vfs\example;
use org\bovigo\vfs\vfsStream;
require_once 'FailureExample.php';
/**
* Test case for class FailureExample.
*/
class FailureExampleTestCase extends \PHPUnit_Framework_TestCase
{
/**
* root directory
*
* @type vfsStreamDirectory
*/
protected $root;
/**
* set up test environmemt
*/
public function setUp()
{
$this->root = vfsStream::setup('exampleDir');
}
/**
* @test
*/
public function returnsOkOnNoFailure()
{
$example = new FailureExample(vfsStream::url('exampleDir/test.txt'));
$this->assertSame('ok', $example->writeData('testdata'));
$this->assertTrue($this->root->hasChild('test.txt'));
$this->assertSame('testdata', $this->root->getChild('test.txt')->getContent());
}
/**
* @test
*/
public function returnsErrorMessageIfWritingToFileFails()
{
$file = vfsStream::newFile('test.txt', 0000)
->withContent('notoverwritten')
->at($this->root);
$example = new FailureExample(vfsStream::url('exampleDir/test.txt'));
$this->assertSame('could not write data', $example->writeData('testdata'));
$this->assertTrue($this->root->hasChild('test.txt'));
$this->assertSame('notoverwritten', $this->root->getChild('test.txt')->getContent());
}
}
?>
\ No newline at end of file
<?php
/**
* This file is part of vfsStream.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @package org\bovigo\vfs
*/
namespace org\bovigo\vfs\example;
require_once 'FilemodeExample.php';
/**
* Test case for class FilemodeExample.
*/
class FilemodeExampleTestCaseOldWay extends \PHPUnit_Framework_TestCase
{
/**
* set up test environmemt
*/
public function setUp()
{
if (file_exists(__DIR__ . '/id') === true) {
rmdir(__DIR__ . '/id');
}
}
/**
* clear up test environment
*/
public function tearDown()
{
if (file_exists(__DIR__ . '/id') === true) {
rmdir(__DIR__ . '/id');
}
}
/**
* test correct file mode for created directory
*/
public function testDirectoryHasCorrectDefaultFilePermissions()
{
$example = new FilemodeExample('id');
$example->setDirectory(__DIR__);
if (DIRECTORY_SEPARATOR === '\\') {
// can not really test on windows, filemode from mkdir() is ignored
$this->assertEquals(40777, decoct(fileperms(__DIR__ . '/id')));
} else {
$this->assertEquals(40700, decoct(fileperms(__DIR__ . '/id')));
}
}
/**
* test correct file mode for created directory
*/
public function testDirectoryHasCorrectDifferentFilePermissions()
{
$example = new FilemodeExample('id', 0755);
$example->setDirectory(__DIR__);
if (DIRECTORY_SEPARATOR === '\\') {
// can not really test on windows, filemode from mkdir() is ignored
$this->assertEquals(40777, decoct(fileperms(__DIR__ . '/id')));
} else {
$this->assertEquals(40755, decoct(fileperms(__DIR__ . '/id')));
}
}
}
?>
\ No newline at end of file
<?php
/**
* This file is part of vfsStream.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*