Total Complexity | 3 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class SiteTreePublishingEngineTest extends SapphireTest |
||
11 | { |
||
12 | protected function setUp() |
||
13 | { |
||
14 | parent::setUp(); |
||
15 | |||
16 | Injector::inst()->registerService(@$this->createMock(LoggerInterface::class), LoggerInterface::class); |
||
17 | } |
||
18 | |||
19 | public function testCollectChangesForPublishing() |
||
20 | { |
||
21 | $obj = StaticPublishingTriggerPage::create(); |
||
22 | $obj->collectChanges(['action' => 'publish']); |
||
23 | |||
24 | $this->assertSame( |
||
25 | '/updateOnPublish', |
||
26 | $obj->getToUpdate()->first()->url |
||
27 | ); |
||
28 | $this->assertSame( |
||
29 | '/deleteOnPublish', |
||
30 | $obj->getToDelete()->first()->url |
||
31 | ); |
||
32 | } |
||
33 | |||
34 | public function testCollectChangesForUnpublishing() |
||
46 | ); |
||
47 | } |
||
48 | } |
||
49 |