Skip to content

Commit c3be4cd

Browse files
committed
Fixed coding standard error: Each class must be in a file by itself
1 parent 1b6a747 commit c3be4cd

File tree

4 files changed

+67
-50
lines changed

4 files changed

+67
-50
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Framework\App\Test\Unit\Action;
8+
9+
use \Magento\Framework\App\Action\Action;
10+
11+
class ActionFake extends Action
12+
{
13+
/**
14+
* Fake action to check a method call from a parent
15+
*/
16+
public function execute()
17+
{
18+
$this->_forward(
19+
ActionTest::ACTION_NAME,
20+
ActionTest::CONTROLLER_NAME,
21+
ActionTest::MODULE_NAME,
22+
ActionTest::$actionParams
23+
);
24+
$this->_redirect(ActionTest::FULL_ACTION_NAME, ActionTest::$actionParams);
25+
return;
26+
}
27+
}

lib/internal/Magento/Framework/App/Test/Unit/Action/ActionTest.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -183,21 +183,3 @@ public function testDispatchPostDispatch()
183183
$this->assertEquals($this->_responseMock, $this->action->dispatch($this->_requestMock));
184184
}
185185
}
186-
187-
class ActionFake extends Action
188-
{
189-
/**
190-
* Fake action to check a method call from a parent
191-
*/
192-
public function execute()
193-
{
194-
$this->_forward(
195-
ActionTest::ACTION_NAME,
196-
ActionTest::CONTROLLER_NAME,
197-
ActionTest::MODULE_NAME,
198-
ActionTest::$actionParams
199-
);
200-
$this->_redirect(ActionTest::FULL_ACTION_NAME, ActionTest::$actionParams);
201-
return;
202-
}
203-
}

lib/internal/Magento/Framework/Model/Test/Unit/ResourceModel/Db/Collection/AbstractCollectionTest.php

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
namespace Magento\Framework\Model\Test\Unit\ResourceModel\Db\Collection;
88

99
use Magento\Framework\DB\Select;
10-
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
1110
use Magento\Framework\DataObject as MagentoObject;
1211
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
1312
use Magento\Framework\ObjectManagerInterface;
@@ -412,34 +411,3 @@ public function testSave()
412411
$this->assertTrue($this->uut->save() instanceof Uut);
413412
}
414413
}
415-
416-
/**
417-
* Pattern type: Public Morozov
418-
*/
419-
class Uut extends AbstractCollection
420-
{
421-
public function wereFieldsToSelectChanged()
422-
{
423-
return $this->_fieldsToSelectChanged;
424-
}
425-
426-
public function getFieldsToSelect()
427-
{
428-
return $this->_fieldsToSelect;
429-
}
430-
431-
public function setFieldsToSelect(array $fields)
432-
{
433-
$this->_fieldsToSelect = $fields;
434-
}
435-
436-
public function setResource($resource)
437-
{
438-
$this->_resource = $resource;
439-
}
440-
441-
public function getJoinedTables()
442-
{
443-
return $this->_joinedTables;
444-
}
445-
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Framework\Model\Test\Unit\ResourceModel\Db\Collection;
8+
9+
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
10+
11+
/**
12+
* Pattern type: Public Morozov
13+
*/
14+
class Uut extends AbstractCollection
15+
{
16+
public function wereFieldsToSelectChanged()
17+
{
18+
return $this->_fieldsToSelectChanged;
19+
}
20+
21+
public function getFieldsToSelect()
22+
{
23+
return $this->_fieldsToSelect;
24+
}
25+
26+
public function setFieldsToSelect(array $fields)
27+
{
28+
$this->_fieldsToSelect = $fields;
29+
}
30+
31+
public function setResource($resource)
32+
{
33+
$this->_resource = $resource;
34+
}
35+
36+
public function getJoinedTables()
37+
{
38+
return $this->_joinedTables;
39+
}
40+
}

0 commit comments

Comments
 (0)