/** * testInPath method * * @return void */ public function testInPath() { $path = dirname(__DIR__); $inside = dirname($path) . DS; $Folder = new Folder($path); $result = $Folder->pwd(); $this->assertEquals($path, $result); $result = Folder::isSlashTerm($inside); $this->assertTrue($result); $result = $Folder->realpath('tests' . DS); $this->assertEquals($path . DS . 'tests' . DS, $result); $result = $Folder->inPath('tests' . DS); $this->assertTrue($result); $result = $Folder->inPath(DS . 'non-existing' . $inside); $this->assertFalse($result); $result = $Folder->inPath($path . DS . 'Model', true); $this->assertTrue($result); }