commitall
This commit is contained in:
47
hostel/vendor/mikey179/vfsstream/examples/ExampleTestCaseWithVfsStream.php
vendored
Normal file
47
hostel/vendor/mikey179/vfsstream/examples/ExampleTestCaseWithVfsStream.php
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
<?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'));
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user