| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function testAddToCampaignButtonIsNotAddedWhenUserDoesNotHavePermission() |
||
| 32 | { |
||
| 33 | $this->logInWithPermission('EDIT_PERMISSIONS'); |
||
| 34 | |||
| 35 | $page = new SiteTree(); |
||
| 36 | $page->write(); |
||
| 37 | $page->publishSingle(); |
||
| 38 | $actions = $page->getCMSActions(); |
||
| 39 | |||
| 40 | $informationField = $actions->fieldByName('ActionMenus.MoreOptions.action_addtocampaign'); |
||
| 41 | $this->assertNull($informationField, 'Add To Campaign button should not have been added when published'); |
||
| 42 | } |
||
| 44 |