|
@@ 203-219 (lines=17) @@
|
| 200 |
|
); |
| 201 |
|
} |
| 202 |
|
|
| 203 |
|
public function testPurgeURL() |
| 204 |
|
{ |
| 205 |
|
$this->logInWithPermission('ADMIN'); |
| 206 |
|
|
| 207 |
|
$level1 = StaticPublisherTestPage::create(); |
| 208 |
|
$level1->URLSegment = 'to-be-purged'; |
| 209 |
|
$level1->write(); |
| 210 |
|
$level1->publishRecursive(); |
| 211 |
|
|
| 212 |
|
$this->fsp->publishURL('to-be-purged', true); |
| 213 |
|
$this->assertFileExists($this->fsp->getDestPath().'to-be-purged.html'); |
| 214 |
|
$this->assertFileExists($this->fsp->getDestPath().'to-be-purged.php'); |
| 215 |
|
|
| 216 |
|
$this->fsp->purgeURL('to-be-purged'); |
| 217 |
|
$this->assertFileNotExists($this->fsp->getDestPath().'to-be-purged.html'); |
| 218 |
|
$this->assertFileNotExists($this->fsp->getDestPath().'to-be-purged.php'); |
| 219 |
|
} |
| 220 |
|
|
| 221 |
|
public function testPurgeURLAfterSwitchingExtensions() |
| 222 |
|
{ |
|
@@ 221-239 (lines=19) @@
|
| 218 |
|
$this->assertFileNotExists($this->fsp->getDestPath().'to-be-purged.php'); |
| 219 |
|
} |
| 220 |
|
|
| 221 |
|
public function testPurgeURLAfterSwitchingExtensions() |
| 222 |
|
{ |
| 223 |
|
$this->logInWithPermission('ADMIN'); |
| 224 |
|
|
| 225 |
|
$level1 = StaticPublisherTestPage::create(); |
| 226 |
|
$level1->URLSegment = 'purge-me'; |
| 227 |
|
$level1->write(); |
| 228 |
|
$level1->publishRecursive(); |
| 229 |
|
|
| 230 |
|
$this->fsp->publishURL('purge-me', true); |
| 231 |
|
$this->assertFileExists($this->fsp->getDestPath().'purge-me.html'); |
| 232 |
|
$this->assertFileExists($this->fsp->getDestPath().'purge-me.php'); |
| 233 |
|
|
| 234 |
|
$this->fsp->setFileExtension('html'); |
| 235 |
|
|
| 236 |
|
$this->fsp->purgeURL('purge-me'); |
| 237 |
|
$this->assertFileNotExists($this->fsp->getDestPath().'purge-me.html'); |
| 238 |
|
$this->assertFileNotExists($this->fsp->getDestPath().'purge-me.php'); |
| 239 |
|
} |
| 240 |
|
|
| 241 |
|
public function testNoErrorPagesWhenHTMLOnly() |
| 242 |
|
{ |