@@ -119,7 +119,7 @@ public function testCheckIdentifier()
119
119
120
120
/**
121
121
* @expectedException \Magento\Framework\Exception\LocalizedException
122
- * @expectedExceptionMessage This identifier is reserved for 404 error page in configuration.
122
+ * @expectedExceptionMessage This identifier is reserved for "CMS No Route Page" in configuration.
123
123
*/
124
124
public function testBeforeSave404Identifier ()
125
125
{
@@ -145,7 +145,7 @@ public function testBeforeSave404Identifier()
145
145
146
146
/**
147
147
* @expectedException \Magento\Framework\Exception\LocalizedException
148
- * @expectedExceptionMessage This identifier is reserved for home page in configuration.
148
+ * @expectedExceptionMessage This identifier is reserved for "CMS Home Page" in configuration.
149
149
*/
150
150
public function testBeforeSaveHomeIdentifier ()
151
151
{
@@ -168,4 +168,30 @@ public function testBeforeSaveHomeIdentifier()
168
168
169
169
$ this ->model ->beforeSave ();
170
170
}
171
+
172
+ /**
173
+ * @expectedException \Magento\Framework\Exception\LocalizedException
174
+ * @expectedExceptionMessage This identifier is reserved for "CMS No Cookies Page" in configuration.
175
+ */
176
+ public function testBeforeSaveNoCookiesIdentifier ()
177
+ {
178
+ $ this ->model ->setId (1 );
179
+ $ this ->model ->setOrigData ('identifier ' , 'no-cookies ' );
180
+ $ this ->model ->setIdentifier ('no-cookies2 ' );
181
+
182
+ $ this ->scopeConfigMock ->expects ($ this ->atLeastOnce ())
183
+ ->method ('getValue ' )
184
+ ->willReturnMap (
185
+ [
186
+ [
187
+ \Magento \Cms \Helper \Page::XML_PATH_NO_COOKIES_PAGE ,
188
+ ScopeConfigInterface::SCOPE_TYPE_DEFAULT ,
189
+ null ,
190
+ 'no-cookies '
191
+ ]
192
+ ]
193
+ );
194
+
195
+ $ this ->model ->beforeSave ();
196
+ }
171
197
}
0 commit comments