@@ 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 | ||
51 | public function testCollectChangesForUnpublishing() |
|
52 | { |
|
@@ 51-65 (lines=15) @@ | ||
48 | ||
49 | } |
|
50 | ||
51 | public function testCollectChangesForUnpublishing() |
|
52 | { |
|
53 | $obj = StaticPublishingTriggerPage::create(); |
|
54 | $obj->collectChanges(array('action' => 'unpublish')); |
|
55 | ||
56 | $this->assertEquals( |
|
57 | array('/updateOnUnpublish?_ID=1&_ClassName=StaticallyPublishableTest' => 10), |
|
58 | $obj->getToUpdate() |
|
59 | ); |
|
60 | $this->assertEquals( |
|
61 | array('/deleteOnUnpublish?_ID=1&_ClassName=StaticallyPublishableTest' => 10), |
|
62 | $obj->getToDelete() |
|
63 | ); |
|
64 | ||
65 | } |
|
66 | ||
67 | public function testFlushChangesToUpdateEnqueuesAndDeletesRegular() |
|
68 | { |