You are here

public function vfsStreamDirectoryTestCase::rename in Zircon Profile 8.0

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

test renaming the directory

@test

File

vendor/mikey179/vfsStream/src/test/php/org/bovigo/vfs/vfsStreamDirectoryTestCase.php, line 62

Class

vfsStreamDirectoryTestCase
Test for org\bovigo\vfs\vfsStreamDirectory.

Namespace

org\bovigo\vfs

Code

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