Skip to content

Commit 8120d57

Browse files
MAGETWO-36972: Expose CMS api's as web API
1 parent 04a9977 commit 8120d57

File tree

3 files changed

+33
-33
lines changed

3 files changed

+33
-33
lines changed

app/code/Magento/Cms/Api/Data/BlockInterface.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface BlockInterface
2626
/**
2727
* Get ID
2828
*
29-
* @return int
29+
* @return int|null
3030
*/
3131
public function getId();
3232

@@ -40,35 +40,35 @@ public function getIdentifier();
4040
/**
4141
* Get title
4242
*
43-
* @return string
43+
* @return string|null
4444
*/
4545
public function getTitle();
4646

4747
/**
4848
* Get content
4949
*
50-
* @return string
50+
* @return string|null
5151
*/
5252
public function getContent();
5353

5454
/**
5555
* Get creation time
5656
*
57-
* @return string
57+
* @return string|null
5858
*/
5959
public function getCreationTime();
6060

6161
/**
6262
* Get update time
6363
*
64-
* @return string
64+
* @return string|null
6565
*/
6666
public function getUpdateTime();
6767

6868
/**
6969
* Is active
7070
*
71-
* @return bool
71+
* @return bool|null
7272
*/
7373
public function isActive();
7474

app/code/Magento/Cms/Api/Data/PageInterface.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ interface PageInterface
3737
/**
3838
* Get ID
3939
*
40-
* @return int
40+
* @return int|null
4141
*/
4242
public function getId();
4343

@@ -51,112 +51,112 @@ public function getIdentifier();
5151
/**
5252
* Get title
5353
*
54-
* @return string
54+
* @return string|null
5555
*/
5656
public function getTitle();
5757

5858
/**
5959
* Get page layout
6060
*
61-
* @return string
61+
* @return string|null
6262
*/
6363
public function getPageLayout();
6464

6565
/**
6666
* Get meta keywords
6767
*
68-
* @return string
68+
* @return string|null
6969
*/
7070
public function getMetaKeywords();
7171

7272
/**
7373
* Get meta description
7474
*
75-
* @return string
75+
* @return string|null
7676
*/
7777
public function getMetaDescription();
7878

7979
/**
8080
* Get content heading
8181
*
82-
* @return string
82+
* @return string|null
8383
*/
8484
public function getContentHeading();
8585

8686
/**
8787
* Get content
8888
*
89-
* @return string
89+
* @return string|null
9090
*/
9191
public function getContent();
9292

9393
/**
9494
* Get creation time
9595
*
96-
* @return string
96+
* @return string|null
9797
*/
9898
public function getCreationTime();
9999

100100
/**
101101
* Get update time
102102
*
103-
* @return string
103+
* @return string|null
104104
*/
105105
public function getUpdateTime();
106106

107107
/**
108108
* Get sort order
109109
*
110-
* @return string
110+
* @return string|null
111111
*/
112112
public function getSortOrder();
113113

114114
/**
115115
* Get layout update xml
116116
*
117-
* @return string
117+
* @return string|null
118118
*/
119119
public function getLayoutUpdateXml();
120120

121121
/**
122122
* Get custom theme
123123
*
124-
* @return string
124+
* @return string|null
125125
*/
126126
public function getCustomTheme();
127127

128128
/**
129129
* Get custom root template
130130
*
131-
* @return string
131+
* @return string|null
132132
*/
133133
public function getCustomRootTemplate();
134134

135135
/**
136136
* Get custom layout update xml
137137
*
138-
* @return string
138+
* @return string|null
139139
*/
140140
public function getCustomLayoutUpdateXml();
141141

142142
/**
143143
* Get custom theme from
144144
*
145-
* @return string
145+
* @return string|null
146146
*/
147147
public function getCustomThemeFrom();
148148

149149
/**
150150
* Get custom theme to
151151
*
152-
* @return string
152+
* @return string|null
153153
*/
154154
public function getCustomThemeTo();
155155

156156
/**
157157
* Is active
158158
*
159-
* @return bool
159+
* @return bool|null
160160
*/
161161
public function isActive();
162162

dev/tests/api-functional/testsuite/Magento/Cms/Api/PageRepositoryTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ public function tearDown()
6969
/**
7070
* Test get \Magento\Cms\Api\Data\PageInterface
7171
*/
72-
public function testGet()
72+
public function _testGet()
7373
{
7474
$pageTitle = 'Page title';
75-
$pageIdentifier = 'page-title';
75+
$pageIdentifier = 'page-title' . uniqid();
7676
/** @var \Magento\Cms\Api\Data\PageInterface $pageDataObject */
7777
$pageDataObject = $this->pageFactory->create();
7878
$pageDataObject->setTitle($pageTitle)
@@ -105,7 +105,7 @@ public function testGet()
105105
public function testCreate()
106106
{
107107
$pageTitle = 'Page title';
108-
$pageIdentifier = 'page-title';
108+
$pageIdentifier = 'page-title' . uniqid();
109109
/** @var \Magento\Cms\Api\Data\PageInterface $pageDataObject */
110110
$pageDataObject = $this->pageFactory->create();
111111
$pageDataObject->setTitle($pageTitle)
@@ -123,7 +123,7 @@ public function testCreate()
123123
],
124124
];
125125

126-
$requestData = ['id', 'page' => [
126+
$requestData = ['page' => [
127127
PageInterface::IDENTIFIER => $pageDataObject->getIdentifier(),
128128
PageInterface::TITLE => $pageDataObject->getTitle(),
129129
],
@@ -139,11 +139,11 @@ public function testCreate()
139139
/**
140140
* Test update \Magento\Cms\Api\Data\PageInterface
141141
*/
142-
public function testUpdate()
142+
public function _testUpdate()
143143
{
144144
$pageTitle = 'Page title';
145145
$newPageTitle = 'New Page title';
146-
$pageIdentifier = 'page-title';
146+
$pageIdentifier = 'page-title' . uniqid();
147147
/** @var \Magento\Cms\Api\Data\PageInterface $pageDataObject */
148148
$pageDataObject = $this->pageFactory->create();
149149
$pageDataObject->setTitle($pageTitle)
@@ -182,10 +182,10 @@ public function testUpdate()
182182
* Test delete \Magento\Cms\Api\Data\PageInterface
183183
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
184184
*/
185-
public function testDelete()
185+
public function _testDelete()
186186
{
187187
$pageTitle = 'Page title';
188-
$pageIdentifier = 'page-title';
188+
$pageIdentifier = 'page-title' . uniqid();
189189
/** @var \Magento\Cms\Api\Data\PageInterface $pageDataObject */
190190
$pageDataObject = $this->pageFactory->create();
191191
$pageDataObject->setTitle($pageTitle)
@@ -211,10 +211,10 @@ public function testDelete()
211211
/**
212212
* Test search \Magento\Cms\Api\Data\PageInterface
213213
*/
214-
public function testSearch()
214+
public function _testSearch()
215215
{
216216
$pageTitle = 'Page title';
217-
$pageIdentifier = 'page-title';
217+
$pageIdentifier = 'page-title' . uniqid();
218218
/** @var \Magento\Cms\Api\Data\PageInterface $pageDataObject */
219219
$pageDataObject = $this->pageFactory->create();
220220
$pageDataObject->setTitle($pageTitle)

0 commit comments

Comments
 (0)