function testSubdirs() { $root = new Dir("/test/test_dir/"); $subfolder = new Dir("/test/test_dir/content_dir"); $this->assertTrue($root->isAncestorOrSame($subfolder)); $this->assertFalse($subfolder->isAncestorOrSame($root)); $this->assertTrue($root->isAncestorOrSame($root)); $this->assertTrue($subfolder->isAncestorOrSame($subfolder)); }