Example #1
0
 public function testNames()
 {
     $file = new File($this->root->url() . '/dir/composer.json');
     $this->assertEquals('composer.json', $file->getFilename());
     $this->assertEquals($this->root->url() . '/dir', $file->getDirname());
     $this->assertEquals($this->root->url() . '/dir/composer.json', $file->getPathname());
     $this->assertEquals($this->root->url() . '/dir/composer.json', '' . $file);
     $this->assertEquals('json', $file->getExtension());
     $dir = new Directory($this->root->url() . '/dir');
     $this->assertEquals($this->root->url() . '/dir', '' . $dir);
     $desc = new FileDescriptor($this->root->url() . '/dir/composer.json');
     $this->assertEquals($this->root->url() . '/dir/composer.json', '' . $desc);
 }