You are here

public function vfsStreamFileTestCase::rename in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php \org\bovigo\vfs\vfsStreamFileTestCase::rename()

test renaming the directory

@test

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamFileTestCase.php, line 64

Class

vfsStreamFileTestCase
Test for org\bovigo\vfs\vfsStreamFile.

Namespace

org\bovigo\vfs

Code

public function rename() {
  $this->file
    ->rename('bar');
  $this
    ->assertEquals('bar', $this->file
    ->getName());
  $this
    ->assertFalse($this->file
    ->appliesTo('foo'));
  $this
    ->assertFalse($this->file
    ->appliesTo('foo/bar'));
  $this
    ->assertTrue($this->file
    ->appliesTo('bar'));
}