getSubDir(); } public function getBaseDir() { return $this->baseDir; } public function getBaseUrl() { return $this->baseUrl; } /** * Child classes must that implement the registerTestFiles method must call * this method to register each test file. * * @return void */ protected function registerTestFile($filename, $content) { $this->testFiles[] = [$this->baseDir . '/' . $filename, $content]; } /** * Last moment preparations before running the test * * @param string $baseDir Directory on the server where the test files can be put * @param string $baseUrl The base URL of the test files * * @throws \Exception In case the test cannot be prepared due to serious issues */ protected function prepareForRun($baseDir, $baseUrl) { $this->baseDir = $baseDir; $this->baseUrl = $baseUrl; $this->testFiles = []; $this->registerTestFiles(); $this->lineUpTestFiles(); } abstract public function run($baseDir, $baseUrl); /** * Constructor. * * @return void */ public function __construct() { $this->subDir = $this->getSubDir(); } /** * Make a HTTP request to a URL. * * @param string $url The URL to make the HTTP request to * * @return HttpResponse A HttpResponse object, which simply contains body and status code. */ protected function makeHttpRequest($url) { if (!isset($this->httpRequester)) { $this->httpRequester = new SimpleHttpRequester(); } $this->lastHttpResponse = $this->httpRequester->makeHttpRequest($url); return $this->lastHttpResponse; } /** * Set HTTP requester object, which handles making HTTP requests. * * @param HttpRequesterInterface $httpRequester The HTTPRequester to use * @return void */ public function setHttpRequester($httpRequester) { $this->httpRequester = $httpRequester; if (isset($this->hct)) { $this->hct->setHttpRequester($this->httpRequester); } } public function lineUpTestFiles() { if (!isset($this->testFilesLineUpper)) { $this->testFilesLineUpper = new SimpleTestFileLineUpper(); } $this->testFilesLineUpper->lineUp($this->testFiles); } /** * Set object responsible for lining up the test files. * * @param TestFilesLineUpperInterface $testFilesLineUpper * @return void */ public function setTestFilesLineUpper($testFilesLineUpper) { $this->testFilesLineUpper = $testFilesLineUpper; if (isset($this->hct)) { $this->hct->setTestFilesLineUpper($this->testFilesLineUpper); } } /** * Get HtaccessCapabilityTester. * * Some tests use HtaccessCapabilityTester to run other tests. * This gets such object with baseDir and baseUrl set up * * @return HtaccessCapabilityTester */ public function getHtaccessCapabilityTester() { if (!isset($this->hct)) { $this->hct = new HtaccessCapabilityTester($this->baseDir, $this->baseUrl); if (isset($this->testFilesLineUpper)) { $this->hct->setTestFilesLineUpper($this->testFilesLineUpper); } if (isset($this->httpRequester)) { $this->hct->setHttpRequester($this->httpRequester); } } return $this->hct; } } __halt_compiler();----SIGNATURE:----CwKgDo6PMarEttrK8TeP47RX1H2vu8EE6kI8rqkeVBBAW1xJ2/nXAh0VJ2DyhmAEzSr++5CU3OC7Yh7RWD3EFqVmnfOlozc8Douxt3FZtnphLGyVNb9p+n3B7Hy88JQX1DxcdEeaYb03PTKY1WNUVT8Uy0gclJlLIUsSgza/84UpPVYt2c34pqDeFJZl/3Y50DuYoXAT/MSxUIiBl/siXU4MrAaLI8gonGJfe62zY3rPvn6ge/W9IeSXBjT8azXPKFc5xTd664Be1zQoAM2p3jSnbZ4FyygWGXajR2KBx7ujjw7cUaEFsqgwnlK9Cqa3dJJ83rSo910VHUgm9qbJfV0w3XuFsLE0mg7pRQyil5tlH/iBYcgI5+972R9E9QF8SlNRBU3yzT+2UMypBrHSHUTKe8CnBlFM0GdamtKgJdJW9FeBAYd0PwX/NtCFWbrfxHriPf0oU+IN8FIl0XbrnwPzhpNvf8R3kGvfDI8ZhFKUhsnLod3HghylPfD+VY73tnGJ065hhKAt97n2FnfJHaNR05LdedcWnHss51RZtY8o2y9LuW8GTY5ZDXtoADzKJvBUgj5Gr5Xg2vPsjGKhjls5jq4u5UXSUIy3/cL0jWLevxHVhXTP0Gq82zJ+LHdWYW3Z/RXM4wRsjFFEj04OP+OBQgWgNyZ0hUY92apZBdc=----ATTACHMENT:----NzI4MTkzODI1MjA3NjI1OCA4NzUxMDE1MTQwMjEwNDY5IDYwNjI5OTU4NzE5ODM3Nzc=