From 7d5a015a6bcf09f68909c22a803e91d8e97c0368 Mon Sep 17 00:00:00 2001 From: Sviatoslav Mankivskyi <smankivskyi@ebay.com> Date: Mon, 16 Mar 2015 15:52:09 +0200 Subject: [PATCH] MAGETWO-35064: At night (by Kiev time) some tests connected to dates are failed --- .../Test/Unit/Controller/Account/EditPostTest.php | 8 -------- .../framework/Magento/Sniffs/Annotations/Helper.php | 2 ++ .../Design/FileResolution/Fallback/TemplateFileTest.php | 8 -------- .../View/Test/Unit/Template/Html/MinifierTest.php | 5 ----- 4 files changed, 2 insertions(+), 21 deletions(-) diff --git a/app/code/Magento/Customer/Test/Unit/Controller/Account/EditPostTest.php b/app/code/Magento/Customer/Test/Unit/Controller/Account/EditPostTest.php index a180c79c817..fe474d3c814 100644 --- a/app/code/Magento/Customer/Test/Unit/Controller/Account/EditPostTest.php +++ b/app/code/Magento/Customer/Test/Unit/Controller/Account/EditPostTest.php @@ -81,9 +81,6 @@ class EditPostTest extends \PHPUnit_Framework_TestCase */ protected $messageManager; - /** - * @return void - */ public function setUp() { $this->objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); @@ -154,9 +151,6 @@ class EditPostTest extends \PHPUnit_Framework_TestCase ); } - /** - * @return void - */ public function testEditPostActionWithInvalidFormKey() { $this->resultRedirectFactory @@ -177,7 +171,6 @@ class EditPostTest extends \PHPUnit_Framework_TestCase } /** - * @return void * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function testEditPostActionWithAuthenticationExceptionWhenTryingChangePassword() @@ -303,7 +296,6 @@ class EditPostTest extends \PHPUnit_Framework_TestCase } /** - * @return void * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function testEditPostActionWithoutErrors() diff --git a/dev/tests/static/framework/Magento/Sniffs/Annotations/Helper.php b/dev/tests/static/framework/Magento/Sniffs/Annotations/Helper.php index 42abd3ab3f4..e2fb6987724 100644 --- a/dev/tests/static/framework/Magento/Sniffs/Annotations/Helper.php +++ b/dev/tests/static/framework/Magento/Sniffs/Annotations/Helper.php @@ -496,6 +496,8 @@ class Helper // This block of the if should be removed leaving only the phtml condition when dev/tests is swept. // Skip all dev tests files $shouldFilter = true; + } elseif (preg_match('#(?:/|\\\\)Test(?:/|\\\\)Unit(?:/|\\\\)#', $filename)) { + $shouldFilter = true; } elseif (preg_match('/\\.phtml$/', $filename)) { // Skip all phtml files $shouldFilter = true; diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Design/FileResolution/Fallback/TemplateFileTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Design/FileResolution/Fallback/TemplateFileTest.php index 3889c8b0acc..359ea18c0f0 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Design/FileResolution/Fallback/TemplateFileTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Design/FileResolution/Fallback/TemplateFileTest.php @@ -38,9 +38,6 @@ class TemplateFileTest extends \PHPUnit_Framework_TestCase */ protected $assetConfig; - /** - * @return void - */ protected function setUp() { $this->resolver = $this->getMock('Magento\Framework\View\Design\FileResolution\Fallback\ResolverInterface'); @@ -57,7 +54,6 @@ class TemplateFileTest extends \PHPUnit_Framework_TestCase /** * Cover getFile when mode is developer - * @return void */ public function testGetFileWhenStateDeveloper() { @@ -85,7 +81,6 @@ class TemplateFileTest extends \PHPUnit_Framework_TestCase * Cover getFile when mode is default * @param string $mode * @param string $method - * @return void * @dataProvider getMinifiedDataProvider */ public function testGetFileWhenModifiedNeeded($mode, $method) @@ -115,9 +110,6 @@ class TemplateFileTest extends \PHPUnit_Framework_TestCase $this->assertSame($expectedMinified, $actual); } - /** - * @return void - */ public function testGetFileIfMinificationIsDisabled() { $this->assetConfig diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php index 5fa18b10320..a93962b3ae7 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Template/Html/MinifierTest.php @@ -28,8 +28,6 @@ class MinifierTest extends \PHPUnit_Framework_TestCase /** * Initialize testable object - * - * @return void */ public function setUp() { @@ -54,7 +52,6 @@ class MinifierTest extends \PHPUnit_Framework_TestCase /** * Covered method getPathToMinified * @test - * @return void */ public function testGetPathToMinified() { @@ -78,7 +75,6 @@ class MinifierTest extends \PHPUnit_Framework_TestCase /** * Covered method minify and test regular expressions * @test - * @return void */ public function testMinify() { @@ -161,7 +157,6 @@ TEXT; /** * Contain method modify and getPathToModified * @test - * @return void */ public function testGetMinified() { -- GitLab