/** * @Given /^test downloaded files against them as well$/ */ public function testDownloadedFilesAgainstThemAsWell() { // $files = glob($this->downloadedFilesDir . DIRECTORY_SEPARATOR . '*.html'); foreach ($this->testFiles as $row) { $file = $row['source-filename']; $expectedFileSize = filesize($this->unpackedFilesDir . DIRECTORY_SEPARATOR . $file); $testFileSize = filesize($this->testFilesDir . DIRECTORY_SEPARATOR . $file); if ($expectedFileSize != $testFileSize) { echo "File sizes doesn't match for \"{$file}\"! Documentation might not match the tested sample.\n"; } // $actual = $this->parser->processFile($this->testFilesDir . DIRECTORY_SEPARATOR . $file); } $this->package->cleanup(); }
/** * @Given /^Cleanup files when it\'s all done$/ */ public function cleanupFilesWhenItSAllDone() { $this->package->cleanup(); assertFileNotExists($this->pagesDir, 'Directory "' . $this->pagesDir . '" wasn\'t removed.'); }