public function testGetTargetPath() { $config = new ProxyConfig('\\Xpressengine\\Tests\\ProxyConfigTest\\TestTargetClass'); $path = $config->getTargetPath(); $this->assertEquals(__FILE__, $path); }
/** * 주어진 프록시설정에 해당하는 클래스파일이 존재하는지 확인한다. * checkFileTime가 설정돼 있으면 파일시간을 체크하여 판단한다. * * @param ProxyConfig $config 프록시 설정 * * @return bool 클래스파일이 존재할 경우 true를 반환한다. */ public function existProxyFile(ProxyConfig $config) { if ($this->hasProxyFile($config->getProxyName()) === false) { return false; } if ($this->checkFileTime === false) { return true; } $targetPath = $config->getTargetPath(); $proxyPath = $this->getProxyPath($config->getProxyName()); if (filemtime($targetPath) < filemtime($proxyPath)) { return true; } return false; }