Changeset 1193

Show
Ignore:
Timestamp:
12/27/07 12:54:22 (11 months ago)
Author:
mikey
Message:

added tests for is_dir() and is_file()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/vfs/package.php

    r1192 r1193  
    4343- added vfsStream::path() method as opposite to vfsStream::url() 
    4444- a call to vfsStreamWrapper::register() will now reset the root to null (implemented because of a hint by David Zülke) 
    45 - added support for is_readable() 
     45- added support for is_readable(), is_dir(), is_file() 
    4646')); 
    4747 
  • trunk/src/test/php/org/stubbles/vfs/vfsStreamWrapperTestCase.php

    r1192 r1193  
    279279        $this->assertFalse(is_readable(vfsStream::url('another'))); 
    280280    } 
     281 
     282    /** 
     283     * assert is_dir() returns correct result 
     284     */ 
     285    public function testIs_dir() 
     286    { 
     287        $this->assertTrue(is_dir($this->fooURL)); 
     288        $this->assertTrue(is_dir($this->barURL)); 
     289        $this->assertFalse(is_dir($this->baz1URL)); 
     290        $this->assertFalse(is_dir($this->baz2URL)); 
     291        $this->assertFalse(is_dir($this->fooURL . '/another')); 
     292        $this->assertFalse(is_dir(vfsStream::url('another'))); 
     293    } 
     294 
     295    /** 
     296     * assert is_file() returns correct result 
     297     */ 
     298    public function testIs_file() 
     299    { 
     300        $this->assertFalse(is_file($this->fooURL)); 
     301        $this->assertFalse(is_file($this->barURL)); 
     302        $this->assertTrue(is_file($this->baz1URL)); 
     303        $this->assertTrue(is_file($this->baz2URL)); 
     304        $this->assertFalse(is_readable($this->fooURL . '/another')); 
     305        $this->assertFalse(is_readable(vfsStream::url('another'))); 
     306    } 
    281307} 
    282308?>