|
@@ 211-225 (lines=15) @@
|
| 208 |
|
* |
| 209 |
|
* Creates a publish job which is queued for immediately and an unpublish job which is queued for later |
| 210 |
|
*/ |
| 211 |
|
public function testPastEmbargoFutureExpiry() |
| 212 |
|
{ |
| 213 |
|
$page = $this->objFromFixture(SiteTree::class, 'pastEmbargoFutureExpiry'); |
| 214 |
|
|
| 215 |
|
$page = $this->finishWorkflow($page); |
| 216 |
|
|
| 217 |
|
$this->assertNotEquals(0, $page->PublishJobID); |
| 218 |
|
$this->assertNotEquals(0, $page->UnPublishJobID); |
| 219 |
|
|
| 220 |
|
$publish = strtotime($page->PublishJob()->StartAfter); |
| 221 |
|
$unpublish = strtotime($page->UnPublishJob()->StartAfter); |
| 222 |
|
|
| 223 |
|
$this->assertFalse($publish); |
| 224 |
|
$this->assertNotFalse($unpublish); |
| 225 |
|
} |
| 226 |
|
|
| 227 |
|
/** |
| 228 |
|
* Test for embargo and expiry in the future |
|
@@ 232-246 (lines=15) @@
|
| 229 |
|
* |
| 230 |
|
* Creates a publish and unpublish job which are queued for immediately |
| 231 |
|
*/ |
| 232 |
|
public function testFutureEmbargoExpiry() |
| 233 |
|
{ |
| 234 |
|
$page = $this->objFromFixture(SiteTree::class, 'futureEmbargoExpiry'); |
| 235 |
|
|
| 236 |
|
$page = $this->finishWorkflow($page); |
| 237 |
|
|
| 238 |
|
$this->assertNotEquals(0, $page->PublishJobID); |
| 239 |
|
$this->assertNotEquals(0, $page->UnPublishJobID); |
| 240 |
|
|
| 241 |
|
$publish = strtotime($page->PublishJob()->StartAfter); |
| 242 |
|
$unpublish = strtotime($page->UnPublishJob()->StartAfter); |
| 243 |
|
|
| 244 |
|
$this->assertNotFalse($publish); |
| 245 |
|
$this->assertNotFalse($unpublish); |
| 246 |
|
} |
| 247 |
|
|
| 248 |
|
/** |
| 249 |
|
* Test for embargo after expiry in the past |