| @@ 11-24 (lines=14) @@ | ||
| 8 | class SiteTreePublishingEngineTest extends SapphireTest |
|
| 9 | { |
|
| 10 | ||
| 11 | public function testCollectChangesForPublishing() |
|
| 12 | { |
|
| 13 | $obj = StaticPublishingTriggerPage::create(); |
|
| 14 | $obj->collectChanges(['action' => 'publish']); |
|
| 15 | ||
| 16 | $this->assertEquals( |
|
| 17 | '/updateOnPublish', |
|
| 18 | $obj->getToUpdate()->first()->url |
|
| 19 | ); |
|
| 20 | $this->assertEquals( |
|
| 21 | '/deleteOnPublish', |
|
| 22 | $obj->getToDelete()->first()->url |
|
| 23 | ); |
|
| 24 | } |
|
| 25 | ||
| 26 | public function testCollectChangesForUnpublishing() |
|
| 27 | { |
|
| @@ 26-39 (lines=14) @@ | ||
| 23 | ); |
|
| 24 | } |
|
| 25 | ||
| 26 | public function testCollectChangesForUnpublishing() |
|
| 27 | { |
|
| 28 | $obj = StaticPublishingTriggerPage::create(); |
|
| 29 | $obj->collectChanges(['action' => 'unpublish']); |
|
| 30 | ||
| 31 | $this->assertEquals( |
|
| 32 | '/updateOnUnpublish', |
|
| 33 | $obj->getToUpdate()->first()->url |
|
| 34 | ); |
|
| 35 | $this->assertEquals( |
|
| 36 | '/deleteOnUnpublish', |
|
| 37 | $obj->getToDelete()->first()->url |
|
| 38 | ); |
|
| 39 | } |
|
| 40 | } |
|
| 41 | ||