diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Template/Filter/FactoryTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Template/Filter/FactoryTest.php index 7259e897171ca0d59219d9c2cdd2551b6b90b998..93c3afc25a7fe2e511a8d26b9931a2a39f77a268 100755 --- a/app/code/Magento/Catalog/Test/Unit/Model/Template/Filter/FactoryTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Template/Filter/FactoryTest.php @@ -17,6 +17,9 @@ class FactoryTest extends \PHPUnit_Framework_TestCase */ protected $_factory; + /** + * Setup + */ protected function setUp() { $this->_objectManagerMock = $this->getMock('Magento\Framework\ObjectManagerInterface'); @@ -28,6 +31,9 @@ class FactoryTest extends \PHPUnit_Framework_TestCase ); } + /** + * Test create + */ public function testCreate() { $className = 'Magento\Framework\Filter\Template'; @@ -47,6 +53,9 @@ class FactoryTest extends \PHPUnit_Framework_TestCase $this->assertEquals($filterMock, $this->_factory->create($className)); } + /** + * Test create with arguments + */ public function testCreateWithArguments() { $className = 'Magento\Framework\Filter\Template'; @@ -70,6 +79,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase /** * @expectedException \Magento\Framework\Exception\LocalizedException * @expectedExceptionMessage WrongClass doesn't extend \Magento\Framework\Filter\Template + * @return void */ public function testWrongTypeException() { diff --git a/app/code/Magento/Checkout/Test/Unit/Controller/Onepage/SaveBillingTest.php b/app/code/Magento/Checkout/Test/Unit/Controller/Onepage/SaveBillingTest.php old mode 100644 new mode 100755 index 996d6fe2ad25f5809c2b572bf306479f141e2bfb..790eee760fe609d826a9876f674e0175fba036bf --- a/app/code/Magento/Checkout/Test/Unit/Controller/Onepage/SaveBillingTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Controller/Onepage/SaveBillingTest.php @@ -79,6 +79,9 @@ class SaveBillingTest extends \PHPUnit_Framework_TestCase */ protected $resultJson; + /** + * Setup + */ protected function setUp() { $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); @@ -165,6 +168,9 @@ class SaveBillingTest extends \PHPUnit_Framework_TestCase ); } + /** + * Test execute + */ public function testExecute() { $this->request->expects($this->once()) @@ -181,6 +187,9 @@ class SaveBillingTest extends \PHPUnit_Framework_TestCase $this->assertSame($this->resultRaw, $this->controller->execute()); } + /** + * Test validate minimum amount + */ public function testValidateMinimumAmount() { $expectedResult = [ @@ -253,6 +262,9 @@ class SaveBillingTest extends \PHPUnit_Framework_TestCase $this->assertSame($this->resultJson, $this->controller->execute()); } + /** + * Test validate minimum amount negative + */ public function testValidateMinimumAmountNegative() { $errorMessage = 'error_message'; diff --git a/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Edit/FormTest.php b/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Edit/FormTest.php index 562d395c90e618f42aecfaa5e83f2db10f77747a..731904fba697eff17003df52a01008bdcd9f328c 100755 --- a/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Edit/FormTest.php +++ b/app/code/Magento/Cms/Test/Unit/Block/Adminhtml/Block/Edit/FormTest.php @@ -130,6 +130,10 @@ class FormTest extends \PHPUnit_Framework_TestCase */ protected $block; + /** + * Sets up the fixture, for example, open a network connection. + * This method is called before a test is executed. + */ public function setUp() { $this->model = $this->getMock('Magento\Cms\Model\Block', ['getBlockId', 'setStoreId'], [], '', false); @@ -207,6 +211,9 @@ class FormTest extends \PHPUnit_Framework_TestCase $this->block->setData('action', $this->action); } + /** + * Test prepare form model has no block id and single store mode is on + */ public function testPrepareFormModelHasNoBlockIdAndSingleStoreMode() { $blockId = null; @@ -232,7 +239,9 @@ class FormTest extends \PHPUnit_Framework_TestCase $this->block->toHtml(); } - + /** + * Test prepare form model has block id and signle store mode is off + */ public function testPrepareFormModelHasBlockIdAndNonSingleStoreMode() { $blockId = 'id'; diff --git a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Creditmemo/AddCommentTest.php b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Creditmemo/AddCommentTest.php old mode 100644 new mode 100755 index d4dd0c0c6dc07fbc8de6b6fdb0b13e8cfc24a2c6..3154697b9994f9cb4f802eabf3ece78c4b6355d8 --- a/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Creditmemo/AddCommentTest.php +++ b/app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/Creditmemo/AddCommentTest.php @@ -75,6 +75,9 @@ class AddCommentTest extends \PHPUnit_Framework_TestCase */ protected $resultRawMock; + /** + * Setup + */ public function setUp() { $titleMock = $this->getMockBuilder('Magento\Framework\App\Action\Title') @@ -144,6 +147,9 @@ class AddCommentTest extends \PHPUnit_Framework_TestCase ); } + /** + * Test execute module exception + */ public function testExecuteModelException() { $message = 'Model exception'; @@ -167,6 +173,9 @@ class AddCommentTest extends \PHPUnit_Framework_TestCase ); } + /** + * Test execute exception + */ public function testExecuteException() { $message = 'Cannot add new comment.'; @@ -190,6 +199,9 @@ class AddCommentTest extends \PHPUnit_Framework_TestCase ); } + /** + * Test execute no comment + */ public function testExecuteNoComment() { $message = 'The Comment Text field cannot be empty.'; @@ -214,6 +226,9 @@ class AddCommentTest extends \PHPUnit_Framework_TestCase ); } + /** + * Test execute + */ public function testExecute() { $comment = 'Test comment'; diff --git a/app/code/Magento/Theme/Test/Unit/Model/PageLayout/Config/BuilderTest.php b/app/code/Magento/Theme/Test/Unit/Model/PageLayout/Config/BuilderTest.php old mode 100644 new mode 100755 index 9b7008531a31bc2684b3a306521eb0d0a03e68a8..d81cdb4843b93eeb9c1f96cc834e542483b04f20 --- a/app/code/Magento/Theme/Test/Unit/Model/PageLayout/Config/BuilderTest.php +++ b/app/code/Magento/Theme/Test/Unit/Model/PageLayout/Config/BuilderTest.php @@ -31,6 +31,9 @@ class BuilderTest extends \PHPUnit_Framework_TestCase */ protected $themeCollection; + /** + * Setup + */ protected function setUp() { $this->configFactory = $this->getMockBuilder('Magento\Framework\View\PageLayout\ConfigFactory') @@ -61,6 +64,9 @@ class BuilderTest extends \PHPUnit_Framework_TestCase ); } + /** + * Test get page layouts config + */ public function testGetPageLayoutsConfig() { $files1 = ['content layouts_1.xml', 'content layouts_2.xml']; diff --git a/lib/internal/Magento/Framework/Test/Unit/PhraseTest.php b/lib/internal/Magento/Framework/Test/Unit/PhraseTest.php index 5925acd955f04e9615190ed983426510d8f49c39..4976a670caafe8c40e7321bb5d9d522ba721e792 100755 --- a/lib/internal/Magento/Framework/Test/Unit/PhraseTest.php +++ b/lib/internal/Magento/Framework/Test/Unit/PhraseTest.php @@ -19,6 +19,9 @@ class PhraseTest extends \PHPUnit_Framework_TestCase */ protected $rendererMock; + /** + * Set up + */ protected function setUp() { $this->defaultRenderer = Phrase::getRenderer(); @@ -26,11 +29,17 @@ class PhraseTest extends \PHPUnit_Framework_TestCase ->getMock(); } + /** + * Tear down + */ protected function tearDown() { Phrase::setRenderer($this->defaultRenderer); } + /** + * Test rendering + */ public function testRendering() { $text = 'some text'; @@ -47,6 +56,9 @@ class PhraseTest extends \PHPUnit_Framework_TestCase $this->assertEquals($result, $phrase->render()); } + /** + * Test defers rendering + */ public function testDefersRendering() { $this->rendererMock->expects($this->never()) @@ -55,6 +67,9 @@ class PhraseTest extends \PHPUnit_Framework_TestCase new Phrase('some text'); } + /** + * Test that to string is alias to render + */ public function testThatToStringIsAliasToRender() { $text = 'some text'; @@ -71,6 +86,9 @@ class PhraseTest extends \PHPUnit_Framework_TestCase $this->assertEquals($result, (string)$phrase); } + /** + * Test get text + */ public function testGetText() { $text = 'some text'; @@ -79,6 +97,9 @@ class PhraseTest extends \PHPUnit_Framework_TestCase $this->assertEquals($text, $phrase->getText()); } + /** + * Test get arguments + */ public function testGetArguments() { $text = 'some text';