|
@@ 210-228 (lines=19) @@
|
| 207 |
|
); |
| 208 |
|
} |
| 209 |
|
|
| 210 |
|
public function testPurgeURL() |
| 211 |
|
{ |
| 212 |
|
$this->logInWithPermission('ADMIN'); |
| 213 |
|
|
| 214 |
|
$this->fsp = FilesystemPublisher::create() |
| 215 |
|
->setDestFolder('cache/testing/'); |
| 216 |
|
$level1 = StaticPublisherTestPage::create(); |
| 217 |
|
$level1->URLSegment = 'to-be-purged'; |
| 218 |
|
$level1->write(); |
| 219 |
|
$level1->publishRecursive(); |
| 220 |
|
|
| 221 |
|
$this->fsp->publishURL('to-be-purged', true); |
| 222 |
|
$this->assertFileExists($this->fsp->getDestPath().'to-be-purged.html'); |
| 223 |
|
$this->assertFileExists($this->fsp->getDestPath().'to-be-purged.php'); |
| 224 |
|
|
| 225 |
|
$this->fsp->purgeURL('to-be-purged'); |
| 226 |
|
$this->assertFileNotExists($this->fsp->getDestPath().'to-be-purged.html'); |
| 227 |
|
$this->assertFileNotExists($this->fsp->getDestPath().'to-be-purged.php'); |
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
public function testPurgeURLAfterSwitchingExtensions() |
| 231 |
|
{ |
|
@@ 230-250 (lines=21) @@
|
| 227 |
|
$this->assertFileNotExists($this->fsp->getDestPath().'to-be-purged.php'); |
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
public function testPurgeURLAfterSwitchingExtensions() |
| 231 |
|
{ |
| 232 |
|
$this->logInWithPermission('ADMIN'); |
| 233 |
|
|
| 234 |
|
$this->fsp = FilesystemPublisher::create() |
| 235 |
|
->setDestFolder('cache/testing/'); |
| 236 |
|
$level1 = StaticPublisherTestPage::create(); |
| 237 |
|
$level1->URLSegment = 'purge-me'; |
| 238 |
|
$level1->write(); |
| 239 |
|
$level1->publishRecursive(); |
| 240 |
|
|
| 241 |
|
$this->fsp->publishURL('purge-me', true); |
| 242 |
|
$this->assertFileExists($this->fsp->getDestPath().'purge-me.html'); |
| 243 |
|
$this->assertFileExists($this->fsp->getDestPath().'purge-me.php'); |
| 244 |
|
|
| 245 |
|
$this->fsp->setFileExtension('html'); |
| 246 |
|
|
| 247 |
|
$this->fsp->purgeURL('purge-me'); |
| 248 |
|
$this->assertFileNotExists($this->fsp->getDestPath().'purge-me.html'); |
| 249 |
|
$this->assertFileNotExists($this->fsp->getDestPath().'purge-me.php'); |
| 250 |
|
} |
| 251 |
|
|
| 252 |
|
public function testNoErrorPagesWhenHTMLOnly() |
| 253 |
|
{ |