@@ 35-49 (lines=15) @@ | ||
32 | Config::modify()->set(StaticPagesQueue::class, 'realtime', true); |
|
33 | } |
|
34 | ||
35 | public function testCollectChangesForPublishing() |
|
36 | { |
|
37 | $obj = StaticPublishingTriggerPage::create(); |
|
38 | $obj->collectChanges(array('action' => 'publish')); |
|
39 | ||
40 | $this->assertEquals( |
|
41 | array('/updateOnPublish?_ID=1&_ClassName=StaticallyPublishableTest' => 10), |
|
42 | $obj->getToUpdate() |
|
43 | ); |
|
44 | $this->assertEquals( |
|
45 | array('/deleteOnPublish?_ID=1&_ClassName=StaticallyPublishableTest' => 10), |
|
46 | $obj->getToDelete() |
|
47 | ); |
|
48 | } |
|
49 | ||
50 | public function testCollectChangesForUnpublishing() |
|
51 | { |
|
52 | $obj = StaticPublishingTriggerPage::create(); |
|
@@ 50-64 (lines=15) @@ | ||
47 | ); |
|
48 | } |
|
49 | ||
50 | public function testCollectChangesForUnpublishing() |
|
51 | { |
|
52 | $obj = StaticPublishingTriggerPage::create(); |
|
53 | $obj->collectChanges(array('action' => 'unpublish')); |
|
54 | ||
55 | $this->assertEquals( |
|
56 | array('/updateOnUnpublish?_ID=1&_ClassName=StaticallyPublishableTest' => 10), |
|
57 | $obj->getToUpdate() |
|
58 | ); |
|
59 | $this->assertEquals( |
|
60 | array('/deleteOnUnpublish?_ID=1&_ClassName=StaticallyPublishableTest' => 10), |
|
61 | $obj->getToDelete() |
|
62 | ); |
|
63 | } |
|
64 | ||
65 | public function testFlushChangesToUpdateEnqueuesAndDeletesRegular() |
|
66 | { |
|
67 |