/** * Search for SugarCRM instance root directory inside supplied path. * * @param string $path * Path to a SugarCRM instance. * * @return SugarInterface * * @api */ public function find($path) { $finder = new Finder(); $finder->setPath($path, true); $rootPath = $finder->getPath(); return $this->getProxy($this->getVersion($rootPath), $rootPath); }
/** * @dataProvider providerSetPath */ public function testSetPath($path, $expectedPath, $lookup = true, $expectedException = null) { if (!empty($expectedException)) { $this->setExpectedException($expectedException); } $sugar = new Finder(); $this->assertEquals($expectedPath, $sugar->setPath($path, $lookup)->getPath()); }