From c7fe68f4c4882e6fce5c77e595305aaa1476fdf3 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Fri, 30 Jan 2015 18:36:11 +0200 Subject: [PATCH 01/60] MAGETWO-33398: HTML response minification --- .../Tools/View/minifyPhtmlTemplates.php | 22 +++++ .../FileResolution/Fallback/TemplateFile.php | 44 ++++++++++ .../Framework/View/Element/Template.php | 5 ++ .../Framework/View/Template/Html/Minifier.php | 82 +++++++++++++++++++ 4 files changed, 153 insertions(+) create mode 100644 dev/tools/Magento/Tools/View/minifyPhtmlTemplates.php create mode 100644 lib/internal/Magento/Framework/View/Template/Html/Minifier.php diff --git a/dev/tools/Magento/Tools/View/minifyPhtmlTemplates.php b/dev/tools/Magento/Tools/View/minifyPhtmlTemplates.php new file mode 100644 index 0000000000000..40f48a594c848 --- /dev/null +++ b/dev/tools/Magento/Tools/View/minifyPhtmlTemplates.php @@ -0,0 +1,22 @@ +addPsr4( + 'Magento\\', + [realpath(__DIR__ . '/../../../Magento/')] +); + +$templates = (new Magento\Framework\Test\Utility\Files(BP))->getPhpFiles(false, false, true, false); +foreach ($templates as $template) { + $minifier = new \Magento\Framework\View\Template\Html\Minifier( + new Magento\Framework\Filesystem\Driver\File() + ); + $minifier->minify($template); +} diff --git a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFile.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFile.php index 6bcc51f8b8787..b18a55250bae8 100644 --- a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFile.php +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFile.php @@ -5,12 +5,40 @@ */ namespace Magento\Framework\View\Design\FileResolution\Fallback; +use Magento\Framework\App\State; +use Magento\Framework\View\Design\ThemeInterface; +use Magento\Framework\View\Template\Html\Minifier; /** * Provider of template view files */ class TemplateFile extends File { + /** + * @var State + */ + protected $appState; + + /** + * @var Minifier + */ + protected $templateMinifier; + + /** + * @param ResolverInterface $resolver + * @param Minifier $templateMinifier + * @param State $appState + */ + public function __construct( + ResolverInterface $resolver, + Minifier $templateMinifier, + State $appState + ) { + $this->appState = $appState; + $this->templateMinifier = $templateMinifier; + parent::__construct($resolver); + } + /** * @return string */ @@ -18,4 +46,20 @@ protected function getFallbackType() { return \Magento\Framework\View\Design\Fallback\RulePool::TYPE_TEMPLATE_FILE; } + + public function getFile($area, ThemeInterface $themeModel, $file, $module = null) + { + $template = parent::getFile($area, $themeModel, $file, $module); + switch ($this->appState->getMode()) { + case State::MODE_PRODUCTION: + return $this->templateMinifier->getNewFilePath($template); + break; + case State::MODE_DEFAULT: + return $this->templateMinifier->getMinifyFile($template); + break; + case State::MODE_DEVELOPER: + return $template; + break; + } + } } diff --git a/lib/internal/Magento/Framework/View/Element/Template.php b/lib/internal/Magento/Framework/View/Element/Template.php index fef0c88223d34..148c1d69f07a8 100644 --- a/lib/internal/Magento/Framework/View/Element/Template.php +++ b/lib/internal/Magento/Framework/View/Element/Template.php @@ -7,6 +7,7 @@ use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Filesystem; +use Magento\Framework\View\Template\Html\Minifier; /** * Base html block @@ -372,7 +373,11 @@ protected function isTemplateFileValid($fileName) $themesDir = $this->_filesystem->getDirectoryRead(DirectoryList::THEMES)->getAbsolutePath(); $appDir = $this->_filesystem->getDirectoryRead(DirectoryList::APP)->getAbsolutePath(); + $compiledDir = Minifier::getDirectory(); return ($this->isPathInDirectory( + $fileName, + $compiledDir + ) || $this->isPathInDirectory( $fileName, $appDir ) || $this->isPathInDirectory( diff --git a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php new file mode 100644 index 0000000000000..768a8699af858 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php @@ -0,0 +1,82 @@ +fileDriver = $fileDriver; + } + + public static function getDirectory() + { + return BP . DIRECTORY_SEPARATOR + . DirectoryList::VAR_DIR . DIRECTORY_SEPARATOR + . Source::TMP_MATERIALIZATION_DIR + . DIRECTORY_SEPARATOR . self::HTML; + } + + public function getMinifyFile($file) + { + if (!$this->fileDriver->isExists($this->getNewFilePath($file))) { + $this->minify($file); + } + return $this->getNewFilePath($file); + } + + public function getNewFilePath($file) + { + return $this->getDirectory() . $this->getRelativePath($file); + } + + public function getRelativePath($file) + { + return preg_replace('#^' . BP . '#', '', $file); + } + + public function minify($file) + { + $content = preg_replace( + '#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre)\b))*+)(?:<(?>textarea|pre)\b|\z))#', + ' ', + preg_replace( + '#\<\?php\s*\?\>#', + '', + preg_replace( + '#/\*.*?\*/#s', + '', + preg_replace( + '![ \t]*//.*[ \t]*[\r\n]!', + '', + $this->fileDriver->fileGetContents($file) + ) + ) + ) + ); + + if (!$this->fileDriver->isExists(dirname($this->getNewFilePath($file)))) { + $this->fileDriver->createDirectory(dirname($this->getNewFilePath($file)), 0777); + } + $this->fileDriver->filePutContents($this->getNewFilePath($file), $content); + } +} \ No newline at end of file From e660bbf137678f54388a8ae892c43cef6fc59d1e Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Mon, 2 Feb 2015 15:36:21 +0200 Subject: [PATCH 02/60] MAGETWO-33398: HTML response minification --- .../Framework/View/Template/Html/Minifier.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php index 768a8699af858..e968aaa8bde80 100644 --- a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php +++ b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php @@ -57,19 +57,15 @@ public function getRelativePath($file) public function minify($file) { $content = preg_replace( - '#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre)\b))*+)(?:<(?>textarea|pre)\b|\z))#', + '#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre|script)\b))*+)(?:<(?>textarea|pre|script)\b|\z))#', ' ', preg_replace( - '#\<\?php\s*\?\>#', + '#(?)[^\n\r]*#', '', preg_replace( - '#/\*.*?\*/#s', - '', - preg_replace( - '![ \t]*//.*[ \t]*[\r\n]!', - '', - $this->fileDriver->fileGetContents($file) - ) + '#//[^\n\r]*(\s\?\>)#', + '$1', + $this->fileDriver->fileGetContents($file) ) ) ); From a1d48c7cb6de0e7d859404f9a4a277a31f8a2452 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Tue, 3 Feb 2015 18:12:06 +0200 Subject: [PATCH 03/60] MAGETWO-33398: HTML response minification --- app/etc/di.xml | 1 + .../Tools/View/minifyPhtmlTemplates.php | 10 +-- .../App/Filesystem/DirectoryList.php | 9 +++ lib/internal/Magento/Framework/Filesystem.php | 2 - .../Magento/Framework/Less/FileGenerator.php | 2 +- .../Magento/Framework/View/Asset/Source.php | 7 +- .../FileResolution/Fallback/TemplateFile.php | 22 ++++-- .../Framework/View/Element/Template.php | 3 +- .../Framework/View/Template/Html/Minifier.php | 69 ++++++++++--------- .../View/Template/Html/MinifierInterface.php | 33 +++++++++ 10 files changed, 106 insertions(+), 52 deletions(-) create mode 100644 lib/internal/Magento/Framework/View/Template/Html/MinifierInterface.php diff --git a/app/etc/di.xml b/app/etc/di.xml index 16a596733f025..c7e8b69ac9466 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -7,6 +7,7 @@ --> + diff --git a/dev/tools/Magento/Tools/View/minifyPhtmlTemplates.php b/dev/tools/Magento/Tools/View/minifyPhtmlTemplates.php index 40f48a594c848..3b9f1c2c15f2e 100644 --- a/dev/tools/Magento/Tools/View/minifyPhtmlTemplates.php +++ b/dev/tools/Magento/Tools/View/minifyPhtmlTemplates.php @@ -13,10 +13,12 @@ [realpath(__DIR__ . '/../../../Magento/')] ); +$omFactory = \Magento\Framework\App\Bootstrap::createObjectManagerFactory(BP, []); +$objectManager = $omFactory->create( + [\Magento\Framework\App\State::PARAM_MODE => \Magento\Framework\App\State::MODE_DEFAULT] +); + $templates = (new Magento\Framework\Test\Utility\Files(BP))->getPhpFiles(false, false, true, false); foreach ($templates as $template) { - $minifier = new \Magento\Framework\View\Template\Html\Minifier( - new Magento\Framework\Filesystem\Driver\File() - ); - $minifier->minify($template); + $objectManager->get('Magento\Framework\View\Template\Html\MinifierInterface')->minify($template); } diff --git a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php index 90e724d4823e7..b73959ca803be 100644 --- a/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php +++ b/lib/internal/Magento/Framework/App/Filesystem/DirectoryList.php @@ -105,6 +105,13 @@ class DirectoryList extends \Magento\Framework\Filesystem\DirectoryList */ const UPLOAD = 'upload'; + /** + * A suffix for temporary materialization directory where pre-processed files will be written (if necessary) + */ + const TMP_MATERIALIZATION_DIR = 'view_preprocessed'; + + const TEMPLATE_MINIFICATION_DIR = 'html'; + /** * {@inheritdoc} */ @@ -130,6 +137,8 @@ public static function getDefaultConfig() self::TMP => [parent::PATH => 'var/tmp'], self::THEMES => [parent::PATH => 'app/design'], self::UPLOAD => [parent::PATH => 'pub/media/upload', parent::URL_PATH => 'pub/media/upload'], + self::TMP_MATERIALIZATION_DIR => [parent::PATH => 'var/view_preprocessed'], + self::TEMPLATE_MINIFICATION_DIR => [parent::PATH => 'var/view_preprocessed/html'], ]; return parent::getDefaultConfig() + $result; } diff --git a/lib/internal/Magento/Framework/Filesystem.php b/lib/internal/Magento/Framework/Filesystem.php index e55ea9d8b2dfa..08cf8a932291b 100644 --- a/lib/internal/Magento/Framework/Filesystem.php +++ b/lib/internal/Magento/Framework/Filesystem.php @@ -7,8 +7,6 @@ */ namespace Magento\Framework; -use Magento\Framework\Filesystem\File\ReadInterface; - class Filesystem { /** diff --git a/lib/internal/Magento/Framework/Less/FileGenerator.php b/lib/internal/Magento/Framework/Less/FileGenerator.php index 0dd723e49d5a5..a72f6dea6cb70 100644 --- a/lib/internal/Magento/Framework/Less/FileGenerator.php +++ b/lib/internal/Magento/Framework/Less/FileGenerator.php @@ -65,7 +65,7 @@ public function __construct( \Magento\Framework\Less\PreProcessor\Instruction\Import $importProcessor ) { $this->tmpDirectory = $filesystem->getDirectoryWrite(DirectoryList::VAR_DIR); - $this->lessDirectory = Source::TMP_MATERIALIZATION_DIR . '/' . self::TMP_LESS_DIR; + $this->lessDirectory = DirectoryList::TMP_MATERIALIZATION_DIR . '/' . self::TMP_LESS_DIR; $this->assetRepo = $assetRepo; $this->magentoImportProcessor = $magentoImportProcessor; $this->importProcessor = $importProcessor; diff --git a/lib/internal/Magento/Framework/View/Asset/Source.php b/lib/internal/Magento/Framework/View/Asset/Source.php index 1529bdd12e18b..e73efbf45434a 100644 --- a/lib/internal/Magento/Framework/View/Asset/Source.php +++ b/lib/internal/Magento/Framework/View/Asset/Source.php @@ -16,11 +16,6 @@ */ class Source { - /** - * A suffix for temporary materialization directory where pre-processed files will be written (if necessary) - */ - const TMP_MATERIALIZATION_DIR = 'view_preprocessed'; - /** * @var \Magento\Framework\Filesystem */ @@ -149,7 +144,7 @@ private function preProcess(LocalInterface $asset) $chain->assertValid(); if ($chain->isChanged()) { $dirCode = DirectoryList::VAR_DIR; - $path = self::TMP_MATERIALIZATION_DIR . '/source/' . $asset->getPath(); + $path = DirectoryList::TMP_MATERIALIZATION_DIR . '/source/' . $asset->getPath(); $this->varDir->writeFile($path, $chain->getContent()); } $result = [$dirCode, $path]; diff --git a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFile.php b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFile.php index b18a55250bae8..656a021c8039d 100644 --- a/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFile.php +++ b/lib/internal/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFile.php @@ -5,9 +5,10 @@ */ namespace Magento\Framework\View\Design\FileResolution\Fallback; + use Magento\Framework\App\State; use Magento\Framework\View\Design\ThemeInterface; -use Magento\Framework\View\Template\Html\Minifier; +use Magento\Framework\View\Template\Html\MinifierInterface; /** * Provider of template view files @@ -20,18 +21,18 @@ class TemplateFile extends File protected $appState; /** - * @var Minifier + * @var MinifierInterface */ protected $templateMinifier; /** * @param ResolverInterface $resolver - * @param Minifier $templateMinifier + * @param MinifierInterface $templateMinifier * @param State $appState */ public function __construct( ResolverInterface $resolver, - Minifier $templateMinifier, + MinifierInterface $templateMinifier, State $appState ) { $this->appState = $appState; @@ -47,15 +48,24 @@ protected function getFallbackType() return \Magento\Framework\View\Design\Fallback\RulePool::TYPE_TEMPLATE_FILE; } + /** + * Get existing file name, using fallback mechanism + * + * @param string $area + * @param ThemeInterface $themeModel + * @param string $file + * @param string|null $module + * @return string|false + */ public function getFile($area, ThemeInterface $themeModel, $file, $module = null) { $template = parent::getFile($area, $themeModel, $file, $module); switch ($this->appState->getMode()) { case State::MODE_PRODUCTION: - return $this->templateMinifier->getNewFilePath($template); + return $this->templateMinifier->getPathToMinified($template); break; case State::MODE_DEFAULT: - return $this->templateMinifier->getMinifyFile($template); + return $this->templateMinifier->getMinified($template); break; case State::MODE_DEVELOPER: return $template; diff --git a/lib/internal/Magento/Framework/View/Element/Template.php b/lib/internal/Magento/Framework/View/Element/Template.php index 148c1d69f07a8..ea7a571a74640 100644 --- a/lib/internal/Magento/Framework/View/Element/Template.php +++ b/lib/internal/Magento/Framework/View/Element/Template.php @@ -373,7 +373,8 @@ protected function isTemplateFileValid($fileName) $themesDir = $this->_filesystem->getDirectoryRead(DirectoryList::THEMES)->getAbsolutePath(); $appDir = $this->_filesystem->getDirectoryRead(DirectoryList::APP)->getAbsolutePath(); - $compiledDir = Minifier::getDirectory(); + $compiledDir = $this->_filesystem->getDirectoryRead(DirectoryList::TEMPLATE_MINIFICATION_DIR) + ->getAbsolutePath(); return ($this->isPathInDirectory( $fileName, $compiledDir diff --git a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php index e968aaa8bde80..8f355a6c20f62 100644 --- a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php +++ b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php @@ -7,55 +7,60 @@ namespace Magento\Framework\View\Template\Html; use Magento\Framework\App\Filesystem\DirectoryList; -use Magento\Framework\Filesystem\Driver\File; -use Magento\Framework\View\Asset\Source; +use Magento\Framework\Filesystem; -class Minifier +class Minifier implements MinifierInterface { - const HTML = 'html'; - /** - * @var File + * @var Filesystem */ - protected $fileDriver; + protected $filesystem; /** - * @param File $fileDriver + * @param Filesystem $filesystem */ public function __construct( - File $fileDriver + Filesystem $filesystem ) { - $this->fileDriver = $fileDriver; - } - - public static function getDirectory() - { - return BP . DIRECTORY_SEPARATOR - . DirectoryList::VAR_DIR . DIRECTORY_SEPARATOR - . Source::TMP_MATERIALIZATION_DIR - . DIRECTORY_SEPARATOR . self::HTML; + $this->rootDirectory = $filesystem->getDirectoryRead(DirectoryList::APP); + $this->htmlDirectory = $filesystem->getDirectoryWrite(DirectoryList::TEMPLATE_MINIFICATION_DIR); } - public function getMinifyFile($file) + /** + * Return path to minified template file, or minify if file not exist + * + * @param string $file + * @return string + */ + public function getMinified($file) { - if (!$this->fileDriver->isExists($this->getNewFilePath($file))) { + if (!$this->htmlDirectory->isExist($this->rootDirectory->getRelativePath($file))) { $this->minify($file); } - return $this->getNewFilePath($file); - } - - public function getNewFilePath($file) - { - return $this->getDirectory() . $this->getRelativePath($file); + return $this->getPathToMinified($file); } - public function getRelativePath($file) + /** + * Return path to minified template file + * + * @param string $file + * @return string + */ + public function getPathToMinified($file) { - return preg_replace('#^' . BP . '#', '', $file); + return $this->htmlDirectory->getAbsolutePath( + $this->rootDirectory->getRelativePath($file) + ); } + /** + * Minify template file + * + * @param string $file + */ public function minify($file) { + $file = $this->rootDirectory->getRelativePath($file); $content = preg_replace( '#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre|script)\b))*+)(?:<(?>textarea|pre|script)\b|\z))#', ' ', @@ -65,14 +70,14 @@ public function minify($file) preg_replace( '#//[^\n\r]*(\s\?\>)#', '$1', - $this->fileDriver->fileGetContents($file) + $this->rootDirectory->readFile($file) ) ) ); - if (!$this->fileDriver->isExists(dirname($this->getNewFilePath($file)))) { - $this->fileDriver->createDirectory(dirname($this->getNewFilePath($file)), 0777); + if (!$this->htmlDirectory->isExist()) { + $this->htmlDirectory->create(); } - $this->fileDriver->filePutContents($this->getNewFilePath($file), $content); + $this->htmlDirectory->writeFile($file, $content); } } \ No newline at end of file diff --git a/lib/internal/Magento/Framework/View/Template/Html/MinifierInterface.php b/lib/internal/Magento/Framework/View/Template/Html/MinifierInterface.php new file mode 100644 index 0000000000000..092b41097bf51 --- /dev/null +++ b/lib/internal/Magento/Framework/View/Template/Html/MinifierInterface.php @@ -0,0 +1,33 @@ + Date: Tue, 3 Feb 2015 19:17:57 +0200 Subject: [PATCH 04/60] MAGETWO-33398: HTML response minification --- .../View/Template/Html/MinifierTest.php | 171 ++++++++++++++++++ .../Framework/View/Template/Html/Minifier.php | 12 +- 2 files changed, 177 insertions(+), 6 deletions(-) create mode 100644 dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php new file mode 100644 index 0000000000000..caed9b1088e0a --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php @@ -0,0 +1,171 @@ +htmlDirectory = $this->getMockBuilder('Magento\Framework\Filesystem\Directory\WriteInterface') + ->getMock(); + $this->appDirectory = $this->getMockBuilder('Magento\Framework\Filesystem\Directory\ReadInterface')->getMock(); + $filesystem = $this->getMockBuilder('Magento\Framework\Filesystem')->disableOriginalConstructor()->getMock(); + + $filesystem->expects($this->once()) + ->method('getDirectoryRead') + ->with(DirectoryList::APP) + ->willReturn($this->appDirectory); + $filesystem->expects($this->once()) + ->method('getDirectoryWrite') + ->with(DirectoryList::TEMPLATE_MINIFICATION_DIR) + ->willReturn($this->htmlDirectory); + /** @var \Magento\Framework\Filesystem $filesystem */ + + $this->object = new Minifier($filesystem); + } + + /** + * Covered method getPathToMinified + * @test + */ + public function testGetPathToMinified() + { + $file = '/absolute/path/to/phtml/template/file'; + $relativePath = 'relative/path/to/phtml/template/file'; + $absolutePath = '/full/path/to/compiled/html/file'; + + $this->appDirectory->expects($this->once()) + ->method('getRelativePath') + ->with($file) + ->willReturn($relativePath); + $this->htmlDirectory->expects($this->once()) + ->method('getAbsolutePath') + ->with($relativePath) + ->willReturn($absolutePath); + + $this->assertEquals($absolutePath, $this->object->getPathToMinified($file)); + } + + /** + * Covered method minify and test regular expressions + * @test + */ + public function testMinify() + { + $file = '/absolute/path/to/phtml/template/file'; + $relativePath = 'relative/path/to/phtml/template/file'; + $baseContent = << + + + + Test title + + + Text Link + some text + someMethod(); ?> +
+ + + +TEXT; + $expectedContent = << Test title Text Link some text someMethod(); ?>
+TEXT; + + $this->appDirectory->expects($this->once()) + ->method('getRelativePath') + ->with($file) + ->willReturn($relativePath); + $this->appDirectory->expects($this->once()) + ->method('readFile') + ->with($relativePath) + ->willReturn($baseContent); + + $this->htmlDirectory->expects($this->once()) + ->method('isExist') + ->willReturn(false); + $this->htmlDirectory->expects($this->once()) + ->method('create'); + $this->htmlDirectory->expects($this->once()) + ->method('writeFile') + ->with($relativePath, $expectedContent); + + $this->object->minify($file); + } + + /** + * Contain method modify and getPathToModified + * @test + */ + public function testGetMinified() + { + $file = '/absolute/path/to/phtml/template/file'; + $relativePath = 'relative/path/to/phtml/template/file'; + + $this->appDirectory->expects($this->at(0)) + ->method('getRelativePath') + ->with($file) + ->willReturn($relativePath); + $this->htmlDirectory->expects($this->at(0)) + ->method('isExist') + ->with($relativePath) + ->willReturn(false); + + $this->object->getMinified($file); + } +} diff --git a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php index 8f355a6c20f62..91da508e7a997 100644 --- a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php +++ b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php @@ -22,7 +22,7 @@ class Minifier implements MinifierInterface public function __construct( Filesystem $filesystem ) { - $this->rootDirectory = $filesystem->getDirectoryRead(DirectoryList::APP); + $this->appDirectory = $filesystem->getDirectoryRead(DirectoryList::APP); $this->htmlDirectory = $filesystem->getDirectoryWrite(DirectoryList::TEMPLATE_MINIFICATION_DIR); } @@ -34,7 +34,7 @@ public function __construct( */ public function getMinified($file) { - if (!$this->htmlDirectory->isExist($this->rootDirectory->getRelativePath($file))) { + if (!$this->htmlDirectory->isExist($this->appDirectory->getRelativePath($file))) { $this->minify($file); } return $this->getPathToMinified($file); @@ -49,7 +49,7 @@ public function getMinified($file) public function getPathToMinified($file) { return $this->htmlDirectory->getAbsolutePath( - $this->rootDirectory->getRelativePath($file) + $this->appDirectory->getRelativePath($file) ); } @@ -60,7 +60,7 @@ public function getPathToMinified($file) */ public function minify($file) { - $file = $this->rootDirectory->getRelativePath($file); + $file = $this->appDirectory->getRelativePath($file); $content = preg_replace( '#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre|script)\b))*+)(?:<(?>textarea|pre|script)\b|\z))#', ' ', @@ -70,7 +70,7 @@ public function minify($file) preg_replace( '#//[^\n\r]*(\s\?\>)#', '$1', - $this->rootDirectory->readFile($file) + $this->appDirectory->readFile($file) ) ) ); @@ -80,4 +80,4 @@ public function minify($file) } $this->htmlDirectory->writeFile($file, $content); } -} \ No newline at end of file +} From 3b298214a820bfbdaf1bab639c61e7efedbeaabb Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Tue, 3 Feb 2015 19:59:20 +0200 Subject: [PATCH 05/60] MAGETWO-33398: HTML response minification --- .../testsuite/Magento/Framework/View/Element/TemplateTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php index 3a3fd0e8709e7..bbdc37241c132 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Element/TemplateTest.php @@ -53,6 +53,7 @@ protected function setUp() [\Magento\Framework\App\Filesystem\DirectoryList::THEMES, $themesDirMock], [\Magento\Framework\App\Filesystem\DirectoryList::APP, $appDirMock], [\Magento\Framework\App\Filesystem\DirectoryList::ROOT, $this->rootDirMock], + [\Magento\Framework\App\Filesystem\DirectoryList::TEMPLATE_MINIFICATION_DIR, $this->rootDirMock], ])); $this->_templateEngine = $this->getMock( From 6ce86e5aacbfdb53aa63ed6a19fd71310086d2b2 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Tue, 3 Feb 2015 20:12:44 +0200 Subject: [PATCH 06/60] MAGETWO-33398: HTML response minification --- .../Magento/Framework/View/Template/Html/Minifier.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php index 91da508e7a997..984430d9286c7 100644 --- a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php +++ b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php @@ -61,7 +61,7 @@ public function getPathToMinified($file) public function minify($file) { $file = $this->appDirectory->getRelativePath($file); - $content = preg_replace( + $content = preg_replace('#\> \<#', '><', preg_replace( '#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre|script)\b))*+)(?:<(?>textarea|pre|script)\b|\z))#', ' ', preg_replace( @@ -72,7 +72,7 @@ public function minify($file) '$1', $this->appDirectory->readFile($file) ) - ) + )) ); if (!$this->htmlDirectory->isExist()) { From 45c37ed351b853cb1fc1ceb81a3fed172c7943b4 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Tue, 3 Feb 2015 20:47:44 +0200 Subject: [PATCH 07/60] MAGETWO-33398: HTML response minification --- .../Fallback/TemplateFileTest.php | 64 ++++++++++++++++++- .../View/Template/Html/MinifierTest.php | 6 +- 2 files changed, 65 insertions(+), 5 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFileTest.php index 745317b74ffec..3270b01b82152 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFileTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/FileResolution/Fallback/TemplateFileTest.php @@ -6,6 +6,7 @@ namespace Magento\Framework\View\Design\FileResolution\Fallback; +use Magento\Framework\App\State; use Magento\Framework\View\Design\Fallback\RulePool; class TemplateFileTest extends \PHPUnit_Framework_TestCase @@ -15,6 +16,16 @@ class TemplateFileTest extends \PHPUnit_Framework_TestCase */ protected $resolver; + /** + * @var \Magento\Framework\View\Template\Html\MinifierInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $minifier; + + /** + * @var \Magento\Framework\App\State|\PHPUnit_Framework_MockObject_MockObject + */ + protected $state; + /** * @var TemplateFile */ @@ -23,18 +34,67 @@ class TemplateFileTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->resolver = $this->getMock('Magento\Framework\View\Design\FileResolution\Fallback\ResolverInterface'); - $this->object = new TemplateFile($this->resolver); + $this->minifier = $this->getMock('Magento\Framework\View\Template\Html\MinifierInterface'); + $this->state = $this->getMockBuilder('Magento\Framework\App\State')->disableOriginalConstructor()->getMock(); + $this->object = new TemplateFile($this->resolver, $this->minifier, $this->state); } - public function testGetFile() + /** + * Cover getFile when mode is developer + */ + public function testGetFileWhenStateDeveloper() { $theme = $this->getMockForAbstractClass('\Magento\Framework\View\Design\ThemeInterface'); $expected = 'some/file.ext'; + + $this->state->expects($this->once()) + ->method('getMode') + ->willReturn(State::MODE_DEVELOPER); $this->resolver->expects($this->once()) ->method('resolve') ->with(RulePool::TYPE_TEMPLATE_FILE, 'file.ext', 'frontend', $theme, null, 'Magento_Module') ->will($this->returnValue($expected)); + $actual = $this->object->getFile('frontend', $theme, 'file.ext', 'Magento_Module'); $this->assertSame($expected, $actual); } + + /** + * Cover getFile when mode is default + * @dataProvider getMinifiedDataProvider + */ + public function testGetFileWhenModifiedNeeded($mode, $method) + { + $theme = $this->getMockForAbstractClass('\Magento\Framework\View\Design\ThemeInterface'); + $expected = 'some/file.ext'; + $expectedMinified = '/path/to/minified/some/file.ext'; + + $this->state->expects($this->once()) + ->method('getMode') + ->willReturn($mode); + $this->resolver->expects($this->once()) + ->method('resolve') + ->with(RulePool::TYPE_TEMPLATE_FILE, 'file.ext', 'frontend', $theme, null, 'Magento_Module') + ->will($this->returnValue($expected)); + $this->minifier->expects($this->once()) + ->method($method) + ->with($expected) + ->willReturn($expectedMinified); + + $actual = $this->object->getFile('frontend', $theme, 'file.ext', 'Magento_Module'); + $this->assertSame($expectedMinified, $actual); + } + + /** + * Contain different methods by mode for HTML minification + * + * @return array + */ + public function getMinifiedDataProvider() + { + return [ + 'default' => [State::MODE_DEFAULT, 'getMinified'], + 'production' => [State::MODE_PRODUCTION, 'getPathToMinified'], + ]; + } } diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php index caed9b1088e0a..39bbd3144d86f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php @@ -91,7 +91,7 @@ public function testMinify() Test title - Text Link + Text Link some text someMethod(); ?>
@@ -112,7 +112,7 @@ public function testMinify() TEXT; $expectedContent = << Test title Text Link some text someMethod(); ?>
+ TEXT; $this->appDirectory->expects($this->once()) From 81f0fd488dc2fe51f0b8bb19e2cef117f38c9c53 Mon Sep 17 00:00:00 2001 From: Sviatoslav Mankivskyi Date: Wed, 4 Feb 2015 13:32:02 +0200 Subject: [PATCH 08/60] MAGETWO-33068: [Dev] Layout Processing Improvement --- app/code/Magento/Core/Model/Layout/Merge.php | 40 ++++++++++++------- app/etc/di.xml | 1 + .../Magento/Framework/View/Layout.php | 31 +++++++++++--- .../View/Layout/ProcessorInterface.php | 7 ++++ .../Framework/View/Layout/Reader/Context.php | 18 +++++++++ 5 files changed, 76 insertions(+), 21 deletions(-) diff --git a/app/code/Magento/Core/Model/Layout/Merge.php b/app/code/Magento/Core/Model/Layout/Merge.php index c9e81ae0953be..daec0efd8c1b2 100644 --- a/app/code/Magento/Core/Model/Layout/Merge.php +++ b/app/code/Magento/Core/Model/Layout/Merge.php @@ -136,25 +136,25 @@ class Merge implements \Magento\Framework\View\Layout\ProcessorInterface protected $cacheSuffix; /** - * Status for new added handle + * All processed handles used in this update * - * @var int + * @var array */ - protected $handleAdded = 1; + protected $allHandles = []; /** * Status for handle being processed * * @var int */ - protected $handleProcessing = 2; + protected $handleProcessing = 1; /** * Status for processed handle * * @var int */ - protected $handleProcessed = 3; + protected $handleProcessed = 2; /** * Init merge model @@ -242,10 +242,10 @@ public function addHandle($handleName) { if (is_array($handleName)) { foreach ($handleName as $name) { - $this->_handles[$name] = $this->handleAdded; + $this->_handles[$name] = 1; } } else { - $this->_handles[$handleName] = $this->handleAdded; + $this->_handles[$handleName] = 1; } return $this; } @@ -426,7 +426,7 @@ public function load($handles = []) $this->addHandle($handles); - $cacheId = $this->_getCacheId(md5(implode('|', $this->getHandles()))); + $cacheId = $this->getCacheId(); $cacheIdPageLayout = $cacheId . '_' . self::PAGE_LAYOUT_CACHE_SUFFIX; $result = $this->_loadCache($cacheId); if ($result) { @@ -501,12 +501,12 @@ protected function _loadXmlString($xmlString) */ protected function _merge($handle) { - if (!isset($this->_handles[$handle]) || $this->_handles[$handle] == $this->handleAdded) { - $this->_handles[$handle] = $this->handleProcessing; + if (!isset($this->allHandles[$handle])) { + $this->allHandles[$handle] = $this->handleProcessing; $this->_fetchPackageLayoutUpdates($handle); $this->_fetchDbLayoutUpdates($handle); - $this->_handles[$handle] = $this->handleProcessed; - } elseif ($this->_handles[$handle] == $this->handleProcessing + $this->allHandles[$handle] = $this->handleProcessed; + } elseif ($this->allHandles[$handle] == $this->handleProcessing && $this->_appState->getMode() === \Magento\Framework\App\State::MODE_DEVELOPER ) { $this->_logger->info('Cyclic dependency in merged layout for handle: ' . $handle); @@ -623,7 +623,7 @@ public function getFileLayoutUpdatesXml() if ($this->_layoutUpdatesCache) { return $this->_layoutUpdatesCache; } - $cacheId = $this->_getCacheId($this->cacheSuffix); + $cacheId = $this->generateCacheId($this->cacheSuffix); $result = $this->_loadCache($cacheId); if ($result) { $result = $this->_loadXmlString($result); @@ -636,12 +636,12 @@ public function getFileLayoutUpdatesXml() } /** - * Retrieve cache identifier taking into account current area/package/theme/store + * Generate cache identifier taking into account current area/package/theme/store * * @param string $suffix * @return string */ - protected function _getCacheId($suffix = '') + protected function generateCacheId($suffix = '') { return "LAYOUT_{$this->_theme->getArea()}_STORE{$this->_store->getId()}_{$this->_theme->getId()}{$suffix}"; } @@ -827,4 +827,14 @@ public function isPageLayoutDesignAbstraction(array $abstraction) } return $abstraction['design_abstraction'] === self::DESIGN_ABSTRACTION_PAGE_LAYOUT; } + + /** + * Return cache ID based current area/package/theme/store and handles + * + * @return string + */ + public function getCacheId() + { + return $this->generateCacheId(md5(implode('|', $this->getHandles()))); + } } diff --git a/app/etc/di.xml b/app/etc/di.xml index af058c9dc4aaf..b0d77b6ff7369 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -381,6 +381,7 @@ commonRenderPool + Magento\Framework\App\Cache\Type\Layout diff --git a/lib/internal/Magento/Framework/View/Layout.php b/lib/internal/Magento/Framework/View/Layout.php index 63fd1a9b79dc1..bc55e2a280b5c 100644 --- a/lib/internal/Magento/Framework/View/Layout.php +++ b/lib/internal/Magento/Framework/View/Layout.php @@ -136,8 +136,11 @@ class Layout extends \Magento\Framework\Simplexml\Config implements \Magento\Fra protected $builder; /** - * Constructor - * + * @var \Magento\Framework\Cache\FrontendInterface + */ + protected $cache; + + /** * @param Layout\ProcessorFactory $processorFactory * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param Layout\Data\Structure $structure @@ -147,6 +150,7 @@ class Layout extends \Magento\Framework\Simplexml\Config implements \Magento\Fra * @param Page\Config\Structure $pageConfigStructure * @param Layout\ReaderPool $readerPool * @param Layout\GeneratorPool $generatorPool + * @param \Magento\Framework\Cache\FrontendInterface $cache * @param bool $cacheable */ public function __construct( @@ -159,6 +163,7 @@ public function __construct( Page\Config\Structure $pageConfigStructure, Layout\ReaderPool $readerPool, Layout\GeneratorPool $generatorPool, + \Magento\Framework\Cache\FrontendInterface $cache, $cacheable = true ) { $this->_elementClass = 'Magento\Framework\View\Layout\Element'; @@ -175,6 +180,7 @@ public function __construct( $this->readerPool = $readerPool; $this->generatorPool = $generatorPool; $this->cacheable = $cacheable; + $this->cache = $cache; $this->readerContext = new Layout\Reader\Context($this->scheduledStructure, $this->pageConfigStructure); $this->generatorContext = new Layout\Generator\Context($this->structure, $this); @@ -283,11 +289,24 @@ public function getReaderContext() public function generateElements() { \Magento\Framework\Profiler::start(__CLASS__ . '::' . __METHOD__); - \Magento\Framework\Profiler::start('build_structure'); - $this->readerPool->interpret($this->readerContext, $this->getNode()); - \Magento\Framework\Profiler::stop('build_structure'); - \Magento\Framework\Profiler::start('generate_elements'); + $cacheId = 'structure_' . $this->getUpdate()->getCacheId(); + $result = $this->cache->load($cacheId); + if ($result) { + $structures = unserialize($result); + $this->readerContext->setScheduledStructure($structures[0]); + $this->readerContext->setPageConfigStructure($structures[1]); + } else { + \Magento\Framework\Profiler::start('build_structure'); + $this->readerPool->interpret($this->readerContext, $this->getNode()); + \Magento\Framework\Profiler::stop('build_structure'); + $structures = [ + $this->readerContext->getScheduledStructure(), + $this->readerContext->getPageConfigStructure(), + ]; + $this->cache->save(serialize($structures), $cacheId, $this->getUpdate()->getHandles()); + } + $this->generatorPool->process($this->readerContext, $this->generatorContext); \Magento\Framework\Profiler::stop('generate_elements'); $this->addToOutputRootContainers(); diff --git a/lib/internal/Magento/Framework/View/Layout/ProcessorInterface.php b/lib/internal/Magento/Framework/View/Layout/ProcessorInterface.php index bb62be3959b75..42105c9e90b72 100644 --- a/lib/internal/Magento/Framework/View/Layout/ProcessorInterface.php +++ b/lib/internal/Magento/Framework/View/Layout/ProcessorInterface.php @@ -124,4 +124,11 @@ public function getFileLayoutUpdatesXml(); * @return array */ public function getContainers(); + + /** + * Return cache ID based current area/package/theme/store and handles + * + * @return string + */ + public function getCacheId(); } diff --git a/lib/internal/Magento/Framework/View/Layout/Reader/Context.php b/lib/internal/Magento/Framework/View/Layout/Reader/Context.php index 9fc0a8cae8d76..3bd8de190a34c 100644 --- a/lib/internal/Magento/Framework/View/Layout/Reader/Context.php +++ b/lib/internal/Magento/Framework/View/Layout/Reader/Context.php @@ -42,6 +42,15 @@ public function getScheduledStructure() return $this->scheduledStructure; } + /** + * @param \Magento\Framework\View\Layout\ScheduledStructure $scheduledStructure + * @return void + */ + public function setScheduledStructure($scheduledStructure) + { + $this->scheduledStructure = $scheduledStructure; + } + /** * @return \Magento\Framework\View\Page\Config\Structure */ @@ -49,4 +58,13 @@ public function getPageConfigStructure() { return $this->pageConfigStructure; } + + /** + * @param \Magento\Framework\View\Page\Config\Structure $pageConfigStructure + * @return void + */ + public function setPageConfigStructure($pageConfigStructure) + { + $this->pageConfigStructure = $pageConfigStructure; + } } From aa0563b545e636f1f10ee303984146fdc64d335d Mon Sep 17 00:00:00 2001 From: Sviatoslav Mankivskyi Date: Wed, 4 Feb 2015 16:28:20 +0200 Subject: [PATCH 09/60] MAGETWO-33068: [Dev] Layout Processing Improvement --- .../Magento/Framework/View/LayoutTest.php | 196 ++++++++++++++++-- .../Magento/Framework/View/Layout.php | 8 + 2 files changed, 187 insertions(+), 17 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/LayoutTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/LayoutTest.php index 07792d1add264..e9fef2ae85dfc 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/LayoutTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/LayoutTest.php @@ -48,7 +48,7 @@ class LayoutTest extends \PHPUnit_Framework_TestCase /** * @var \Magento\Framework\View\Layout\ScheduledStructure|\PHPUnit_Framework_MockObject_MockObject */ - protected $schStructureMock; + protected $scheduledStructureMock; /** * @var \Magento\Framework\View\Layout\Generator\Block|\PHPUnit_Framework_MockObject_MockObject @@ -60,6 +60,31 @@ class LayoutTest extends \PHPUnit_Framework_TestCase */ protected $generatorContainerMock; + /** + * @var \Magento\Framework\Cache\FrontendInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $cacheMock; + + /** + * @var \Magento\Framework\View\Layout\ReaderPool|\PHPUnit_Framework_MockObject_MockObject + */ + protected $readerPoolMock; + + /** + * @var \Magento\Framework\View\Layout\GeneratorPool|\PHPUnit_Framework_MockObject_MockObject + */ + protected $generatorPoolMock; + + /** + * @var \Magento\Framework\Message\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $messageManagerMock; + + /** + * @var \Magento\Framework\View\Page\Config\Structure|\PHPUnit_Framework_MockObject_MockObject + */ + protected $pageConfigStructureMock; + protected function setUp() { $this->structureMock = $this->getMockBuilder('Magento\Framework\View\Layout\Data\Structure') @@ -72,21 +97,32 @@ protected function setUp() '', false ); - $this->appStateMock = $this->getMock('Magento\Framework\App\State', [], [], '', false); $this->themeResolverMock = $this->getMockForAbstractClass( 'Magento\Framework\View\Design\Theme\ResolverInterface' ); $this->processorMock = $this->getMock('Magento\Core\Model\Layout\Merge', [], [], '', false); - $this->schStructureMock = $this->getMock('Magento\Framework\View\Layout\ScheduledStructure', [], [], '', false); + $this->scheduledStructureMock = $this->getMock('Magento\Framework\View\Layout\ScheduledStructure', [], [], '', false); $this->eventManagerMock = $this->getMock('Magento\Framework\Event\ManagerInterface'); $this->generatorBlockMock = $this->getMockBuilder('Magento\Framework\View\Layout\Generator\Block') ->disableOriginalConstructor()->getMock(); $this->generatorContainerMock = $this->getMockBuilder('Magento\Framework\View\Layout\Generator\Container') ->disableOriginalConstructor()->getMock(); + $this->cacheMock = $this->getMockBuilder('Magento\Framework\Cache\FrontendInterface') + ->disableOriginalConstructor() + ->getMock(); + $this->readerPoolMock = $this->getMockBuilder('Magento\Framework\View\Layout\ReaderPool') + ->disableOriginalConstructor() + ->getMock(); + $this->messageManagerMock = $this->getMockBuilder('Magento\Framework\Message\ManagerInterface') + ->disableOriginalConstructor() + ->getMock(); + $this->pageConfigStructureMock = $this->getMockBuilder('Magento\Framework\View\Page\Config\Structure') + ->disableOriginalConstructor() + ->getMock(); - $generatorPoolMock = $this->getMockBuilder('Magento\Framework\View\Layout\GeneratorPool') + $this->generatorPoolMock = $this->getMockBuilder('Magento\Framework\View\Layout\GeneratorPool') ->disableOriginalConstructor()->getMock(); - $generatorPoolMock->expects($this->any()) + $this->generatorPoolMock->expects($this->any()) ->method('getGenerator') ->will( $this->returnValueMap([ @@ -95,18 +131,18 @@ protected function setUp() ]) ); - $objectManagerHelper = new \Magento\TestFramework\Helper\ObjectManager($this); - $this->model = $objectManagerHelper->getObject( - 'Magento\Framework\View\Layout', - [ - 'structure' => $this->structureMock, - 'themeResolver' => $this->themeResolverMock, - 'processorFactory' => $this->processorFactoryMock, - 'appState' => $this->appStateMock, - 'eventManager' => $this->eventManagerMock, - 'scheduledStructure' => $this->schStructureMock, - 'generatorPool' => $generatorPoolMock - ] + $this->model = new \Magento\Framework\View\Layout( + $this->processorFactoryMock, + $this->eventManagerMock, + $this->structureMock, + $this->scheduledStructureMock, + $this->messageManagerMock, + $this->themeResolverMock, + $this->pageConfigStructureMock, + $this->readerPoolMock, + $this->generatorPoolMock, + $this->cacheMock, + true ); } @@ -624,4 +660,130 @@ public function isCacheableDataProvider() ], ]; } + + public function testGenerateElementsWithoutCache() + { + $layoutCacheId = 'layout_cache_id'; + $handles = ['default', 'another']; + /** @var \Magento\Framework\View\Layout\Element $xml */ + $xml = simplexml_load_string('', 'Magento\Framework\View\Layout\Element'); + $this->model->setXml($xml); + + $themeMock = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); + $this->themeResolverMock->expects($this->once()) + ->method('get') + ->willReturn($themeMock); + $this->processorFactoryMock->expects($this->once()) + ->method('create') + ->with(['theme' => $themeMock]) + ->willReturn($this->processorMock); + + $this->processorMock->expects($this->once()) + ->method('getCacheId') + ->willReturn($layoutCacheId); + $this->processorMock->expects($this->once()) + ->method('getHandles') + ->willReturn($handles); + + $this->cacheMock->expects($this->once()) + ->method('load') + ->with('structure_' . $layoutCacheId) + ->willReturn(false); + + $this->readerPoolMock->expects($this->once()) + ->method('interpret') + ->with($this->model->getReaderContext(), $xml) + ->willReturnSelf(); + + $structures = [ + $this->scheduledStructureMock, + $this->pageConfigStructureMock, + ]; + $this->cacheMock->expects($this->once()) + ->method('save') + ->with(serialize($structures), 'structure_' . $layoutCacheId, $handles) + ->willReturn(true); + + $this->generatorPoolMock->expects($this->once()) + ->method('process') + ->with($this->model->getReaderContext(), $this->model->getGeneratorContext()) + ->willReturn(true); + + $elements = [ + 'name_1' => ['type' => '', 'parent' => null], + 'name_2' => ['type' => \Magento\Framework\View\Layout\Element::TYPE_CONTAINER, 'parent' => null], + 'name_3' => ['type' => '', 'parent' => 'parent'], + 'name_4' => ['type' => \Magento\Framework\View\Layout\Element::TYPE_CONTAINER, 'parent' => 'parent'], + ]; + + $this->structureMock->expects($this->once()) + ->method('exportElements') + ->willReturn($elements); + + $this->model->generateElements(); + } + + public function testGenerateElementsWithCache() + { + $layoutCacheId = 'layout_cache_id'; + $handles = ['default', 'another']; + /** @var \Magento\Framework\View\Layout\Element $xml */ + $xml = simplexml_load_string('', 'Magento\Framework\View\Layout\Element'); + $this->model->setXml($xml); + + $themeMock = $this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface'); + $this->themeResolverMock->expects($this->once()) + ->method('get') + ->willReturn($themeMock); + $this->processorFactoryMock->expects($this->once()) + ->method('create') + ->with(['theme' => $themeMock]) + ->willReturn($this->processorMock); + + $this->processorMock->expects($this->once()) + ->method('getCacheId') + ->willReturn($layoutCacheId); + + $cachedScheduledStructureMock = $this->getMockBuilder('Magento\Framework\View\Layout\ScheduledStructure') + ->disableOriginalConstructor() + ->getMock(); + $cachedPageConfigStructureMock = $this->getMockBuilder('Magento\Framework\View\Page\Config\Structure') + ->disableOriginalConstructor() + ->getMock(); + $structures = [ + $cachedScheduledStructureMock, + $cachedPageConfigStructureMock, + ]; + + $this->cacheMock->expects($this->once()) + ->method('load') + ->with('structure_' . $layoutCacheId) + ->willReturn(serialize($structures)); + + $this->assertEquals($cachedScheduledStructureMock, $this->model->getReaderContext()->getScheduledStructure()); + $this->assertEquals($cachedPageConfigStructureMock, $this->model->getReaderContext()->getPageConfigStructure()); + + $this->readerPoolMock->expects($this->never()) + ->method('interpret'); + $this->cacheMock->expects($this->never()) + ->method('save'); + + $this->generatorPoolMock->expects($this->once()) + ->method('process') + ->with($this->model->getReaderContext(), $this->model->getGeneratorContext()) + ->willReturn(true); + + $elements = [ + 'name_1' => ['type' => '', 'parent' => null], + 'name_2' => ['type' => \Magento\Framework\View\Layout\Element::TYPE_CONTAINER, 'parent' => null], + 'name_3' => ['type' => '', 'parent' => 'parent'], + 'name_4' => ['type' => \Magento\Framework\View\Layout\Element::TYPE_CONTAINER, 'parent' => 'parent'], + ]; + + $this->structureMock->expects($this->once()) + ->method('exportElements') + ->willReturn($elements); + + $this->model->generateElements(); + } } diff --git a/lib/internal/Magento/Framework/View/Layout.php b/lib/internal/Magento/Framework/View/Layout.php index bc55e2a280b5c..5d8ab95b50bed 100644 --- a/lib/internal/Magento/Framework/View/Layout.php +++ b/lib/internal/Magento/Framework/View/Layout.php @@ -280,6 +280,14 @@ public function getReaderContext() return $this->readerContext; } + /** + * @return Layout\Generator\Context + */ + public function getGeneratorContext() + { + return $this->generatorContext; + } + /** * Create structure of elements from the loaded XML configuration * From 65b5122741a872562ad5b6d1828340f7a725aa2f Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Wed, 4 Feb 2015 18:43:13 +0200 Subject: [PATCH 10/60] MAGETWO-31369: [South] Unit and Integration tests coverage --- .../Theme/Model/Config/CustomizationTest.php | 263 ++++++------------ 1 file changed, 91 insertions(+), 172 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/Config/CustomizationTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/Config/CustomizationTest.php index a9fd05f625aba..bf2cbd779f5f5 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Model/Config/CustomizationTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Config/CustomizationTest.php @@ -9,245 +9,164 @@ */ namespace Magento\Theme\Model\Config; +use Magento\Framework\App\Area; + class CustomizationTest extends \PHPUnit_Framework_TestCase { /** - * @var \Magento\Store\Model\StoreManagerInterface + * @var \Magento\Store\Model\StoreManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $_storeManager; + protected $storeManager; /** - * @var \Magento\Framework\View\DesignInterface + * @var \Magento\Framework\View\DesignInterface|\PHPUnit_Framework_MockObject_MockObject */ - protected $_designPackage; + protected $designPackage; /** - * @var \Magento\Core\Model\Resource\Theme\Collection + * @var \Magento\Core\Model\Resource\Theme\Collection|\PHPUnit_Framework_MockObject_MockObject */ - protected $_themeCollection; + protected $themeCollection; /** * @var \Magento\Theme\Model\Config\Customization */ - protected $_model; + protected $model; /** - * @var \Magento\Core\Model\Theme\ThemeProvider|\PHPUnit_Framework_MockObject_MockBuilder + * @var \Magento\Core\Model\Theme\ThemeProvider|\PHPUnit_Framework_MockObject_MockObject */ protected $themeProviderMock; protected function setUp() { - $this->_storeManager = $this->getMockForAbstractClass( - 'Magento\Store\Model\StoreManagerInterface', - [], - '', - true, - true, - true, - ['getStores'] - ); - $this->_designPackage = $this->getMockForAbstractClass( - 'Magento\Framework\View\DesignInterface', - [], - '', - true, - true, - true, - ['getConfigurationDesignTheme'] - ); - $this->_themeCollection = $this->getMock( - 'Magento\Core\Model\Resource\Theme\Collection', - ['filterThemeCustomizations', 'load'], - [], - '', - false - ); - - $collectionFactory = $this->getMock( - 'Magento\Core\Model\Resource\Theme\CollectionFactory', - ['create'], - [], - '', - false - ); - - $collectionFactory->expects($this->any())->method('create')->will($this->returnValue($this->_themeCollection)); - - $this->themeProviderMock = $this->getMock( - '\Magento\Core\Model\Theme\ThemeProvider', - ['getThemeCustomizations', 'getThemeByFullPath'], - [$collectionFactory, $this->getMock('\Magento\Core\Model\ThemeFactory', [], [], '', false)], - '', - false - ); - - $this->_model = new \Magento\Theme\Model\Config\Customization( - $this->_storeManager, - $this->_designPackage, + $this->storeManager = $this->getMockBuilder('Magento\Store\Model\StoreManagerInterface')->getMock(); + $this->designPackage = $this->getMockBuilder('Magento\Framework\View\DesignInterface')->getMock(); + $this->themeCollection = $this->getMockBuilder('Magento\Core\Model\Resource\Theme\Collection') + ->disableOriginalConstructor() + ->getMock(); + + $collectionFactory = $this->getMockBuilder('Magento\Core\Model\Resource\Theme\CollectionFactory') + ->disableOriginalConstructor() + ->setMethods(['create']) + ->getMock(); + + $collectionFactory->expects($this->any())->method('create')->will($this->returnValue($this->themeCollection)); + + $this->themeProviderMock = $this->getMockBuilder('\Magento\Core\Model\Theme\ThemeProvider') + ->disableOriginalConstructor() + ->setMethods(['getThemeCustomizations', 'getThemeByFullPath']) + ->getMock(); + + $this->model = new \Magento\Theme\Model\Config\Customization( + $this->storeManager, + $this->designPackage, $this->themeProviderMock ); } - protected function tearDown() - { - $this->_storeManager = null; - $this->_designPackage = null; - $this->_themeCollection = null; - $this->_model = null; - } - /** - * @covers \Magento\Theme\Model\Config\Customization::getAssignedThemeCustomizations + * covers \Magento\Theme\Model\Config\Customization::getAssignedThemeCustomizations + * covers \Magento\Theme\Model\Config\Customization::hasThemeAssigned */ public function testGetAssignedThemeCustomizations() { - $this->_designPackage->expects( - $this->once() - )->method( - 'getConfigurationDesignTheme' - )->will( - $this->returnValue($this->_getAssignedTheme()->getId()) - ); - - $this->_storeManager->expects( - $this->once() - )->method( - 'getStores' - )->will( - $this->returnValue([$this->_getStore()]) - ); - - $this->themeProviderMock->expects( - $this->once() - )->method( - 'getThemeCustomizations' - )->with( - \Magento\Framework\App\Area::AREA_FRONTEND - )->will( - $this->returnValue([$this->_getAssignedTheme(), $this->_getUnassignedTheme()]) - ); - - $assignedThemes = $this->_model->getAssignedThemeCustomizations(); - $this->assertArrayHasKey($this->_getAssignedTheme()->getId(), $assignedThemes); + $this->designPackage->expects($this->once()) + ->method('getConfigurationDesignTheme') + ->willReturn($this->getAssignedTheme()->getId()); + + $this->storeManager->expects($this->once()) + ->method('getStores') + ->willReturn([$this->getStore()]); + + $this->themeProviderMock->expects($this->once()) + ->method('getThemeCustomizations') + ->with(Area::AREA_FRONTEND) + ->willReturn([$this->getAssignedTheme(), $this->getUnassignedTheme()]); + + $assignedThemes = $this->model->getAssignedThemeCustomizations(); + $this->assertArrayHasKey($this->getAssignedTheme()->getId(), $assignedThemes); + $this->assertTrue($this->model->hasThemeAssigned()); } /** - * @covers \Magento\Theme\Model\Config\Customization::getUnassignedThemeCustomizations + * covers \Magento\Theme\Model\Config\Customization::getUnassignedThemeCustomizations */ public function testGetUnassignedThemeCustomizations() { - $this->_storeManager->expects( - $this->once() - )->method( - 'getStores' - )->will( - $this->returnValue([$this->_getStore()]) - ); + $this->storeManager->expects($this->once()) + ->method('getStores') + ->willReturn([$this->getStore()]); - $this->_designPackage->expects( - $this->once() - )->method( - 'getConfigurationDesignTheme' - )->will( - $this->returnValue($this->_getAssignedTheme()->getId()) - ); + $this->designPackage->expects($this->once()) + ->method('getConfigurationDesignTheme') + ->willReturn($this->getAssignedTheme()->getId()); - $this->themeProviderMock->expects( - $this->once() - )->method( - 'getThemeCustomizations' - )->with( - \Magento\Framework\App\Area::AREA_FRONTEND - )->will( - $this->returnValue([$this->_getAssignedTheme(), $this->_getUnassignedTheme()]) - ); + $this->themeProviderMock->expects($this->once()) + ->method('getThemeCustomizations') + ->with(Area::AREA_FRONTEND) + ->willReturn([$this->getAssignedTheme(), $this->getUnassignedTheme()]); - $unassignedThemes = $this->_model->getUnassignedThemeCustomizations(); - $this->assertArrayHasKey($this->_getUnassignedTheme()->getId(), $unassignedThemes); + $unassignedThemes = $this->model->getUnassignedThemeCustomizations(); + $this->assertArrayHasKey($this->getUnassignedTheme()->getId(), $unassignedThemes); } /** - * @covers \Magento\Theme\Model\Config\Customization::getStoresByThemes + * covers \Magento\Theme\Model\Config\Customization::getStoresByThemes */ public function testGetStoresByThemes() { - $this->_storeManager->expects( - $this->once() - )->method( - 'getStores' - )->will( - $this->returnValue([$this->_getStore()]) - ); + $this->storeManager->expects($this->once()) + ->method('getStores') + ->willReturn([$this->getStore()]); - $this->_designPackage->expects( - $this->once() - )->method( - 'getConfigurationDesignTheme' - )->will( - $this->returnValue($this->_getAssignedTheme()->getId()) - ); + $this->designPackage->expects($this->once()) + ->method('getConfigurationDesignTheme') + ->willReturn($this->getAssignedTheme()->getId()); - $stores = $this->_model->getStoresByThemes(); - $this->assertArrayHasKey($this->_getAssignedTheme()->getId(), $stores); + $stores = $this->model->getStoresByThemes(); + $this->assertArrayHasKey($this->getAssignedTheme()->getId(), $stores); } /** - * @covers \Magento\Theme\Model\Config\Customization::isThemeAssignedToStore + * covers \Magento\Theme\Model\Config\Customization::isThemeAssignedToStore */ public function testIsThemeAssignedToDefaultStore() { - $this->_storeManager->expects( - $this->once() - )->method( - 'getStores' - )->will( - $this->returnValue([$this->_getStore()]) - ); + $this->storeManager->expects($this->once()) + ->method('getStores') + ->willReturn([$this->getStore()]); - $this->_designPackage->expects( - $this->once() - )->method( - 'getConfigurationDesignTheme' - )->will( - $this->returnValue($this->_getAssignedTheme()->getId()) - ); + $this->designPackage->expects($this->once()) + ->method('getConfigurationDesignTheme') + ->willReturn($this->getAssignedTheme()->getId()); - $this->themeProviderMock->expects( - $this->once() - )->method( - 'getThemeCustomizations' - )->with( - \Magento\Framework\App\Area::AREA_FRONTEND - )->will( - $this->returnValue([$this->_getAssignedTheme(), $this->_getUnassignedTheme()]) - ); + $this->themeProviderMock->expects($this->once()) + ->method('getThemeCustomizations') + ->with(Area::AREA_FRONTEND) + ->willReturn([$this->getAssignedTheme(), $this->getUnassignedTheme()]); - $themeAssigned = $this->_model->isThemeAssignedToStore($this->_getAssignedTheme()); + $themeAssigned = $this->model->isThemeAssignedToStore($this->getAssignedTheme()); $this->assertEquals(true, $themeAssigned); } /** - * @covers \Magento\Theme\Model\Config\Customization::isThemeAssignedToStore + * covers \Magento\Theme\Model\Config\Customization::isThemeAssignedToStore */ public function testIsThemeAssignedToConcreteStore() { - $this->_designPackage->expects( - $this->once() - )->method( - 'getConfigurationDesignTheme' - )->will( - $this->returnValue($this->_getAssignedTheme()->getId()) - ); + $this->designPackage->expects($this->once()) + ->method('getConfigurationDesignTheme') + ->willReturn($this->getAssignedTheme()->getId()); - $themeUnassigned = $this->_model->isThemeAssignedToStore($this->_getUnassignedTheme(), $this->_getStore()); + $themeUnassigned = $this->model->isThemeAssignedToStore($this->getUnassignedTheme(), $this->getStore()); $this->assertEquals(false, $themeUnassigned); } /** * @return \Magento\Framework\Object */ - protected function _getAssignedTheme() + protected function getAssignedTheme() { return new \Magento\Framework\Object(['id' => 1, 'theme_path' => 'Magento/luma']); } @@ -255,7 +174,7 @@ protected function _getAssignedTheme() /** * @return \Magento\Framework\Object */ - protected function _getUnassignedTheme() + protected function getUnassignedTheme() { return new \Magento\Framework\Object(['id' => 2, 'theme_path' => 'Magento/blank']); } @@ -263,7 +182,7 @@ protected function _getUnassignedTheme() /** * @return \Magento\Framework\Object */ - protected function _getStore() + protected function getStore() { return new \Magento\Framework\Object(['id' => 55]); } From bf4500e55deba4c2b63f79026a405c91a7858ea9 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Wed, 4 Feb 2015 18:46:09 +0200 Subject: [PATCH 11/60] MAGETWO-31369: [South] Unit and Integration tests coverage - remove @covers tag from all unit tests --- .../App/Action/Plugin/MassactionKeyTest.php | 4 +- .../Backend/App/Router/NoRouteHandlerTest.php | 4 +- .../Page/System/Config/Robots/ResetTest.php | 2 +- .../System/Config/Form/Field/ImageTest.php | 2 +- .../Backend/Block/Widget/ButtonTest.php | 2 +- .../Grid/Column/Renderer/CurrencyTest.php | 2 +- .../Backend/Block/Widget/Grid/ColumnTest.php | 22 ++++---- .../Config/Backend/Cookie/DomainTest.php | 2 +- .../Model/Config/Backend/EncryptedTest.php | 2 +- .../Backend/Model/Locale/ManagerTest.php | 6 +-- .../Catalog/Product/ConfigurationTest.php | 2 +- .../Magento/Bundle/Model/OptionTest.php | 2 +- .../Attribute/Source/Price/ViewTest.php | 4 +- .../Bundle/Model/Product/PriceTest.php | 4 +- .../Bundle/Pricing/Price/TierPriceTest.php | 2 +- .../Captcha/Helper/Adminhtml/DataTest.php | 2 +- .../Magento/Captcha/Helper/DataTest.php | 12 ++--- .../Magento/Captcha/Model/DefaultTest.php | 20 +++---- .../Category/AbstractCategoryTest.php | 4 +- .../Block/Product/AbstractProductTest.php | 4 +- .../Product/Initialization/HelperTest.php | 2 +- .../Initialization/StockDataFilterTest.php | 2 +- .../Magento/Catalog/Model/ConfigTest.php | 30 +++++------ .../Layer/Category/AvailabilityFlagTest.php | 4 +- .../Layer/Category/CollectionFilterTest.php | 4 +- .../Model/Layer/Category/StateKeyTest.php | 4 +- .../Catalog/Model/Layer/FilterListTest.php | 6 +-- .../Layer/Search/CollectionFilterTest.php | 4 +- .../Search/FilterableAttributeListTest.php | 2 +- .../Model/Layer/Search/StateKeyTest.php | 4 +- .../Magento/Catalog/Model/Plugin/LogTest.php | 2 +- .../Product/ReservedAttributeListTest.php | 2 +- .../Magento/Catalog/Model/Product/UrlTest.php | 6 +-- .../Catalog/Pricing/Price/TierPriceTest.php | 32 +++++------ .../Model/Import/Product/Type/OptionTest.php | 54 +++++++++---------- .../Magento/Centinel/Model/ServiceTest.php | 4 +- .../Checkout/Block/Cart/Item/RendererTest.php | 4 +- .../Model/AgreementTest.php | 2 +- .../Cms/Block/Adminhtml/Block/EditTest.php | 4 +- .../Adminhtml/Block/Widget/ChooserTest.php | 6 +-- .../Adminhtml/Wysiwyg/DirectiveTest.php | 6 +-- .../testsuite/Magento/Cms/Helper/PageTest.php | 6 +-- .../Magento/Cms/Model/ObserverTest.php | 6 +-- .../testsuite/Magento/Cms/Model/PageTest.php | 6 +-- .../Cms/Model/Template/FilterProviderTest.php | 8 +-- .../Magento/Cms/Model/Template/FilterTest.php | 4 +- .../Magento/Cms/Model/Wysiwyg/ConfigTest.php | 10 ++-- .../Cms/Model/Wysiwyg/Images/StorageTest.php | 8 +-- .../Core/Model/Layout/TranslatorTest.php | 18 +++---- .../Resource/Layout/Link/CollectionTest.php | 2 +- .../Resource/Layout/Update/CollectionTest.php | 2 +- .../Core/Model/Theme/Domain/StagingTest.php | 2 +- .../Core/Model/Theme/Domain/VirtualTest.php | 6 +-- .../Core/Model/Theme/Image/PathTest.php | 6 +-- .../Core/Model/Theme/ValidationTest.php | 2 +- .../Magento/Core/Model/ThemeTest.php | 10 ++-- .../Controller/Account/LoginPostTest.php | 2 +- .../Model/Export/AddressTest.php | 2 +- .../Model/Export/CustomerTest.php | 2 +- .../Model/Import/AddressTest.php | 8 +-- .../Import/CustomerComposite/DataTest.php | 6 +-- .../Block/Adminhtml/Editor/ContainerTest.php | 6 +-- .../Editor/Tools/Code/CustomTest.php | 2 +- .../Adminhtml/Editor/Tools/Code/JsTest.php | 8 +-- .../Block/Adminhtml/ThemeTest.php | 6 +-- .../Renderer/BackgroundImageTest.php | 4 +- .../QuickStyles/Renderer/DefaultTest.php | 2 +- .../testsuite/Magento/Eav/Helper/DataTest.php | 12 ++--- .../Model/Attribute/Data/AbstractDataTest.php | 12 ++--- .../Eav/Model/Attribute/Data/BooleanTest.php | 2 +- .../Eav/Model/Attribute/Data/DateTest.php | 8 +-- .../Eav/Model/Attribute/Data/FileTest.php | 6 +-- .../Eav/Model/Attribute/Data/ImageTest.php | 2 +- .../Model/Attribute/Data/MultilineTest.php | 8 +-- .../Model/Attribute/Data/MultiselectTest.php | 4 +- .../Eav/Model/Attribute/Data/SelectTest.php | 8 +-- .../Eav/Model/AttributeFactoryTest.php | 2 +- .../Entity/Attribute/Source/BooleanTest.php | 2 +- .../Model/Resource/Entity/AttributeTest.php | 6 +-- .../Framework/App/Action/ForwardTest.php | 6 +-- .../App/Config/Data/BackendModelPoolTest.php | 6 +-- .../App/Config/Initial/ReaderTest.php | 4 +- .../App/ObjectManagerFactoryTest.php | 2 +- .../Framework/App/RequestFactoryTest.php | 4 +- .../Framework/App/Response/HttpTest.php | 6 +-- .../Framework/App/ScopeResolverPoolTest.php | 2 +- .../Framework/Cache/Backend/MongoDbTest.php | 12 ++--- .../Code/Generator/EntityAbstractTest.php | 22 ++++---- .../Framework/Controller/Result/JSONTest.php | 2 +- .../Framework/DB/Adapter/Pdo/MysqlTest.php | 4 +- .../Framework/Data/Collection/DbTest.php | 2 +- .../Data/Form/Element/AbstractElementTest.php | 40 +++++++------- .../Data/Form/Element/ButtonTest.php | 4 +- .../Data/Form/Element/CheckboxTest.php | 6 +-- .../Form/Element/CollectionFactoryTest.php | 2 +- .../Data/Form/Element/ColumnTest.php | 2 +- .../Framework/Data/Form/Element/FileTest.php | 2 +- .../Data/Form/Element/HiddenTest.php | 4 +- .../Framework/Data/Form/Element/ImageTest.php | 8 +-- .../Data/Form/Element/ImagefileTest.php | 2 +- .../Framework/Data/Form/Element/LabelTest.php | 4 +- .../Framework/Data/Form/Element/LinkTest.php | 6 +-- .../Data/Form/Element/MultiselectTest.php | 2 +- .../Framework/Data/Form/Element/NoteTest.php | 4 +- .../Data/Form/Element/ObscureTest.php | 6 +-- .../Data/Form/Element/PasswordTest.php | 4 +- .../Framework/Data/Form/Element/RadioTest.php | 2 +- .../Framework/Data/Form/Element/ResetTest.php | 2 +- .../Data/Form/Element/SubmitTest.php | 4 +- .../Framework/Data/Form/Element/TextTest.php | 6 +-- .../Data/Form/Element/TextareaTest.php | 6 +-- .../Magento/Framework/Data/StructureTest.php | 4 +- .../Magento/Framework/EscaperTest.php | 8 +-- .../Framework/Filter/RemoveTagsTest.php | 4 +- .../Framework/Filter/StripTagsTest.php | 2 +- .../Magento/Framework/HTTP/HeaderTest.php | 10 ++-- .../Framework/Image/AdapterFactoryTest.php | 8 +-- .../Interception/Chain/ChainTest.php | 8 +-- .../Code/InterfaceValidatorTest.php | 28 +++++----- .../Interception/Definition/CompiledTest.php | 4 +- .../PluginList/PluginListTest.php | 8 +-- .../PreProcessor/Instruction/ImportTest.php | 2 +- .../Framework/Locale/ValidatorTest.php | 2 +- .../Magento/Framework/Mail/MessageTest.php | 8 +-- .../Framework/Mail/Template/FactoryTest.php | 4 +- .../Mail/Template/TransportBuilderTest.php | 6 +-- .../Magento/Framework/Mail/TransportTest.php | 2 +- .../Magento/Framework/Math/CalculatorTest.php | 4 +- .../Framework/Message/AbstractMessageTest.php | 14 ++--- .../Framework/Message/CollectionTest.php | 30 +++++------ .../ActionValidator/RemoveActionTest.php | 4 +- .../Framework/Module/Setup/MigrationTest.php | 2 +- .../ObjectManager/Config/Reader/DomTest.php | 2 +- .../Framework/Pricing/PriceInfo/BaseTest.php | 4 +- .../Framework/Stdlib/ArrayUtilsTest.php | 4 +- .../Stdlib/Cookie/CookieScopeTest.php | 18 +++---- .../Magento/Framework/Stdlib/StringTest.php | 8 +-- .../Magento/Framework/Url/DecoderTest.php | 4 +- .../View/Asset/File/FallbackContextTest.php | 4 +- .../Theme/Customization/AbstractFileTest.php | 22 ++++---- .../Design/Theme/Customization/PathTest.php | 8 +-- .../View/Design/Theme/CustomizationTest.php | 18 +++---- .../View/Design/Theme/Domain/FactoryTest.php | 4 +- .../Design/Theme/FlyweightFactoryTest.php | 4 +- .../View/Design/Theme/Image/UploaderTest.php | 2 +- .../Framework/View/Design/Theme/ImageTest.php | 16 +++--- .../Magento/Framework/View/Helper/JsTest.php | 2 +- .../Framework/View/Layout/BuilderTest.php | 4 +- .../View/Layout/Generator/BlockTest.php | 6 +-- .../View/Layout/Reader/BlockTest.php | 6 +-- .../Layout/ScheduledStructure/HelperTest.php | 2 +- .../View/Layout/ScheduledStructureTest.php | 50 ++++++++--------- .../Magento/Framework/View/LayoutTest.php | 6 +-- .../Framework/View/Page/BuilderTest.php | 2 +- .../Framework/View/Result/LayoutTest.php | 4 +- .../Composite/Fieldset/GroupedTest.php | 16 +++--- .../ListAssociatedProductsTest.php | 2 +- .../Grouped/AssociatedProductsTest.php | 4 +- .../Configuration/Plugin/GroupedTest.php | 6 +-- .../Model/Product/Type/Grouped/PriceTest.php | 4 +- .../Model/Export/Entity/AbstractEavTest.php | 6 +-- .../Model/Export/EntityAbstractTest.php | 4 +- .../Model/Import/Entity/AbstractTest.php | 8 +-- .../Model/Import/Entity/EavAbstractTest.php | 2 +- .../Model/Import/EntityAbstractTest.php | 14 ++--- .../CollectionByPagesIteratorTest.php | 2 +- .../Source/Import/Behavior/BasicTest.php | 4 +- .../Source/Import/Behavior/CustomTest.php | 4 +- .../Source/Import/BehaviorAbstractTest.php | 2 +- .../Block/NavigationTest.php | 6 +-- .../PageCache/Block/JavascriptTest.php | 4 +- .../Payment/Block/Form/ContainerTest.php | 2 +- .../Magento/Persistent/Model/SessionTest.php | 2 +- .../Model/Quote/Item/RelatedProductsTest.php | 4 +- .../Magento/Reports/Model/Plugin/LogTest.php | 2 +- .../Rule/Model/Condition/CombineTest.php | 2 +- .../Adminhtml/Order/Create/Items/GridTest.php | 2 +- .../Rule/Action/Discount/CartFixedTest.php | 2 +- .../Carrier/AbstractCarrierOnlineTest.php | 2 +- .../Magento/Shipping/Model/ShippingTest.php | 2 +- .../Model/Config/Reader/ReaderPoolTest.php | 2 +- .../Store/Model/StorageFactoryTest.php | 22 ++++---- .../Magento/Store/Model/StoreTest.php | 12 ++--- .../System/Design/Theme/Tab/CssTest.php | 2 +- .../Theme/Block/Html/Header/LogoTest.php | 2 +- .../Magento/Theme/Helper/StorageTest.php | 2 +- .../Magento/Theme/Model/ConfigTest.php | 4 +- .../Magento/Theme/Model/CopyServiceTest.php | 6 +-- .../Theme/Model/Wysiwyg/StorageTest.php | 28 +++++----- .../Migration/Acl/Db/LoggerAbstractTest.php | 4 +- .../Tools/Migration/Acl/GeneratorTest.php | 8 +-- .../Migration/Acl/Menu/GeneratorTest.php | 4 +- .../Configuration/LoggerAbstractTest.php | 4 +- .../Magento/Ups/Model/CarrierTest.php | 2 +- .../Resource/UrlRewriteCollectionTest.php | 4 +- .../Magento/Usps/Helper/DataTest.php | 4 +- 196 files changed, 636 insertions(+), 636 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Backend/App/Action/Plugin/MassactionKeyTest.php b/dev/tests/unit/testsuite/Magento/Backend/App/Action/Plugin/MassactionKeyTest.php index 8c2ed7ff232e9..020d82dfc4cf9 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/App/Action/Plugin/MassactionKeyTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/App/Action/Plugin/MassactionKeyTest.php @@ -38,7 +38,7 @@ protected function setUp() } /** - * @covers \Magento\Backend\App\Action\Plugin\MassactionKey::aroundDispatch + * covers \Magento\Backend\App\Action\Plugin\MassactionKey::aroundDispatch * * @param $postData array|string * @param array $convertedData @@ -72,7 +72,7 @@ public function aroundDispatchDataProvider() } /** - * @covers \Magento\Backend\App\Action\Plugin\MassactionKey::aroundDispatch + * covers \Magento\Backend\App\Action\Plugin\MassactionKey::aroundDispatch */ public function testAroundDispatchWhenMassactionPrepareKeyRequestNotExists() { diff --git a/dev/tests/unit/testsuite/Magento/Backend/App/Router/NoRouteHandlerTest.php b/dev/tests/unit/testsuite/Magento/Backend/App/Router/NoRouteHandlerTest.php index 9677b8f6dd79e..acfc0e09ec764 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/App/Router/NoRouteHandlerTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/App/Router/NoRouteHandlerTest.php @@ -37,7 +37,7 @@ protected function setUp() } /** - * @covers Magento\Backend\App\Router\NoRouteHandler::process + * covers Magento\Backend\App\Router\NoRouteHandler::process */ public function testProcessWithBackendAreaFrontName() { @@ -86,7 +86,7 @@ public function testProcessWithBackendAreaFrontName() } /** - * @covers Magento\Backend\App\Router\NoRouteHandler::process + * covers Magento\Backend\App\Router\NoRouteHandler::process */ public function testProcessWithoutAreaFrontName() { diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Page/System/Config/Robots/ResetTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Page/System/Config/Robots/ResetTest.php index 54104e21c348c..bbb898c7d6e37 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Page/System/Config/Robots/ResetTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Page/System/Config/Robots/ResetTest.php @@ -35,7 +35,7 @@ protected function setUp() } /** - * @covers \Magento\Backend\Block\Page\System\Config\Robots\Reset::getRobotsDefaultCustomInstructions + * covers \Magento\Backend\Block\Page\System\Config\Robots\Reset::getRobotsDefaultCustomInstructions */ public function testGetRobotsDefaultCustomInstructions() { diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ImageTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ImageTest.php index 7da41c293028e..7a4b2b20a2914 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ImageTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/System/Config/Form/Field/ImageTest.php @@ -51,7 +51,7 @@ protected function setUp() } /** - * @covers \Magento\Backend\Block\System\Config\Form\Field\Image::_getUrl + * covers \Magento\Backend\Block\System\Config\Form\Field\Image::_getUrl */ public function testGetElementHtmlWithValue() { diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php index fcda35273804d..6306f38ba3ba7 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/ButtonTest.php @@ -51,7 +51,7 @@ protected function tearDown() } /** - * @covers \Magento\Backend\Block\Widget\Button::getAttributesHtml + * covers \Magento\Backend\Block\Widget\Button::getAttributesHtml * @dataProvider getAttributesHtmlDataProvider */ public function testGetAttributesHtml($data, $expect) diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/CurrencyTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/CurrencyTest.php index 46bbce1b13e90..e7f9bc7f41e14 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/CurrencyTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/Column/Renderer/CurrencyTest.php @@ -109,7 +109,7 @@ protected function tearDown() } /** - * @covers \Magento\Backend\Block\Widget\Grid\Column\Renderer\Currency::render + * covers \Magento\Backend\Block\Widget\Grid\Column\Renderer\Currency::render */ public function testRenderWithDefaultCurrency() { diff --git a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnTest.php b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnTest.php index ba299e4abfbe3..7113e622b764d 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Block/Widget/Grid/ColumnTest.php @@ -97,8 +97,8 @@ public function getSortableDataProvider() } /** - * @covers \Magento\Backend\Block\Widget\Grid\Column::getFilter - * @covers \Magento\Backend\Block\Widget\Grid\Column::setFilterType + * covers \Magento\Backend\Block\Widget\Grid\Column::getFilter + * covers \Magento\Backend\Block\Widget\Grid\Column::setFilterType */ public function testGetFilterWithSetEmptyCustomFilterType() { @@ -108,7 +108,7 @@ public function testGetFilterWithSetEmptyCustomFilterType() } /** - * @covers \Magento\Backend\Block\Widget\Grid\Column::getFilter + * covers \Magento\Backend\Block\Widget\Grid\Column::getFilter */ public function testGetFilterWithInvalidFilterTypeWhenUseDefaultFilter() { @@ -128,7 +128,7 @@ public function testGetFilterWithInvalidFilterTypeWhenUseDefaultFilter() } /** - * @covers \Magento\Backend\Block\Widget\Grid\Column::getFilter + * covers \Magento\Backend\Block\Widget\Grid\Column::getFilter */ public function testGetFilterWhenUseCustomFilter() { @@ -149,8 +149,8 @@ public function testGetFilterWhenUseCustomFilter() } /** - * @covers \Magento\Backend\Block\Widget\Grid\Column::getFilter - * @covers \Magento\Backend\Block\Widget\Grid\Column::setFilter + * covers \Magento\Backend\Block\Widget\Grid\Column::getFilter + * covers \Magento\Backend\Block\Widget\Grid\Column::setFilter */ public function testGetFilterWhenFilterWasSetPreviously() { @@ -213,7 +213,7 @@ public function testGetRendererWhenRendererIsSet() } /** - * @covers \Magento\Backend\Block\Widget\Grid\Column::getRenderer + * covers \Magento\Backend\Block\Widget\Grid\Column::getRenderer */ public function testGetRendererWheRendererSetFalse() { @@ -235,8 +235,8 @@ public function testGetRendererWheRendererSetFalse() } /** - * @covers \Magento\Backend\Block\Widget\Grid\Column::getRenderer - * @covers \Magento\Backend\Block\Widget\Grid\Column::setRendererType + * covers \Magento\Backend\Block\Widget\Grid\Column::getRenderer + * covers \Magento\Backend\Block\Widget\Grid\Column::setRendererType */ public function testGetRendererWhenUseCustomRenderer() { @@ -259,8 +259,8 @@ public function testGetRendererWhenUseCustomRenderer() } /** - * @covers \Magento\Backend\Block\Widget\Grid\Column::getRenderer - * @covers \Magento\Backend\Block\Widget\Grid\Column::setRenderer + * covers \Magento\Backend\Block\Widget\Grid\Column::getRenderer + * covers \Magento\Backend\Block\Widget\Grid\Column::setRenderer */ public function testGetRendererWhenRendererWasSetPreviously() { diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/DomainTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/DomainTest.php index afbbf06db7111..e443273942b35 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/DomainTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/Cookie/DomainTest.php @@ -70,7 +70,7 @@ protected function setUp() } /** - * @covers \Magento\Backend\Model\Config\Backend\Cookie\Domain::beforeSave + * covers \Magento\Backend\Model\Config\Backend\Cookie\Domain::beforeSave * @dataProvider beforeSaveDataProvider * * @param string $value diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/EncryptedTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/EncryptedTest.php index 84f4fc76ac572..9f8d4d9c0e1f5 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/EncryptedTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Config/Backend/EncryptedTest.php @@ -85,7 +85,7 @@ public function testProcessValue() } /** - * @covers \Magento\Backend\Model\Config\Backend\Encrypted::beforeSave + * covers \Magento\Backend\Model\Config\Backend\Encrypted::beforeSave * @dataProvider beforeSaveDataProvider * * @param $value diff --git a/dev/tests/unit/testsuite/Magento/Backend/Model/Locale/ManagerTest.php b/dev/tests/unit/testsuite/Magento/Backend/Model/Locale/ManagerTest.php index 01b2603852deb..cedb5002eaab2 100644 --- a/dev/tests/unit/testsuite/Magento/Backend/Model/Locale/ManagerTest.php +++ b/dev/tests/unit/testsuite/Magento/Backend/Model/Locale/ManagerTest.php @@ -67,7 +67,7 @@ public function switchBackendInterfaceLocaleDataProvider() /** * @param string $locale * @dataProvider switchBackendInterfaceLocaleDataProvider - * @covers \Magento\Backend\Model\Locale\Manager::switchBackendInterfaceLocale + * covers \Magento\Backend\Model\Locale\Manager::switchBackendInterfaceLocale */ public function testSwitchBackendInterfaceLocale($locale) { @@ -81,7 +81,7 @@ public function testSwitchBackendInterfaceLocale($locale) } /** - * @covers \Magento\Backend\Model\Locale\Manager::getUserInterfaceLocale + * covers \Magento\Backend\Model\Locale\Manager::getUserInterfaceLocale */ public function testGetUserInterfaceLocaleDefault() { @@ -91,7 +91,7 @@ public function testGetUserInterfaceLocaleDefault() } /** - * @covers \Magento\Backend\Model\Locale\Manager::getUserInterfaceLocale + * covers \Magento\Backend\Model\Locale\Manager::getUserInterfaceLocale */ public function testGetUserInterfaceLocale() { diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Helper/Catalog/Product/ConfigurationTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Helper/Catalog/Product/ConfigurationTest.php index 515088bd08d8e..a319cfda39419 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Helper/Catalog/Product/ConfigurationTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Helper/Catalog/Product/ConfigurationTest.php @@ -70,7 +70,7 @@ public function testGetSelectionQtyIfCustomOptionIsNotSet() } /** - * @covers \Magento\Bundle\Helper\Catalog\Product\Configuration::getSelectionFinalPrice + * covers \Magento\Bundle\Helper\Catalog\Product\Configuration::getSelectionFinalPrice */ public function testGetSelectionFinalPrice() { diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Model/OptionTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Model/OptionTest.php index a2456557ecd4a..7aaa0ae776306 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Model/OptionTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Model/OptionTest.php @@ -58,7 +58,7 @@ protected function setUp() } /** - * @covers \Magento\Bundle\Model\Option::addSelection + * covers \Magento\Bundle\Model\Option::addSelection */ public function testAddSelection() { diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/Attribute/Source/Price/ViewTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/Attribute/Source/Price/ViewTest.php index a27774900aa33..11b6305ef09a2 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/Attribute/Source/Price/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/Attribute/Source/Price/ViewTest.php @@ -68,7 +68,7 @@ public function testGetAllOptions() } /** - * @covers \Magento\Bundle\Model\Product\Attribute\Source\Price\View::getOptionText + * covers \Magento\Bundle\Model\Product\Attribute\Source\Price\View::getOptionText */ public function testGetOptionTextForExistLabel() { @@ -78,7 +78,7 @@ public function testGetOptionTextForExistLabel() } /** - * @covers \Magento\Bundle\Model\Product\Attribute\Source\Price\View::getOptionText + * covers \Magento\Bundle\Model\Product\Attribute\Source\Price\View::getOptionText */ public function testGetOptionTextForNotExistLabel() { diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/PriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/PriceTest.php index 656aafc5baf03..1503866ba841d 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/PriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Model/Product/PriceTest.php @@ -95,8 +95,8 @@ protected function setUp() * @param bool $dateInInterval * @param float $expected * - * @covers \Magento\Bundle\Model\Product\Price::calculateSpecialPrice - * @covers \Magento\Bundle\Model\Product\Price::__construct + * covers \Magento\Bundle\Model\Product\Price::calculateSpecialPrice + * covers \Magento\Bundle\Model\Product\Price::__construct * @dataProvider calculateSpecialPrice */ public function testCalculateSpecialPrice($finalPrice, $specialPrice, $callsNumber, $dateInInterval, $expected) diff --git a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/TierPriceTest.php b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/TierPriceTest.php index a62bab5d03b0b..e0605358c6229 100644 --- a/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/TierPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Bundle/Pricing/Price/TierPriceTest.php @@ -72,7 +72,7 @@ protected function setUp() } /** - * @covers \Magento\Bundle\Pricing\Price\TierPrice::isFirstPriceBetter + * covers \Magento\Bundle\Pricing\Price\TierPrice::isFirstPriceBetter * @dataProvider providerForGetterTierPriceList */ public function testGetterTierPriceList($tierPrices, $basePrice, $expectedResult) diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php index c8db2c56e400e..8ae170be9e8eb 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Helper/Adminhtml/DataTest.php @@ -54,7 +54,7 @@ public function testGetConfig() } /** - * @covers \Magento\Captcha\Helper\Adminhtml\Data::_getWebsiteCode + * covers \Magento\Captcha\Helper\Adminhtml\Data::_getWebsiteCode */ public function testGetWebsiteId() { diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php index 0e4c592978aa5..c8613bafb5973 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Helper/DataTest.php @@ -33,7 +33,7 @@ protected function _getHelper($store, $config, $factory) } /** - * @covers \Magento\Captcha\Helper\Data::getCaptcha + * covers \Magento\Captcha\Helper\Data::getCaptcha */ public function testGetCaptcha() { @@ -72,7 +72,7 @@ public function testGetCaptcha() } /** - * @covers \Magento\Captcha\Helper\Data::getConfig + * covers \Magento\Captcha\Helper\Data::getConfig */ public function testGetConfigNode() { @@ -136,8 +136,8 @@ public function testGetFonts() } /** - * @covers \Magento\Captcha\Model\DefaultModel::getImgDir - * @covers \Magento\Captcha\Helper\Data::getImgDir + * covers \Magento\Captcha\Model\DefaultModel::getImgDir + * covers \Magento\Captcha\Helper\Data::getImgDir */ public function testGetImgDir() { @@ -179,8 +179,8 @@ public function testGetImgDir() } /** - * @covers \Magento\Captcha\Model\DefaultModel::getImgUrl - * @covers \Magento\Captcha\Helper\Data::getImgUrl + * covers \Magento\Captcha\Model\DefaultModel::getImgUrl + * covers \Magento\Captcha\Helper\Data::getImgUrl */ public function testGetImgUrl() { diff --git a/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php b/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php index 1d469ec145b56..a3043555bb4e9 100644 --- a/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php +++ b/dev/tests/unit/testsuite/Magento/Captcha/Model/DefaultTest.php @@ -136,7 +136,7 @@ protected function setUp() } /** - * @covers \Magento\Captcha\Model\DefaultModel::getBlockName + * covers \Magento\Captcha\Model\DefaultModel::getBlockName */ public function testGetBlockName() { @@ -144,7 +144,7 @@ public function testGetBlockName() } /** - * @covers \Magento\Captcha\Model\DefaultModel::isRequired + * covers \Magento\Captcha\Model\DefaultModel::isRequired */ public function testIsRequired() { @@ -152,7 +152,7 @@ public function testIsRequired() } /** - * @covers \Magento\Captcha\Model\DefaultModel::isCaseSensitive + * covers \Magento\Captcha\Model\DefaultModel::isCaseSensitive */ public function testIsCaseSensitive() { @@ -163,7 +163,7 @@ public function testIsCaseSensitive() } /** - * @covers \Magento\Captcha\Model\DefaultModel::getFont + * covers \Magento\Captcha\Model\DefaultModel::getFont */ public function testGetFont() { @@ -171,8 +171,8 @@ public function testGetFont() } /** - * @covers \Magento\Captcha\Model\DefaultModel::getTimeout - * @covers \Magento\Captcha\Model\DefaultModel::getExpiration + * covers \Magento\Captcha\Model\DefaultModel::getTimeout + * covers \Magento\Captcha\Model\DefaultModel::getExpiration */ public function testGetTimeout() { @@ -180,7 +180,7 @@ public function testGetTimeout() } /** - * @covers \Magento\Captcha\Model\DefaultModel::isCorrect + * covers \Magento\Captcha\Model\DefaultModel::isCorrect */ public function testIsCorrect() { @@ -193,7 +193,7 @@ public function testIsCorrect() } /** - * @covers \Magento\Captcha\Model\DefaultModel::getImgSrc + * covers \Magento\Captcha\Model\DefaultModel::getImgSrc */ public function testGetImgSrc() { @@ -204,7 +204,7 @@ public function testGetImgSrc() } /** - * @covers \Magento\Captcha\Model\DefaultModel::logAttempt + * covers \Magento\Captcha\Model\DefaultModel::logAttempt */ public function testLogAttempt() { @@ -221,7 +221,7 @@ public function testLogAttempt() } /** - * @covers \Magento\Captcha\Model\DefaultModel::getWord + * covers \Magento\Captcha\Model\DefaultModel::getWord */ public function testGetWord() { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Category/AbstractCategoryTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Category/AbstractCategoryTest.php index cd333f1084e3c..cb8bbf5f82d3f 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Category/AbstractCategoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Adminhtml/Category/AbstractCategoryTest.php @@ -91,8 +91,8 @@ protected function setUp() } /** - * @covers \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory::getStore - * @covers \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory::getSaveUrl + * covers \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory::getStore + * covers \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory::getSaveUrl */ public function testGetSaveUrl() { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php index bd0a63848a01e..a086fc8bdf0f5 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Block/Product/AbstractProductTest.php @@ -71,8 +71,8 @@ public function setUp() /** * Test for method getProductPrice * - * @covers \Magento\Catalog\Block\Product\AbstractProduct::getProductPriceHtml - * @covers \Magento\Catalog\Block\Product\AbstractProduct::getProductPrice + * covers \Magento\Catalog\Block\Product\AbstractProduct::getProductPriceHtml + * covers \Magento\Catalog\Block\Product\AbstractProduct::getProductPrice */ public function testGetProductPrice() { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/HelperTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/HelperTest.php index 0eb89b9f1735d..a57e3d322f582 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/HelperTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/HelperTest.php @@ -103,7 +103,7 @@ protected function setUp() } /** - * @covers Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper::initialize + * covers Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper::initialize * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function testInitialize() diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilterTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilterTest.php index d2b1f6fdcbe29..ea1d78e505c88 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilterTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Product/Initialization/StockDataFilterTest.php @@ -49,7 +49,7 @@ protected function setUp() * @param array $inputStockData * @param array $outputStockData * - * @covers Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter::filter + * covers Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter::filter * @dataProvider filterDataProvider */ public function testFilter(array $inputStockData, array $outputStockData) diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/ConfigTest.php index a18df7aeb95fa..f351c0caa6731 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/ConfigTest.php @@ -9,7 +9,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase { /** - * @covers Magento\Catalog\Model\Config::loadAttributeSets + * covers Magento\Catalog\Model\Config::loadAttributeSets * @return object */ public function testLoadAttributeSets() @@ -50,7 +50,7 @@ public function testLoadAttributeSets() /** * @depends testLoadAttributeSets - * @covers Magento\Catalog\Model\Config::getAttributeSetName + * covers Magento\Catalog\Model\Config::getAttributeSetName */ public function testGetAttributeSetName($model) { @@ -59,7 +59,7 @@ public function testGetAttributeSetName($model) } /** * @depends testLoadAttributeSets - * @covers Magento\Catalog\Model\Config::getAttributeSetId + * covers Magento\Catalog\Model\Config::getAttributeSetId */ public function testGetAttributeSetId($model) { @@ -68,7 +68,7 @@ public function testGetAttributeSetId($model) } /** - * @covers Magento\Catalog\Model\Config::loadAttributeGroups + * covers Magento\Catalog\Model\Config::loadAttributeGroups * @return object */ public function testLoadAttributeGroups() @@ -112,7 +112,7 @@ public function testLoadAttributeGroups() /** * @depends testLoadAttributeGroups - * @covers Magento\Catalog\Model\Config::getAttributeGroupName + * covers Magento\Catalog\Model\Config::getAttributeGroupName */ public function testGetAttributeGroupName($model) { @@ -121,7 +121,7 @@ public function testGetAttributeGroupName($model) } /** * @depends testLoadAttributeGroups - * @covers Magento\Catalog\Model\Config::getAttributeGroupId + * covers Magento\Catalog\Model\Config::getAttributeGroupId */ public function testGetAttributeGroupId($model) { @@ -130,7 +130,7 @@ public function testGetAttributeGroupId($model) } /** - * @covers Magento\Catalog\Model\Config::loadProductTypes + * covers Magento\Catalog\Model\Config::loadProductTypes * @return object */ public function testLoadProductTypes() @@ -153,7 +153,7 @@ public function testLoadProductTypes() /** * @depends testLoadProductTypes - * @covers Magento\Catalog\Model\Config::getProductTypeId + * covers Magento\Catalog\Model\Config::getProductTypeId */ public function testGetProductTypeId($model) { @@ -163,7 +163,7 @@ public function testGetProductTypeId($model) /** * @depends testLoadProductTypes - * @covers Magento\Catalog\Model\Config::getProductTypeName + * covers Magento\Catalog\Model\Config::getProductTypeName */ public function testGetProductTypeName($model) { @@ -176,7 +176,7 @@ public function testGetProductTypeName($model) * @param $data * @param $search * - * @covers Magento\Catalog\Model\Config::getSourceOptionId + * covers Magento\Catalog\Model\Config::getSourceOptionId * @dataProvider getSourceOptionIdDataProvider */ public function testGetSourceOptionId($expected, $data, $search) @@ -263,7 +263,7 @@ protected function prepareConfigModelForAttributes() } /** - * @covers Magento\Catalog\Model\Config::getAttributesUsedInProductListing + * covers Magento\Catalog\Model\Config::getAttributesUsedInProductListing * return object */ public function testGetAttributesUsedInProductListing() @@ -275,7 +275,7 @@ public function testGetAttributesUsedInProductListing() /** * @depends testGetAttributesUsedInProductListing - * @covers Magento\Catalog\Model\Config::getProductAttributes + * covers Magento\Catalog\Model\Config::getProductAttributes */ public function testGetProductAttributes($model) { @@ -283,7 +283,7 @@ public function testGetProductAttributes($model) } /** - * @covers Magento\Catalog\Model\Config::getAttributesUsedForSortBy + * covers Magento\Catalog\Model\Config::getAttributesUsedForSortBy */ public function testGetAttributesUsedForSortBy() { @@ -292,7 +292,7 @@ public function testGetAttributesUsedForSortBy() } /** - * @covers Magento\Catalog\Model\Config::getAttributeUsedForSortByArray + * covers Magento\Catalog\Model\Config::getAttributeUsedForSortByArray */ public function testGetAttributeUsedForSortByArray() { @@ -301,7 +301,7 @@ public function testGetAttributeUsedForSortByArray() } /** - * @covers Magento\Catalog\Model\Config::getProductListDefaultSortBy + * covers Magento\Catalog\Model\Config::getProductListDefaultSortBy */ public function testGetProductListDefaultSortBy() { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/AvailabilityFlagTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/AvailabilityFlagTest.php index db49b44bf81a2..19ea3221c3a2d 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/AvailabilityFlagTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/AvailabilityFlagTest.php @@ -50,8 +50,8 @@ protected function setUp() * @param bool $expectedResult * * @dataProvider isEnabledDataProvider - * @covers \Magento\Catalog\Model\Layer\Category\AvailabilityFlag::isEnabled - * @covers \Magento\Catalog\Model\Layer\Category\AvailabilityFlag::canShowOptions + * covers \Magento\Catalog\Model\Layer\Category\AvailabilityFlag::isEnabled + * covers \Magento\Catalog\Model\Layer\Category\AvailabilityFlag::canShowOptions */ public function testIsEnabled($itemsCount, $filters, $expectedResult) { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/CollectionFilterTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/CollectionFilterTest.php index 99311ea2d28f3..aff95ddd50fef 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/CollectionFilterTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/CollectionFilterTest.php @@ -33,8 +33,8 @@ protected function setUp() } /** - * @covers \Magento\Catalog\Model\Layer\Category\CollectionFilter::filter - * @covers \Magento\Catalog\Model\Layer\Category\CollectionFilter::__construct + * covers \Magento\Catalog\Model\Layer\Category\CollectionFilter::filter + * covers \Magento\Catalog\Model\Layer\Category\CollectionFilter::__construct */ public function testFilter() { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/StateKeyTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/StateKeyTest.php index 4dc836c0be5bb..d0461030beb72 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/StateKeyTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Category/StateKeyTest.php @@ -31,8 +31,8 @@ protected function setUp() } /** - * @covers \Magento\Catalog\Model\Layer\Category\StateKey::toString - * @covers \Magento\Catalog\Model\Layer\Category\StateKey::__construct + * covers \Magento\Catalog\Model\Layer\Category\StateKey::toString + * covers \Magento\Catalog\Model\Layer\Category\StateKey::__construct */ public function testToString() { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php index a9597d643e96a..558f71adab931 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/FilterListTest.php @@ -60,9 +60,9 @@ protected function setUp() * @param string $expectedClass * @dataProvider getFiltersDataProvider * - * @covers \Magento\Catalog\Model\Layer\FilterList::getFilters - * @covers \Magento\Catalog\Model\Layer\FilterList::createAttributeFilter - * @covers \Magento\Catalog\Model\Layer\FilterList::__construct + * covers \Magento\Catalog\Model\Layer\FilterList::getFilters + * covers \Magento\Catalog\Model\Layer\FilterList::createAttributeFilter + * covers \Magento\Catalog\Model\Layer\FilterList::__construct */ public function testGetFilters($method, $value, $expectedClass) { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/CollectionFilterTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/CollectionFilterTest.php index 8b527c450c529..496457db25e29 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/CollectionFilterTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/CollectionFilterTest.php @@ -49,8 +49,8 @@ protected function setUp() } /** - * @covers \Magento\Catalog\Model\Layer\Search\CollectionFilter::filter - * @covers \Magento\Catalog\Model\Layer\Search\CollectionFilter::__construct + * covers \Magento\Catalog\Model\Layer\Search\CollectionFilter::filter + * covers \Magento\Catalog\Model\Layer\Search\CollectionFilter::__construct */ public function testFilter() { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/FilterableAttributeListTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/FilterableAttributeListTest.php index 4c2b9e41b2d6c..73d9ae86b252c 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/FilterableAttributeListTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/FilterableAttributeListTest.php @@ -59,7 +59,7 @@ protected function setUp() } /** - * @covers \Magento\Catalog\Model\Layer\Search\FilterableAttributeList::_prepareAttributeCollection() + * covers \Magento\Catalog\Model\Layer\Search\FilterableAttributeList::_prepareAttributeCollection() */ public function testGetList() { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/StateKeyTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/StateKeyTest.php index fec85625a7bdf..79ca9b7704080 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/StateKeyTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Layer/Search/StateKeyTest.php @@ -46,8 +46,8 @@ protected function setUp() } /** - * @covers \Magento\CatalogSearch\Model\Layer\Search\StateKey::toString - * @covers \Magento\CatalogSearch\Model\Layer\Search\StateKey::__construct + * covers \Magento\CatalogSearch\Model\Layer\Search\StateKey::toString + * covers \Magento\CatalogSearch\Model\Layer\Search\StateKey::__construct */ public function testToString() { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Plugin/LogTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Plugin/LogTest.php index 416cd3b91c4a7..6efc92d6ba4a3 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Plugin/LogTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Plugin/LogTest.php @@ -42,7 +42,7 @@ protected function setUp() } /** - * @covers \Magento\Catalog\Model\Plugin\Log::afterClean + * covers \Magento\Catalog\Model\Plugin\Log::afterClean */ public function testAfterClean() { diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ReservedAttributeListTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ReservedAttributeListTest.php index 12bacab7a5f39..68f17b9305e8f 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ReservedAttributeListTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/ReservedAttributeListTest.php @@ -18,7 +18,7 @@ protected function setUp() } /** - * @covers \Magento\Catalog\Model\Product\ReservedAttributeList::isReservedAttribute + * covers \Magento\Catalog\Model\Product\ReservedAttributeList::isReservedAttribute * @dataProvider dataProvider */ public function testIsReservedAttribute($isUserDefined, $attributeCode, $expected) diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/UrlTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/UrlTest.php index d6adddac76b3f..8f349da5741ca 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/UrlTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Model/Product/UrlTest.php @@ -101,9 +101,9 @@ public function testFormatUrlKey() /** * @dataProvider getUrlDataProvider - * @covers Magento\Catalog\Model\Product\Url::getUrl - * @covers Magento\Catalog\Model\Product\Url::getUrlInStore - * @covers Magento\Catalog\Model\Product\Url::getProductUrl + * covers Magento\Catalog\Model\Product\Url::getUrl + * covers Magento\Catalog\Model\Product\Url::getUrlInStore + * covers Magento\Catalog\Model\Product\Url::getProductUrl * * @param $getUrlMethod * @param $routePath diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php index 5d5065baf36c2..b24c366b15595 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Pricing/Price/TierPriceTest.php @@ -105,10 +105,10 @@ protected function setUp() /** * Test base initialization of tier price * - * @covers \Magento\Catalog\Pricing\Price\TierPrice::__construct - * @covers \Magento\Catalog\Pricing\Price\TierPrice::getValue - * @covers \Magento\Catalog\Pricing\Price\TierPrice::getStoredTierPrices - * @covers \Magento\Catalog\Pricing\Price\TierPrice::canApplyTierPrice + * covers \Magento\Catalog\Pricing\Price\TierPrice::__construct + * covers \Magento\Catalog\Pricing\Price\TierPrice::getValue + * covers \Magento\Catalog\Pricing\Price\TierPrice::getStoredTierPrices + * covers \Magento\Catalog\Pricing\Price\TierPrice::canApplyTierPrice * @dataProvider providerForBaseInitialization */ public function testBaseInitialization($tierPrices, $expectedValue) @@ -203,8 +203,8 @@ public function providerForBaseInitialization() /** * Test getter stored tier prices from eav model * - * @covers \Magento\Catalog\Pricing\Price\TierPrice::__construct - * @covers \Magento\Catalog\Pricing\Price\TierPrice::getStoredTierPrices + * covers \Magento\Catalog\Pricing\Price\TierPrice::__construct + * covers \Magento\Catalog\Pricing\Price\TierPrice::getStoredTierPrices */ public function testGetterStoredTierPrices() { @@ -247,13 +247,13 @@ public function testGetterStoredTierPrices() } /** - * @covers \Magento\Catalog\Pricing\Price\TierPrice::__construct - * @covers \Magento\Catalog\Pricing\Price\TierPrice::getTierPriceList - * @covers \Magento\Catalog\Pricing\Price\TierPrice::getStoredTierPrices - * @covers \Magento\Catalog\Pricing\Price\TierPrice::applyAdjustment - * @covers \Magento\Catalog\Pricing\Price\TierPrice::getTierPriceCount - * @covers \Magento\Catalog\Pricing\Price\TierPrice::filterTierPrices - * @covers \Magento\Catalog\Pricing\Price\TierPrice::getBasePrice + * covers \Magento\Catalog\Pricing\Price\TierPrice::__construct + * covers \Magento\Catalog\Pricing\Price\TierPrice::getTierPriceList + * covers \Magento\Catalog\Pricing\Price\TierPrice::getStoredTierPrices + * covers \Magento\Catalog\Pricing\Price\TierPrice::applyAdjustment + * covers \Magento\Catalog\Pricing\Price\TierPrice::getTierPriceCount + * covers \Magento\Catalog\Pricing\Price\TierPrice::filterTierPrices + * covers \Magento\Catalog\Pricing\Price\TierPrice::getBasePrice * @dataProvider providerForGetterTierPriceList */ public function testGetterTierPriceList($tierPrices, $basePrice, $expectedResult) @@ -353,9 +353,9 @@ public function providerForGetterTierPriceList() } /** - * @covers \Magento\Catalog\Pricing\Price\TierPrice::__construct - * @covers \Magento\Catalog\Pricing\Price\TierPrice::getSavePercent - * @covers \Magento\Catalog\Pricing\Price\TierPrice::getBasePrice + * covers \Magento\Catalog\Pricing\Price\TierPrice::__construct + * covers \Magento\Catalog\Pricing\Price\TierPrice::getSavePercent + * covers \Magento\Catalog\Pricing\Price\TierPrice::getBasePrice * @dataProvider dataProviderGetSavePercent */ public function testGetSavePercent($basePrice, $tierPrice, $savedPercent) diff --git a/dev/tests/unit/testsuite/Magento/CatalogImportExport/Model/Import/Product/Type/OptionTest.php b/dev/tests/unit/testsuite/Magento/CatalogImportExport/Model/Import/Product/Type/OptionTest.php index fd6d0ed19124c..9723946c2e336 100644 --- a/dev/tests/unit/testsuite/Magento/CatalogImportExport/Model/Import/Product/Type/OptionTest.php +++ b/dev/tests/unit/testsuite/Magento/CatalogImportExport/Model/Import/Product/Type/OptionTest.php @@ -558,7 +558,7 @@ public function verifyInsertOnDuplicate($table, array $data, array $fields = []) } /** - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::getEntityTypeCode + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::getEntityTypeCode */ public function testGetEntityTypeCode() { @@ -566,15 +566,15 @@ public function testGetEntityTypeCode() } /** - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::importData - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_importData - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_saveOptions - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_saveTitles - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_savePrices - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_saveSpecificTypeValues - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_saveSpecificTypePrices - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_saveSpecificTypeTitles - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_updateProducts + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::importData + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_importData + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_saveOptions + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_saveTitles + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_savePrices + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_saveSpecificTypeValues + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_saveSpecificTypePrices + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_saveSpecificTypeTitles + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_updateProducts */ public function testImportDataAppendBehavior() { @@ -582,8 +582,8 @@ public function testImportDataAppendBehavior() } /** - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_importData - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_deleteEntities + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_importData + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_deleteEntities */ public function testImportDataDeleteBehavior() { @@ -632,7 +632,7 @@ protected function _csvToArray($content, $entityId = null) /** * Test for validation of row without custom option * - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_isRowWithCustomOption + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_isRowWithCustomOption */ public function testValidateRowNoCustomOption() { @@ -646,15 +646,15 @@ public function testValidateRowNoCustomOption() * @param array $rowData * @param array $errors * - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::validateRow - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_isRowWithCustomOption - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_isMainOptionRow - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_isSecondaryOptionRow - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_validateMainRow - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_validateMainRowAdditionalData - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_validateSecondaryRow - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_validateSpecificTypeParameters - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_validateSpecificParameterData + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::validateRow + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_isRowWithCustomOption + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_isMainOptionRow + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_isSecondaryOptionRow + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_validateMainRow + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_validateMainRowAdditionalData + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_validateSecondaryRow + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_validateSpecificTypeParameters + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_validateSpecificParameterData * @dataProvider validateRowDataProvider */ public function testValidateRow(array $rowData, array $errors) @@ -675,11 +675,11 @@ public function testValidateRow(array $rowData, array $errors) * @param string|null $behavior * @param int $numberOfValidations * - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::validateAmbiguousData - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_findNewOptionsWithTheSameTitles - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_findOldOptionsWithTheSameTitles - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_findNewOldOptionsTypeMismatch - * @covers \Magento\CatalogImportExport\Model\Import\Product\Option::_saveNewOptionData + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::validateAmbiguousData + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_findNewOptionsWithTheSameTitles + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_findOldOptionsWithTheSameTitles + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_findNewOldOptionsTypeMismatch + * covers \Magento\CatalogImportExport\Model\Import\Product\Option::_saveNewOptionData * @dataProvider validateAmbiguousDataDataProvider */ public function testValidateAmbiguousData( diff --git a/dev/tests/unit/testsuite/Magento/Centinel/Model/ServiceTest.php b/dev/tests/unit/testsuite/Magento/Centinel/Model/ServiceTest.php index 8cea00f4389b2..bf694d1e5eaf2 100644 --- a/dev/tests/unit/testsuite/Magento/Centinel/Model/ServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Centinel/Model/ServiceTest.php @@ -12,8 +12,8 @@ class ServiceTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Centinel\Model\Service::getAuthenticationStartUrl - * @covers \Magento\Centinel\Model\Service::_getUrl + * covers \Magento\Centinel\Model\Service::getAuthenticationStartUrl + * covers \Magento\Centinel\Model\Service::_getUrl */ public function testGetAuthenticationStartUrl() { diff --git a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php index ecd5d2668bd31..57f78f1cfc1bc 100644 --- a/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php +++ b/dev/tests/unit/testsuite/Magento/Checkout/Block/Cart/Item/RendererTest.php @@ -112,8 +112,8 @@ public function testGetIdentitiesFromEmptyItem() } /** - * @covers \Magento\Checkout\Block\Cart\Item\Renderer::getProductPriceHtml - * @covers \Magento\Checkout\Block\Cart\Item\Renderer::getPriceRender + * covers \Magento\Checkout\Block\Cart\Item\Renderer::getProductPriceHtml + * covers \Magento\Checkout\Block\Cart\Item\Renderer::getPriceRender */ public function testGetProductPriceHtml() { diff --git a/dev/tests/unit/testsuite/Magento/CheckoutAgreements/Model/AgreementTest.php b/dev/tests/unit/testsuite/Magento/CheckoutAgreements/Model/AgreementTest.php index 5b70c35af5351..82ad4b287945e 100644 --- a/dev/tests/unit/testsuite/Magento/CheckoutAgreements/Model/AgreementTest.php +++ b/dev/tests/unit/testsuite/Magento/CheckoutAgreements/Model/AgreementTest.php @@ -19,7 +19,7 @@ protected function setUp() } /** - * @covers \Magento\CheckoutAgreements\Model\Agreement::validateData + * covers \Magento\CheckoutAgreements\Model\Agreement::validateData * * @dataProvider validateDataDataProvider * @param \Magento\Framework\Object $inputData diff --git a/dev/tests/unit/testsuite/Magento/Cms/Block/Adminhtml/Block/EditTest.php b/dev/tests/unit/testsuite/Magento/Cms/Block/Adminhtml/Block/EditTest.php index c03ec9610ae03..3009e64d0d884 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Block/Adminhtml/Block/EditTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Block/Adminhtml/Block/EditTest.php @@ -6,7 +6,7 @@ namespace Magento\Cms\Block\Adminhtml\Block; /** - * @covers \Magento\Cms\Block\Adminhtml\Block\Edit + * covers \Magento\Cms\Block\Adminhtml\Block\Edit */ class EditTest extends \PHPUnit_Framework_TestCase { @@ -59,7 +59,7 @@ protected function setUp() } /** - * @covers \Magento\Cms\Block\Adminhtml\Block\Edit::getHeaderText + * covers \Magento\Cms\Block\Adminhtml\Block\Edit::getHeaderText * @param integer|null $modelBlockId * * @dataProvider getHeaderTextDataProvider diff --git a/dev/tests/unit/testsuite/Magento/Cms/Block/Adminhtml/Block/Widget/ChooserTest.php b/dev/tests/unit/testsuite/Magento/Cms/Block/Adminhtml/Block/Widget/ChooserTest.php index 77c4bf4ae5c57..2577c587d7fab 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Block/Adminhtml/Block/Widget/ChooserTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Block/Adminhtml/Block/Widget/ChooserTest.php @@ -6,7 +6,7 @@ namespace Magento\Cms\Block\Adminhtml\Block\Widget; /** - * @covers \Magento\Cms\Block\Adminhtml\Block\Widget\Chooser + * covers \Magento\Cms\Block\Adminhtml\Block\Widget\Chooser */ class ChooserTest extends \PHPUnit_Framework_TestCase { @@ -127,7 +127,7 @@ protected function setUp() } /** - * @covers \Magento\Cms\Block\Adminhtml\Block\Widget\Chooser::prepareElementHtml + * covers \Magento\Cms\Block\Adminhtml\Block\Widget\Chooser::prepareElementHtml * @param string $elementValue * @param integer|null $modelBlockId * @@ -231,7 +231,7 @@ public function prepareElementHtmlDataProvider() } /** - * @covers \Magento\Cms\Block\Adminhtml\Block\Widget\Chooser::getGridUrl + * covers \Magento\Cms\Block\Adminhtml\Block\Widget\Chooser::getGridUrl */ public function testGetGridUrl() { diff --git a/dev/tests/unit/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/DirectiveTest.php b/dev/tests/unit/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/DirectiveTest.php index 021506cdbb634..c174778799b73 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/DirectiveTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Controller/Adminhtml/Wysiwyg/DirectiveTest.php @@ -6,7 +6,7 @@ namespace Magento\Cms\Controller\Adminhtml\Wysiwyg; /** - * @covers \Magento\Cms\Controller\Adminhtml\Wysiwyg\Directive + * covers \Magento\Cms\Controller\Adminhtml\Wysiwyg\Directive */ class DirectiveTest extends \PHPUnit_Framework_TestCase { @@ -138,7 +138,7 @@ protected function setUp() } /** - * @covers \Magento\Cms\Controller\Adminhtml\Wysiwyg\Directive::execute + * covers \Magento\Cms\Controller\Adminhtml\Wysiwyg\Directive::execute */ public function testExecute() { @@ -168,7 +168,7 @@ public function testExecute() } /** - * @covers \Magento\Cms\Controller\Adminhtml\Wysiwyg\Directive::execute + * covers \Magento\Cms\Controller\Adminhtml\Wysiwyg\Directive::execute */ public function testExecuteException() { diff --git a/dev/tests/unit/testsuite/Magento/Cms/Helper/PageTest.php b/dev/tests/unit/testsuite/Magento/Cms/Helper/PageTest.php index 8ce867543bc1e..c2a63957a2e93 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Helper/PageTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Helper/PageTest.php @@ -6,7 +6,7 @@ namespace Magento\Cms\Helper; /** - * @covers \Magento\Cms\Helper\Page + * covers \Magento\Cms\Helper\Page * * @SuppressWarnings(PHPMD.TooManyFields) * @SuppressWarnings(PHPMD.CouplingBetweenObjects) @@ -207,7 +207,7 @@ protected function setUp() } /** - * @covers \Magento\Cms\Helper\Page::renderPageExtended + * covers \Magento\Cms\Helper\Page::renderPageExtended * @param integer|null $pageId * @param integer|null $internalPageId * @param integer $pageLoadResultIndex @@ -434,7 +434,7 @@ public function renderPageExtendedDataProvider() } /** - * @covers \Magento\Cms\Helper\Page::getPageUrl + * covers \Magento\Cms\Helper\Page::getPageUrl * @param integer|null $pageId * @param integer|null $internalPageId * @param integer $pageLoadResultIndex diff --git a/dev/tests/unit/testsuite/Magento/Cms/Model/ObserverTest.php b/dev/tests/unit/testsuite/Magento/Cms/Model/ObserverTest.php index 0a9c01e20b955..b5279fbb23894 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Model/ObserverTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Model/ObserverTest.php @@ -6,7 +6,7 @@ namespace Magento\Cms\Model; /** - * @covers \Magento\Cms\Model\Observer + * covers \Magento\Cms\Model\Observer */ class ObserverTest extends \PHPUnit_Framework_TestCase { @@ -92,7 +92,7 @@ protected function setUp() } /** - * @covers \Magento\Cms\Model\Observer::noRoute + * covers \Magento\Cms\Model\Observer::noRoute */ public function testNoRoute() { @@ -129,7 +129,7 @@ public function testNoRoute() } /** - * @covers \Magento\Cms\Model\Observer::noCookies + * covers \Magento\Cms\Model\Observer::noCookies * @param string $pageUrl * @dataProvider noCookiesDataProvider */ diff --git a/dev/tests/unit/testsuite/Magento/Cms/Model/PageTest.php b/dev/tests/unit/testsuite/Magento/Cms/Model/PageTest.php index 73ba0c768c541..1195aa0c4a3b0 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Model/PageTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Model/PageTest.php @@ -6,7 +6,7 @@ namespace Magento\Cms\Model; /** - * @covers \Magento\Cms\Model\Page + * covers \Magento\Cms\Model\Page */ class PageTest extends \PHPUnit_Framework_TestCase { @@ -91,7 +91,7 @@ protected function setUp() } /** - * @covers \Magento\Cms\Model\Page::noRoutePage + * covers \Magento\Cms\Model\Page::noRoutePage */ public function testNoRoutePage() { @@ -99,7 +99,7 @@ public function testNoRoutePage() } /** - * @covers \Magento\Cms\Model\Page::checkIdentifier + * covers \Magento\Cms\Model\Page::checkIdentifier */ public function testCheckIdentifier() { diff --git a/dev/tests/unit/testsuite/Magento/Cms/Model/Template/FilterProviderTest.php b/dev/tests/unit/testsuite/Magento/Cms/Model/Template/FilterProviderTest.php index c8f2720780ad3..4609b17236bbf 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Model/Template/FilterProviderTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Model/Template/FilterProviderTest.php @@ -31,7 +31,7 @@ protected function setUp() } /** - * @covers \Magento\Cms\Model\Template\FilterProvider::getBlockFilter + * covers \Magento\Cms\Model\Template\FilterProvider::getBlockFilter */ public function testGetBlockFilter() { @@ -39,7 +39,7 @@ public function testGetBlockFilter() } /** - * @covers \Magento\Cms\Model\Template\FilterProvider::getPageFilter + * covers \Magento\Cms\Model\Template\FilterProvider::getPageFilter */ public function testGetPageFilter() { @@ -47,7 +47,7 @@ public function testGetPageFilter() } /** - * @covers \Magento\Cms\Model\Template\FilterProvider::getPageFilter + * covers \Magento\Cms\Model\Template\FilterProvider::getPageFilter */ public function testGetPageFilterInnerCache() { @@ -57,7 +57,7 @@ public function testGetPageFilterInnerCache() } /** - * @covers \Magento\Cms\Model\Template\FilterProvider::getPageFilter + * covers \Magento\Cms\Model\Template\FilterProvider::getPageFilter * @expectedException \Exception */ public function testGetPageWrongInstance() diff --git a/dev/tests/unit/testsuite/Magento/Cms/Model/Template/FilterTest.php b/dev/tests/unit/testsuite/Magento/Cms/Model/Template/FilterTest.php index b8e32ba2f1a74..56c7620186e52 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Model/Template/FilterTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Model/Template/FilterTest.php @@ -6,7 +6,7 @@ namespace Magento\Cms\Model\Template; /** - * @covers \Magento\Cms\Model\Template\Filter + * covers \Magento\Cms\Model\Template\Filter */ class FilterTest extends \PHPUnit_Framework_TestCase { @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Cms\Model\Template\Filter::mediaDirective + * covers \Magento\Cms\Model\Template\Filter::mediaDirective */ public function testMediaDirective() { diff --git a/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php index b2e5d8fb32b61..80a5a2f648723 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/ConfigTest.php @@ -6,7 +6,7 @@ namespace Magento\Cms\Model\Wysiwyg; /** - * @covers \Magento\Cms\Model\Wysiwyg\Config + * covers \Magento\Cms\Model\Wysiwyg\Config */ class ConfigTest extends \PHPUnit_Framework_TestCase { @@ -116,7 +116,7 @@ protected function setUp() } /** - * @covers \Magento\Cms\Model\Wysiwyg\Config::getConfig + * covers \Magento\Cms\Model\Wysiwyg\Config::getConfig * @param array $data * @param boolean $isAuthorizationAllowed * @param array $expectedResults @@ -187,7 +187,7 @@ public function getConfigDataProvider() } /** - * @covers \Magento\Cms\Model\Wysiwyg\Config::getSkinImagePlaceholderPath + * covers \Magento\Cms\Model\Wysiwyg\Config::getSkinImagePlaceholderPath */ public function testGetSkinImagePlaceholderPath() { @@ -213,7 +213,7 @@ public function testGetSkinImagePlaceholderPath() } /** - * @covers \Magento\Cms\Model\Wysiwyg\Config::isEnabled + * covers \Magento\Cms\Model\Wysiwyg\Config::isEnabled * @param string $wysiwygState * @param boolean $expectedResult * @@ -245,7 +245,7 @@ public function isEnabledDataProvider() } /** - * @covers \Magento\Cms\Model\Wysiwyg\Config::isHidden + * covers \Magento\Cms\Model\Wysiwyg\Config::isHidden * @param string $status * @param boolean $expectedResult * diff --git a/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php b/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php index b982c959cb798..58cc7634ed07b 100644 --- a/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php +++ b/dev/tests/unit/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php @@ -223,7 +223,7 @@ protected function setUp() } /** - * @covers \Magento\Cms\Model\Wysiwyg\Images\Storage::getResizeWidth + * covers \Magento\Cms\Model\Wysiwyg\Images\Storage::getResizeWidth */ public function testGetResizeWidth() { @@ -231,7 +231,7 @@ public function testGetResizeWidth() } /** - * @covers \Magento\Cms\Model\Wysiwyg\Images\Storage::getResizeHeight + * covers \Magento\Cms\Model\Wysiwyg\Images\Storage::getResizeHeight */ public function testGetResizeHeight() { @@ -239,7 +239,7 @@ public function testGetResizeHeight() } /** - * @covers \Magento\Cms\Model\Wysiwyg\Images\Storage::deleteDirectory + * covers \Magento\Cms\Model\Wysiwyg\Images\Storage::deleteDirectory */ public function testDeleteDirectoryOverRoot() { @@ -251,7 +251,7 @@ public function testDeleteDirectoryOverRoot() } /** - * @covers \Magento\Cms\Model\Wysiwyg\Images\Storage::deleteDirectory + * covers \Magento\Cms\Model\Wysiwyg\Images\Storage::deleteDirectory */ public function testDeleteRootDirectory() { diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/TranslatorTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/TranslatorTest.php index 81b1f45c1ceb4..36944b3a6dc0c 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Layout/TranslatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Layout/TranslatorTest.php @@ -49,7 +49,7 @@ protected function setUp() } /** - * @covers \Magento\Core\Model\Layout\Translator::translateActionParameters + * covers \Magento\Core\Model\Layout\Translator::translateActionParameters */ public function testTranslateActionParametersWithNonTranslatedArgument() { @@ -60,7 +60,7 @@ public function testTranslateActionParametersWithNonTranslatedArgument() } /** - * @covers \Magento\Core\Model\Layout\Translator::translateActionParameters + * covers \Magento\Core\Model\Layout\Translator::translateActionParameters */ public function testTranslateActionParametersWithTranslatedArgument() { @@ -72,7 +72,7 @@ public function testTranslateActionParametersWithTranslatedArgument() } /** - * @covers \Magento\Core\Model\Layout\Translator::translateActionParameters + * covers \Magento\Core\Model\Layout\Translator::translateActionParameters */ public function testTranslateActionParametersWithHierarchyTranslatedArgumentAndNonStringParam() { @@ -84,7 +84,7 @@ public function testTranslateActionParametersWithHierarchyTranslatedArgumentAndN } /** - * @covers \Magento\Core\Model\Layout\Translator::translateActionParameters + * covers \Magento\Core\Model\Layout\Translator::translateActionParameters */ public function testTranslateActionParametersWithoutModule() { @@ -96,7 +96,7 @@ public function testTranslateActionParametersWithoutModule() } /** - * @covers \Magento\Core\Model\Layout\Translator::translateArgument + * covers \Magento\Core\Model\Layout\Translator::translateArgument */ public function testTranslateArgumentWithDefaultModuleAndSelfTranslatedMode() { @@ -105,7 +105,7 @@ public function testTranslateArgumentWithDefaultModuleAndSelfTranslatedMode() } /** - * @covers \Magento\Core\Model\Layout\Translator::translateArgument + * covers \Magento\Core\Model\Layout\Translator::translateArgument */ public function testTranslateArgumentWithoutModuleAndNoSelfTranslatedMode() { @@ -114,7 +114,7 @@ public function testTranslateArgumentWithoutModuleAndNoSelfTranslatedMode() } /** - * @covers \Magento\Core\Model\Layout\Translator::translateArgument + * covers \Magento\Core\Model\Layout\Translator::translateArgument */ public function testTranslateArgumentViaParentNodeWithParentModule() { @@ -123,7 +123,7 @@ public function testTranslateArgumentViaParentNodeWithParentModule() } /** - * @covers \Magento\Core\Model\Layout\Translator::translateArgument + * covers \Magento\Core\Model\Layout\Translator::translateArgument */ public function testTranslateArgumentViaParentNodeWithOwnModule() { @@ -132,7 +132,7 @@ public function testTranslateArgumentViaParentNodeWithOwnModule() } /** - * @covers \Magento\Core\Model\Layout\Translator::translateArgument + * covers \Magento\Core\Model\Layout\Translator::translateArgument */ public function testTranslateArgumentViaParentWithNodeThatIsNotInTranslateList() { diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Link/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Link/CollectionTest.php index 613b7797ad091..486461726cd9f 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Link/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Link/CollectionTest.php @@ -77,7 +77,7 @@ public function filterFlagDataProvider() } /** - * @covers \Magento\Core\Model\Resource\Layout\Link\Collection::_joinWithUpdate + * covers \Magento\Core\Model\Resource\Layout\Link\Collection::_joinWithUpdate */ public function testJoinWithUpdate() { diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Update/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Update/CollectionTest.php index cd08654de97fa..ed3bdc8f97e5f 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Update/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Resource/Layout/Update/CollectionTest.php @@ -49,7 +49,7 @@ public function testAddStoreFilter() } /** - * @covers \Magento\Core\Model\Resource\Layout\Update\Collection::_joinWithLink + * covers \Magento\Core\Model\Resource\Layout\Update\Collection::_joinWithLink */ public function testJoinWithLink() { diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/StagingTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/StagingTest.php index 4a272233f8a75..3caacee155e1a 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/StagingTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/StagingTest.php @@ -12,7 +12,7 @@ class StagingTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Core\Model\Theme\Domain\Staging::updateFromStagingTheme + * covers \Magento\Core\Model\Theme\Domain\Staging::updateFromStagingTheme */ public function testUpdateFromStagingTheme() { diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php index dd9477d7c90ab..03001028c6525 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Domain/VirtualTest.php @@ -14,7 +14,7 @@ class VirtualTest extends \PHPUnit_Framework_TestCase /** * Test get existing staging theme * - * @covers \Magento\Core\Model\Theme\Domain\Virtual::getStagingTheme + * covers \Magento\Core\Model\Theme\Domain\Virtual::getStagingTheme */ public function testGetStagingThemeExisting() { @@ -52,7 +52,7 @@ public function testGetStagingThemeExisting() /** * Test creating staging theme * - * @covers \Magento\Core\Model\Theme\Domain\Virtual::getStagingTheme + * covers \Magento\Core\Model\Theme\Domain\Virtual::getStagingTheme */ public function testGetStagingThemeNew() { @@ -128,7 +128,7 @@ public function testGetStagingThemeNew() /** * Test for is assigned method * - * @covers \Magento\Core\Model\Theme\Domain\Virtual::isAssigned + * covers \Magento\Core\Model\Theme\Domain\Virtual::isAssigned */ public function testIsAssigned() { diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php index 73dd5f28bcb09..78e6a2fa74c37 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/Image/PathTest.php @@ -115,7 +115,7 @@ public function testGetPreviewImagePath() } /** - * @covers Magento\Core\Model\Theme\Image\Path::getPreviewImageDefaultUrl + * covers Magento\Core\Model\Theme\Image\Path::getPreviewImageDefaultUrl */ public function testDefaultPreviewImageUrlGetter() { @@ -125,7 +125,7 @@ public function testDefaultPreviewImageUrlGetter() } /** - * @covers \Magento\Core\Model\Theme\Image\Path::getImagePreviewDirectory + * covers \Magento\Core\Model\Theme\Image\Path::getImagePreviewDirectory */ public function testImagePreviewDirectoryGetter() { @@ -140,7 +140,7 @@ public function testImagePreviewDirectoryGetter() } /** - * @covers \Magento\Core\Model\Theme\Image\Path::getTemporaryDirectory + * covers \Magento\Core\Model\Theme\Image\Path::getTemporaryDirectory */ public function testTemporaryDirectoryGetter() { diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ValidationTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ValidationTest.php index 5aaea8f25c2c8..ad35cbb70dfa7 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ValidationTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/Theme/ValidationTest.php @@ -16,7 +16,7 @@ class ValidationTest extends \PHPUnit_Framework_TestCase * @param bool $result * @param array $messages * - * @covers \Magento\Framework\View\Design\Theme\Validator::validate + * covers \Magento\Framework\View\Design\Theme\Validator::validate * @dataProvider dataProviderValidate */ public function testValidate(array $data, $result, array $messages) diff --git a/dev/tests/unit/testsuite/Magento/Core/Model/ThemeTest.php b/dev/tests/unit/testsuite/Magento/Core/Model/ThemeTest.php index 2b979e159ae60..6e97d746d0a06 100644 --- a/dev/tests/unit/testsuite/Magento/Core/Model/ThemeTest.php +++ b/dev/tests/unit/testsuite/Magento/Core/Model/ThemeTest.php @@ -70,7 +70,7 @@ protected function tearDown() } /** - * @covers \Magento\Core\Model\Theme::getThemeImage + * covers \Magento\Core\Model\Theme::getThemeImage */ public function testThemeImageGetter() { @@ -82,7 +82,7 @@ public function testThemeImageGetter() * @dataProvider isVirtualDataProvider * @param int $type * @param string $isVirtual - * @covers \Magento\Core\Model\Theme::isVirtual + * covers \Magento\Core\Model\Theme::isVirtual */ public function testIsVirtual($type, $isVirtual) { @@ -108,7 +108,7 @@ public function isVirtualDataProvider() * @dataProvider isPhysicalDataProvider * @param int $type * @param string $isPhysical - * @covers \Magento\Core\Model\Theme::isPhysical + * covers \Magento\Core\Model\Theme::isPhysical */ public function testIsPhysical($type, $isPhysical) { @@ -134,7 +134,7 @@ public function isPhysicalDataProvider() * @dataProvider isVisibleDataProvider * @param int $type * @param string $isVisible - * @covers \Magento\Core\Model\Theme::isVisible + * covers \Magento\Core\Model\Theme::isVisible */ public function testIsVisible($type, $isVisible) { @@ -162,7 +162,7 @@ public function isVisibleDataProvider() * @dataProvider isDeletableDataProvider * @param string $themeType * @param bool $isDeletable - * @covers \Magento\Core\Model\Theme::isDeletable + * covers \Magento\Core\Model\Theme::isDeletable */ public function testIsDeletable($themeType, $isDeletable) { diff --git a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/LoginPostTest.php b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/LoginPostTest.php index 7ee84e017a61a..2fef91447eabf 100644 --- a/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/LoginPostTest.php +++ b/dev/tests/unit/testsuite/Magento/Customer/Controller/Account/LoginPostTest.php @@ -167,7 +167,7 @@ protected function setUp() } /** - * @covers \Magento\Customer\Controller\Account::getAllowedActions + * covers \Magento\Customer\Controller\Account::getAllowedActions */ public function testGetAllowedActions() { diff --git a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Export/AddressTest.php b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Export/AddressTest.php index 48c4befe216c1..3b6ff50ac99f3 100644 --- a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Export/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Export/AddressTest.php @@ -245,7 +245,7 @@ public function iterate(\Magento\Framework\Data\Collection\Db $collection, $page /** * Test for method exportItem() * - * @covers \Magento\CustomerImportExport\Model\Export\Address::exportItem + * covers \Magento\CustomerImportExport\Model\Export\Address::exportItem */ public function testExportItem() { diff --git a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Export/CustomerTest.php b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Export/CustomerTest.php index 0d62e8d088eb4..9b07bb4257f82 100644 --- a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Export/CustomerTest.php +++ b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Export/CustomerTest.php @@ -184,7 +184,7 @@ public function getStores($withDefault = false) /** * Test for method exportItem() * - * @covers \Magento\CustomerImportExport\Model\Export\Customer::exportItem + * covers \Magento\CustomerImportExport\Model\Export\Customer::exportItem */ public function testExportItem() { diff --git a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php index 309e4732d5b5d..367dfcf9d837c 100644 --- a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php +++ b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Import/AddressTest.php @@ -572,8 +572,8 @@ public function testValidateRowForUpdate(array $rowData, array $errors, $isValid * Test Address::validateRow() * with 2 rows with identical PKs in case when add/update behavior is performed * - * @covers \Magento\CustomerImportExport\Model\Import\Address::validateRow - * @covers \Magento\CustomerImportExport\Model\Import\Address::_validateRowForUpdate + * covers \Magento\CustomerImportExport\Model\Import\Address::validateRow + * covers \Magento\CustomerImportExport\Model\Import\Address::_validateRowForUpdate */ public function testValidateRowForUpdateDuplicateRows() { @@ -622,7 +622,7 @@ public function testValidateRowForUpdateDuplicateRows() /** * Test Address::validateRow() with delete action * - * @covers \Magento\CustomerImportExport\Model\Import\Address::validateRow + * covers \Magento\CustomerImportExport\Model\Import\Address::validateRow * @dataProvider validateRowForDeleteDataProvider * * @param array $rowData @@ -671,7 +671,7 @@ public function testGetDefaultAddressAttributeMapping() /** * Test if correct methods are invoked according to different custom behaviours * - * @covers \Magento\CustomerImportExport\Model\Import\Address::_importData + * covers \Magento\CustomerImportExport\Model\Import\Address::_importData */ public function testImportDataWithCustomBehaviour() { diff --git a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Resource/Import/CustomerComposite/DataTest.php b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Resource/Import/CustomerComposite/DataTest.php index 7598086491fc3..b22da5d729f85 100644 --- a/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Resource/Import/CustomerComposite/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/CustomerImportExport/Model/Resource/Import/CustomerComposite/DataTest.php @@ -82,9 +82,9 @@ protected function _getDependencies($entityType, $bunchData) } /** - * @covers \Magento\CustomerImportExport\Model\Resource\Import\CustomerComposite\Data::getNextBunch - * @covers \Magento\CustomerImportExport\Model\Resource\Import\CustomerComposite\Data::_prepareRow - * @covers \Magento\CustomerImportExport\Model\Resource\Import\CustomerComposite\Data::_prepareAddressRowData + * covers \Magento\CustomerImportExport\Model\Resource\Import\CustomerComposite\Data::getNextBunch + * covers \Magento\CustomerImportExport\Model\Resource\Import\CustomerComposite\Data::_prepareRow + * covers \Magento\CustomerImportExport\Model\Resource\Import\CustomerComposite\Data::_prepareAddressRowData * * @dataProvider getNextBunchDataProvider * @param string $entityType diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php index 7c9dc0d9ced12..adbc33ebcfb3a 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/ContainerTest.php @@ -37,8 +37,8 @@ protected function _getBlockArguments() } /** - * @covers \Magento\DesignEditor\Block\Adminhtml\Editor\Container::setFrameUrl - * @covers \Magento\DesignEditor\Block\Adminhtml\Editor\Container::getFrameUrl + * covers \Magento\DesignEditor\Block\Adminhtml\Editor\Container::setFrameUrl + * covers \Magento\DesignEditor\Block\Adminhtml\Editor\Container::getFrameUrl */ public function testGetSetFrameUrl() { @@ -52,7 +52,7 @@ public function testGetSetFrameUrl() } /** - * @covers \Magento\DesignEditor\Block\Adminhtml\Editor\Container::_prepareLayout + * covers \Magento\DesignEditor\Block\Adminhtml\Editor\Container::_prepareLayout */ public function testPrepareLayout() { diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/CustomTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/CustomTest.php index bca4f7ab56496..1f56fcc69ca15 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/CustomTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/CustomTest.php @@ -80,7 +80,7 @@ protected function tearDown() } /** - * @covers \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Custom::getDownloadCustomCssUrl + * covers \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Custom::getDownloadCustomCssUrl */ public function testGetDownloadCustomCssUrl() { diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/JsTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/JsTest.php index 91a0957b311a4..6d46a163f7b8c 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/JsTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/Editor/Tools/Code/JsTest.php @@ -88,7 +88,7 @@ protected function tearDown() } /** - * @covers \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Js::getJsUploadUrl + * covers \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Js::getJsUploadUrl */ public function testGetDownloadCustomCssUrl() { @@ -108,7 +108,7 @@ public function testGetDownloadCustomCssUrl() } /** - * @covers \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Js::getJsReorderUrl + * covers \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Js::getJsReorderUrl */ public function testGetJsReorderUrl() { @@ -128,7 +128,7 @@ public function testGetJsReorderUrl() } /** - * @covers \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Js::getTitle + * covers \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Js::getTitle */ public function testGetTitle() { @@ -136,7 +136,7 @@ public function testGetTitle() } /** - * @covers \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Js::getFiles + * covers \Magento\DesignEditor\Block\Adminhtml\Editor\Tools\Code\Js::getFiles */ public function testGetJsFiles() { diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/ThemeTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/ThemeTest.php index dc7f806a39585..8353be6230e34 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/ThemeTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Block/Adminhtml/ThemeTest.php @@ -8,9 +8,9 @@ class ThemeTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\DesignEditor\Block\Adminhtml\Theme::addButton - * @covers \Magento\DesignEditor\Block\Adminhtml\Theme::clearButtons - * @covers \Magento\DesignEditor\Block\Adminhtml\Theme::getButtonsHtml + * covers \Magento\DesignEditor\Block\Adminhtml\Theme::addButton + * covers \Magento\DesignEditor\Block\Adminhtml\Theme::clearButtons + * covers \Magento\DesignEditor\Block\Adminhtml\Theme::getButtonsHtml */ public function testButtons() { diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/BackgroundImageTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/BackgroundImageTest.php index beee60e46519d..f8b8ac4645cd5 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/BackgroundImageTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/BackgroundImageTest.php @@ -12,7 +12,7 @@ class BackgroundImageTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer\BackgroundImage::toCss + * covers \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer\BackgroundImage::toCss * @dataProvider backgroundImageData */ public function testToCss($expectedResult, $data) @@ -30,7 +30,7 @@ public function testToCss($expectedResult, $data) } /** - * @covers \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer\BackgroundImage::toCss + * covers \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer\BackgroundImage::toCss * @dataProvider backgroundImageDataClearDefault */ public function testToCssClearDefault($expectedResult, $data) diff --git a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/DefaultTest.php b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/DefaultTest.php index 5b76279eb1f06..73d85615992c1 100644 --- a/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/DefaultTest.php +++ b/dev/tests/unit/testsuite/Magento/DesignEditor/Model/Editor/QuickStyles/Renderer/DefaultTest.php @@ -12,7 +12,7 @@ class DefaultTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer\DefaultRenderer::toCss + * covers \Magento\DesignEditor\Model\Editor\Tools\QuickStyles\Renderer\DefaultRenderer::toCss * @dataProvider colorPickerData */ public function testToCss($expectedResult, $data) diff --git a/dev/tests/unit/testsuite/Magento/Eav/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Eav/Helper/DataTest.php index 88f3cf0f2b48d..97804541fa6a7 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Helper/DataTest.php @@ -67,8 +67,8 @@ public function testGetAttributeMetadata() } /** - * @covers \Magento\Eav\Helper\Data::getFrontendClasses - * @covers \Magento\Eav\Helper\Data::_getDefaultFrontendClasses + * covers \Magento\Eav\Helper\Data::getFrontendClasses + * covers \Magento\Eav\Helper\Data::_getDefaultFrontendClasses */ public function testGetFrontendClasses() { @@ -79,7 +79,7 @@ public function testGetFrontendClasses() } /** - * @covers \Magento\Eav\Helper\Data::getAttributeLockedFields + * covers \Magento\Eav\Helper\Data::getAttributeLockedFields */ public function testGetAttributeLockedFieldsNoEntityCode() { @@ -88,7 +88,7 @@ public function testGetAttributeLockedFieldsNoEntityCode() } /** - * @covers \Magento\Eav\Helper\Data::getAttributeLockedFields + * covers \Magento\Eav\Helper\Data::getAttributeLockedFields */ public function testGetAttributeLockedFieldsNonCachedLockedFiled() { @@ -100,7 +100,7 @@ public function testGetAttributeLockedFieldsNonCachedLockedFiled() } /** - * @covers \Magento\Eav\Helper\Data::getAttributeLockedFields + * covers \Magento\Eav\Helper\Data::getAttributeLockedFields */ public function testGetAttributeLockedFieldsCachedLockedFiled() { @@ -114,7 +114,7 @@ public function testGetAttributeLockedFieldsCachedLockedFiled() } /** - * @covers \Magento\Eav\Helper\Data::getAttributeLockedFields + * covers \Magento\Eav\Helper\Data::getAttributeLockedFields */ public function testGetAttributeLockedFieldsNoLockedFields() { diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/AbstractDataTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/AbstractDataTest.php index dcd0396c8c407..995a9db7b113f 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/AbstractDataTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/AbstractDataTest.php @@ -24,8 +24,8 @@ protected function setUp() } /** - * @covers \Magento\Eav\Model\Attribute\Data\AbstractData::getEntity - * @covers \Magento\Eav\Model\Attribute\Data\AbstractData::setEntity + * covers \Magento\Eav\Model\Attribute\Data\AbstractData::getEntity + * covers \Magento\Eav\Model\Attribute\Data\AbstractData::setEntity */ public function testGetEntity() { @@ -38,7 +38,7 @@ public function testGetEntity() * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Entity object is undefined * - * @covers \Magento\Eav\Model\Attribute\Data\AbstractData::getEntity + * covers \Magento\Eav\Model\Attribute\Data\AbstractData::getEntity */ public function testGetEntityWhenEntityNotSet() { @@ -46,8 +46,8 @@ public function testGetEntityWhenEntityNotSet() } /** - * @covers \Magento\Eav\Model\Attribute\Data\AbstractData::getExtractedData - * @covers \Magento\Eav\Model\Attribute\Data\AbstractData::setExtractedData + * covers \Magento\Eav\Model\Attribute\Data\AbstractData::getExtractedData + * covers \Magento\Eav\Model\Attribute\Data\AbstractData::setExtractedData * * @param string $index * @param mixed $expectedResult @@ -83,7 +83,7 @@ public function extractedDataDataProvider() } /** - * @covers \Magento\Eav\Model\Attribute\Data\AbstractData::_getRequestValue + * covers \Magento\Eav\Model\Attribute\Data\AbstractData::_getRequestValue * * @param string $requestScope * @param string $value diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/BooleanTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/BooleanTest.php index 303701bc0f24e..b15365511ccd8 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/BooleanTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/BooleanTest.php @@ -22,7 +22,7 @@ protected function setUp() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Boolean::_getOptionText + * covers \Magento\Eav\Model\Attribute\Data\Boolean::_getOptionText * * @param string $format * @param mixed $value diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/DateTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/DateTest.php index 7efe3ecddb3de..392fc24debaf5 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/DateTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/DateTest.php @@ -27,7 +27,7 @@ protected function setUp() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Date::outputValue + * covers \Magento\Eav\Model\Attribute\Data\Date::outputValue * * @param string $format * @param mixed $value @@ -70,7 +70,7 @@ public function outputValueDataProvider() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Date::validateValue + * covers \Magento\Eav\Model\Attribute\Data\Date::validateValue * * @param mixed $value * @param array $rules @@ -146,7 +146,7 @@ public function validateValueDataProvider() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Date::compactValue + * covers \Magento\Eav\Model\Attribute\Data\Date::compactValue * * @param string $value * @param string $expectedResult @@ -177,7 +177,7 @@ public function compactValueDataProvider() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Date::compactValue + * covers \Magento\Eav\Model\Attribute\Data\Date::compactValue */ public function testCompactValueWithFalseValue() { diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php index cfd756727b44a..cc02682772f7f 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/FileTest.php @@ -40,7 +40,7 @@ protected function setUp() } /** - * @covers \Magento\Eav\Model\Attribute\Data\File::outputValue + * covers \Magento\Eav\Model\Attribute\Data\File::outputValue * * @param string $format * @param mixed $value @@ -91,8 +91,8 @@ public function outputValueDataProvider() } /** - * @covers \Magento\Eav\Model\Attribute\Data\File::validateValue - * @covers \Magento\Eav\Model\Attribute\Data\File::_validateByRules + * covers \Magento\Eav\Model\Attribute\Data\File::validateValue + * covers \Magento\Eav\Model\Attribute\Data\File::_validateByRules * * @param mixed $value * @param mixed $originalValue diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php index 062f984267f96..28cee9c728f9f 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/ImageTest.php @@ -32,7 +32,7 @@ protected function setUp() * Attention: this test depends on mock of "is_uploaded_file" function in ./FileTest.php, * so validates method successfully in batch run of directory tests, separately will fail. * - * @covers \Magento\Eav\Model\Attribute\Data\Image::_validateByRules + * covers \Magento\Eav\Model\Attribute\Data\Image::_validateByRules * * @param mixed $value * @param mixed $originalValue diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/MultilineTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/MultilineTest.php index b3ac03c86b842..3e9c7d618b7a2 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/MultilineTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/MultilineTest.php @@ -28,7 +28,7 @@ protected function setUp() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Multiline::extractValue + * covers \Magento\Eav\Model\Attribute\Data\Multiline::extractValue * * @param mixed $param * @param mixed $expectedResult @@ -64,7 +64,7 @@ public function extractValueDataProvider() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Multiline::outputValue + * covers \Magento\Eav\Model\Attribute\Data\Multiline::outputValue * * @param string $format * @param mixed $expectedResult @@ -108,8 +108,8 @@ public function outputValueDataProvider() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Multiline::validateValue - * @covers \Magento\Eav\Model\Attribute\Data\Text::validateValue + * covers \Magento\Eav\Model\Attribute\Data\Multiline::validateValue + * covers \Magento\Eav\Model\Attribute\Data\Text::validateValue * * @param mixed $value * @param bool $isAttributeRequired diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/MultiselectTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/MultiselectTest.php index 79374009b0de8..612e6ddbc82d8 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/MultiselectTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/MultiselectTest.php @@ -22,7 +22,7 @@ protected function setUp() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Multiselect::extractValue + * covers \Magento\Eav\Model\Attribute\Data\Multiselect::extractValue * * @param mixed $param * @param mixed $expectedResult @@ -62,7 +62,7 @@ public function extractValueDataProvider() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Multiselect::outputValue + * covers \Magento\Eav\Model\Attribute\Data\Multiselect::outputValue * * @param string $format * @param mixed $expectedResult diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/SelectTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/SelectTest.php index 5583e3ecbe8f5..2876db56c9080 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/SelectTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Attribute/Data/SelectTest.php @@ -22,7 +22,7 @@ protected function setUp() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Select::outputValue + * covers \Magento\Eav\Model\Attribute\Data\Select::outputValue * * @param string $format * @param mixed $value @@ -70,7 +70,7 @@ public function outputValueDataProvider() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Select::validateValue + * covers \Magento\Eav\Model\Attribute\Data\Select::validateValue * * @param mixed $value * @param mixed $originalValue @@ -132,7 +132,7 @@ public function validateValueDataProvider() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Select::compactValue + * covers \Magento\Eav\Model\Attribute\Data\Select::compactValue */ public function testCompactValue() { @@ -148,7 +148,7 @@ public function testCompactValue() } /** - * @covers \Magento\Eav\Model\Attribute\Data\Select::compactValue + * covers \Magento\Eav\Model\Attribute\Data\Select::compactValue */ public function testCompactValueWithFalseValue() { diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeFactoryTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeFactoryTest.php index 50bbe21e8677c..87cc79f9d1ec2 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/AttributeFactoryTest.php @@ -43,7 +43,7 @@ protected function tearDown() } /** - * @covers \Magento\Eav\Model\AttributeFactory::createAttribute + * covers \Magento\Eav\Model\AttributeFactory::createAttribute */ public function testCreateAttribute() { diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Source/BooleanTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Source/BooleanTest.php index f35715418935e..b5253f37ecc25 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Source/BooleanTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Entity/Attribute/Source/BooleanTest.php @@ -50,7 +50,7 @@ public function testGetFlatColumns() } /** - * @covers \Magento\Eav\Model\Entity\Attribute\Source\Boolean::addValueSortToCollection + * covers \Magento\Eav\Model\Entity\Attribute\Source\Boolean::addValueSortToCollection * * @dataProvider addValueSortToCollectionDataProvider * @param string $direction diff --git a/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php b/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php index bb9e4f7e1f409..301d8ad890c44 100644 --- a/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php +++ b/dev/tests/unit/testsuite/Magento/Eav/Model/Resource/Entity/AttributeTest.php @@ -8,7 +8,7 @@ class AttributeTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Eav\Model\Resource\Entity\Attribute::_saveOption + * covers \Magento\Eav\Model\Resource\Entity\Attribute::_saveOption */ public function testSaveOptionSystemAttribute() { @@ -77,7 +77,7 @@ public function testSaveOptionSystemAttribute() } /** - * @covers \Magento\Eav\Model\Resource\Entity\Attribute::_saveOption + * covers \Magento\Eav\Model\Resource\Entity\Attribute::_saveOption */ public function testSaveOptionNewUserDefinedAttribute() { @@ -171,7 +171,7 @@ public function testSaveOptionNewUserDefinedAttribute() } /** - * @covers \Magento\Eav\Model\Resource\Entity\Attribute::_saveOption + * covers \Magento\Eav\Model\Resource\Entity\Attribute::_saveOption */ public function testSaveOptionNoValue() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Action/ForwardTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Action/ForwardTest.php index 358934df16c0a..b12640ed34fc3 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Action/ForwardTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Action/ForwardTest.php @@ -69,7 +69,7 @@ public function testDispatch() * Test for getRequest method * * @test - * @covers \Magento\Framework\App\Action\AbstractAction::getRequest + * covers \Magento\Framework\App\Action\AbstractAction::getRequest */ public function testGetRequest() { @@ -80,7 +80,7 @@ public function testGetRequest() * Test for getResponse method * * @test - * @covers \Magento\Framework\App\Action\AbstractAction::getResponse + * covers \Magento\Framework\App\Action\AbstractAction::getResponse */ public function testGetResponse() { @@ -91,7 +91,7 @@ public function testGetResponse() * Test for getResponse med. Checks that response headers are set correctly * * @test - * @covers \Magento\Framework\App\Action\AbstractAction::getResponse + * covers \Magento\Framework\App\Action\AbstractAction::getResponse */ public function testResponseHeaders() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Data/BackendModelPoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Data/BackendModelPoolTest.php index 07933f8e00ba7..ba47dd01d8c32 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Data/BackendModelPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Data/BackendModelPoolTest.php @@ -31,7 +31,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\App\Config\Data\ProcessorFactory::get + * covers \Magento\Framework\App\Config\Data\ProcessorFactory::get */ public function testGetModelWithCorrectInterface() { @@ -52,7 +52,7 @@ public function testGetModelWithCorrectInterface() } /** - * @covers \Magento\Framework\App\Config\Data\ProcessorFactory::get + * covers \Magento\Framework\App\Config\Data\ProcessorFactory::get * @expectedException \InvalidArgumentException */ public function testGetModelWithWrongInterface() @@ -73,7 +73,7 @@ public function testGetModelWithWrongInterface() } /** - * @covers \Magento\Framework\App\Config\Data\ProcessorFactory::get + * covers \Magento\Framework\App\Config\Data\ProcessorFactory::get */ public function testGetMemoryCache() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/ReaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/ReaderTest.php index 5193cf725cb9d..94970c7519d62 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/ReaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Config/Initial/ReaderTest.php @@ -66,7 +66,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\App\Config\Initial\Reader::read + * covers \Magento\Framework\App\Config\Initial\Reader::read */ public function testReadNoFiles() { @@ -85,7 +85,7 @@ public function testReadNoFiles() } /** - * @covers \Magento\Framework\App\Config\Initial\Reader::read + * covers \Magento\Framework\App\Config\Initial\Reader::read */ public function testReadValidConfig() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManagerFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManagerFactoryTest.php index d06d1ce5f1810..e123d757f62a1 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManagerFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/ObjectManagerFactoryTest.php @@ -6,7 +6,7 @@ namespace Magento\Framework\App; /** - * @covers \Magento\Framework\App\ObjectManagerFactory + * covers \Magento\Framework\App\ObjectManagerFactory */ class ObjectManagerFactoryTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/RequestFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/RequestFactoryTest.php index 31adada4659d7..147bdb3d9d8d0 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/RequestFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/RequestFactoryTest.php @@ -24,8 +24,8 @@ protected function setUp() } /** - * @covers \Magento\Framework\App\RequestFactory::__construct - * @covers \Magento\Framework\App\RequestFactory::create + * covers \Magento\Framework\App\RequestFactory::__construct + * covers \Magento\Framework\App\RequestFactory::create */ public function testCreate() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/Response/HttpTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/Response/HttpTest.php index cd529868449f6..69cb761338b49 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/Response/HttpTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/Response/HttpTest.php @@ -207,7 +207,7 @@ public function testRepresentJson() * Test for getHeader method * * @dataProvider headersDataProvider - * @covers \Magento\Framework\App\Response\Http::getHeader + * covers \Magento\Framework\App\Response\Http::getHeader * @param string $header */ public function testGetHeaderExists($header) @@ -232,7 +232,7 @@ public function headersDataProvider() /** * Test for getHeader method. Validation for attempt to get not existing header * - * @covers \Magento\Framework\App\Response\Http::getHeader + * covers \Magento\Framework\App\Response\Http::getHeader */ public function testGetHeaderNotExists() { @@ -261,7 +261,7 @@ public function testWakeUpWithException() /** * Test for the magic method __wakeup * - * @covers \Magento\Framework\App\Response\Http::__wakeup + * covers \Magento\Framework\App\Response\Http::__wakeup */ public function testWakeUpWith() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/App/ScopeResolverPoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/App/ScopeResolverPoolTest.php index 1637e6cb48aa8..b7db312409229 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/App/ScopeResolverPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/App/ScopeResolverPoolTest.php @@ -32,7 +32,7 @@ public function testGet() /** * @param string $scope * - * @covers \Magento\Framework\App\ScopeResolverPool::get() + * covers \Magento\Framework\App\ScopeResolverPool::get() * @expectedException \InvalidArgumentException * @expectedExceptionMessage Invalid scope type * @dataProvider testGetExceptionDataProvider diff --git a/dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/MongoDbTest.php b/dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/MongoDbTest.php index dc6e2e24d9cd3..26c35d3390656 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/MongoDbTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Cache/Backend/MongoDbTest.php @@ -80,9 +80,9 @@ public function getTagsDataProvider() } /** - * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingTags - * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsNotMatchingTags - * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingAnyTags + * covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingTags + * covers \Magento\Framework\Cache\Backend\MongoDb::getIdsNotMatchingTags + * covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingAnyTags * @dataProvider getIdsMatchingTagsDataProvider */ public function testGetIdsMatchingTags($method, $tags, $expectedInput) @@ -139,9 +139,9 @@ public function getIdsMatchingTagsDataProvider() } /** - * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingTags - * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsNotMatchingTags - * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingAnyTags + * covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingTags + * covers \Magento\Framework\Cache\Backend\MongoDb::getIdsNotMatchingTags + * covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingAnyTags */ public function testGetIdsMatchingTagsNoInputTags() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/EntityAbstractTest.php b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/EntityAbstractTest.php index 600f80785f114..a0fcf8161bcc1 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/EntityAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Code/Generator/EntityAbstractTest.php @@ -163,17 +163,17 @@ public function generateDataProvider() * @param bool $isValid * * @dataProvider generateDataProvider - * @covers \Magento\Framework\Code\Generator\EntityAbstract::generate - * @covers \Magento\Framework\Code\Generator\EntityAbstract::getErrors - * @covers \Magento\Framework\Code\Generator\EntityAbstract::_getSourceClassName - * @covers \Magento\Framework\Code\Generator\EntityAbstract::_getResultClassName - * @covers \Magento\Framework\Code\Generator\EntityAbstract::_getDefaultResultClassName - * @covers \Magento\Framework\Code\Generator\EntityAbstract::_generateCode - * @covers \Magento\Framework\Code\Generator\EntityAbstract::_addError - * @covers \Magento\Framework\Code\Generator\EntityAbstract::_validateData - * @covers \Magento\Framework\Code\Generator\EntityAbstract::_getClassDocBlock - * @covers \Magento\Framework\Code\Generator\EntityAbstract::_getGeneratedCode - * @covers \Magento\Framework\Code\Generator\EntityAbstract::_fixCodeStyle + * covers \Magento\Framework\Code\Generator\EntityAbstract::generate + * covers \Magento\Framework\Code\Generator\EntityAbstract::getErrors + * covers \Magento\Framework\Code\Generator\EntityAbstract::_getSourceClassName + * covers \Magento\Framework\Code\Generator\EntityAbstract::_getResultClassName + * covers \Magento\Framework\Code\Generator\EntityAbstract::_getDefaultResultClassName + * covers \Magento\Framework\Code\Generator\EntityAbstract::_generateCode + * covers \Magento\Framework\Code\Generator\EntityAbstract::_addError + * covers \Magento\Framework\Code\Generator\EntityAbstract::_validateData + * covers \Magento\Framework\Code\Generator\EntityAbstract::_getClassDocBlock + * covers \Magento\Framework\Code\Generator\EntityAbstract::_getGeneratedCode + * covers \Magento\Framework\Code\Generator\EntityAbstract::_fixCodeStyle */ public function testGenerate( $errors = [], diff --git a/dev/tests/unit/testsuite/Magento/Framework/Controller/Result/JSONTest.php b/dev/tests/unit/testsuite/Magento/Framework/Controller/Result/JSONTest.php index d496338e0d693..7c9bf2787cfff 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Controller/Result/JSONTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Controller/Result/JSONTest.php @@ -9,7 +9,7 @@ /** * Class JSONTest * - * @covers Magento\Framework\Controller\Result\JSON + * covers Magento\Framework\Controller\Result\JSON */ class JSONTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php b/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php index e22d3a334d854..3370fdc42dd14 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/DB/Adapter/Pdo/MysqlTest.php @@ -497,8 +497,8 @@ function ($values) { * @param string $expectedQuery * * @dataProvider addColumnDataProvider - * @covers \Magento\Framework\DB\Adapter\Pdo\Mysql::addColumn - * @covers \Magento\Framework\DB\Adapter\Pdo\Mysql::_getColumnDefinition + * covers \Magento\Framework\DB\Adapter\Pdo\Mysql::addColumn + * covers \Magento\Framework\DB\Adapter\Pdo\Mysql::_getColumnDefinition */ public function testAddColumn($options, $expectedQuery) { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php index e4e04f216a072..bc16108e18f39 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Collection/DbTest.php @@ -255,7 +255,7 @@ public function testAddFieldToFilterFieldIsQuoted() * Test that after cloning collection $this->_select in initial and cloned collections * do not reference the same object * - * @covers \Magento\Framework\Data\Collection\Db::__clone + * covers \Magento\Framework\Data\Collection\Db::__clone */ public function testClone() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/AbstractElementTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/AbstractElementTest.php index 06608c1f43bc2..d216523921aa5 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/AbstractElementTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/AbstractElementTest.php @@ -49,7 +49,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::addElement() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::addElement() */ public function testAddElement() { @@ -86,7 +86,7 @@ public function testAddElement() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtmlId() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtmlId() */ public function testGetHtmlId() { @@ -110,7 +110,7 @@ public function testGetHtmlId() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getName() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getName() */ public function testGetNameWithoutSuffix() { @@ -132,7 +132,7 @@ public function testGetNameWithoutSuffix() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getName() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getName() */ public function testGetNameWithSuffix() { @@ -158,7 +158,7 @@ public function testGetNameWithSuffix() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::removeField() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::removeField() */ public function testRemoveField() { @@ -187,7 +187,7 @@ public function testRemoveField() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtmlAttributes() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtmlAttributes() */ public function testGetHtmlAttributes() { @@ -208,7 +208,7 @@ public function testGetHtmlAttributes() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::addClass() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::addClass() */ public function testAddClass() { @@ -221,7 +221,7 @@ public function testAddClass() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::removeClass() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::removeClass() */ public function testRemoveClass() { @@ -238,7 +238,7 @@ public function testRemoveClass() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getEscapedValue() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getEscapedValue() */ public function testGetEscapedValueWithoutFilter() { @@ -249,7 +249,7 @@ public function testGetEscapedValueWithoutFilter() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getEscapedValue() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getEscapedValue() */ public function testGetEscapedValueWithFilter() { @@ -271,7 +271,7 @@ public function testGetEscapedValueWithFilter() * @param array $initialData * @param string $expectedValue * @dataProvider getElementHtmlDataProvider - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getElementHtml() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getElementHtml() */ public function testGetElementHtml(array $initialData, $expectedValue) { @@ -287,7 +287,7 @@ public function testGetElementHtml(array $initialData, $expectedValue) * @param array $initialData * @param string $expectedValue * @dataProvider getLabelHtmlDataProvider - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getLabelHtml() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getLabelHtml() */ public function testGetLabelHtml(array $initialData, $expectedValue) { @@ -303,7 +303,7 @@ public function testGetLabelHtml(array $initialData, $expectedValue) * @param array $initialData * @param string $expectedValue * @dataProvider testGetDefaultHtmlDataProvider - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getDefaultHtml() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getDefaultHtml() */ public function testGetDefaultHtml(array $initialData, $expectedValue) { @@ -315,7 +315,7 @@ public function testGetDefaultHtml(array $initialData, $expectedValue) } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtml() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtml() */ public function testGetHtmlWithoutRenderer() { @@ -331,7 +331,7 @@ public function testGetHtmlWithoutRenderer() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtml() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtml() */ public function testGetHtmlWithRenderer() { @@ -356,7 +356,7 @@ public function testGetHtmlWithRenderer() * @param array $initialData * @param string $expectedValue * @dataProvider serializeDataProvider - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::serialize() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::serialize() */ public function testSerialize(array $initialData, $expectedValue) { @@ -370,7 +370,7 @@ public function testSerialize(array $initialData, $expectedValue) } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtmlContainerId() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtmlContainerId() */ public function testGetHtmlContainerIdWithoutId() { @@ -381,7 +381,7 @@ public function testGetHtmlContainerIdWithoutId() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtmlContainerId() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtmlContainerId() */ public function testGetHtmlContainerIdWithContainerId() { @@ -394,7 +394,7 @@ public function testGetHtmlContainerIdWithContainerId() } /** - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtmlContainerId() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::getHtmlContainerId() */ public function testGetHtmlContainerIdWithFieldContainerIdPrefix() { @@ -416,7 +416,7 @@ public function testGetHtmlContainerIdWithFieldContainerIdPrefix() * @param array $initialData * @param string $expectedValue * @dataProvider addElementValuesDataProvider - * @covers \Magento\Framework\Data\Form\Element\AbstractElement::addElementValues() + * covers \Magento\Framework\Data\Form\Element\AbstractElement::addElementValues() */ public function testAddElementValues(array $initialData, $expectedValue) { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ButtonTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ButtonTest.php index 0068f9fb813cb..7a4fba68109ac 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ButtonTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ButtonTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Button::__construct + * covers \Magento\Framework\Data\Form\Element\Button::__construct */ public function testConstruct() { @@ -53,7 +53,7 @@ public function testConstruct() } /** - * @covers \Magento\Framework\Data\Form\Element\Button::getHtmlAttributes + * covers \Magento\Framework\Data\Form\Element\Button::getHtmlAttributes */ public function testGetHtmlAttributes() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/CheckboxTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/CheckboxTest.php index b7f8b1f38ceb6..11d9234323e32 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/CheckboxTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/CheckboxTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Checkbox::__construct + * covers \Magento\Framework\Data\Form\Element\Checkbox::__construct */ public function testConstruct() { @@ -53,7 +53,7 @@ public function testConstruct() } /** - * @covers \Magento\Framework\Data\Form\Element\Checkbox::getHtmlAttributes + * covers \Magento\Framework\Data\Form\Element\Checkbox::getHtmlAttributes */ public function testGetHtmlAttributes() { @@ -66,7 +66,7 @@ public function testGetHtmlAttributes() } /** - * @covers \Magento\Framework\Data\Form\Element\Checkbox::getElementHtml + * covers \Magento\Framework\Data\Form\Element\Checkbox::getElementHtml */ public function testGetElementHtml() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/CollectionFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/CollectionFactoryTest.php index e3ed83f3db67b..242d31de9638c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/CollectionFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/CollectionFactoryTest.php @@ -36,7 +36,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\CollectionFactory::create + * covers \Magento\Framework\Data\Form\Element\CollectionFactory::create */ public function testCreate() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ColumnTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ColumnTest.php index 3c350db329bc9..8edb4290fb57a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ColumnTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ColumnTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Column::__construct + * covers \Magento\Framework\Data\Form\Element\Column::__construct */ public function testConstruct() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/FileTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/FileTest.php index ae972c3cfb677..2975f6abd1359 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/FileTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/FileTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\File::__construct + * covers \Magento\Framework\Data\Form\Element\File::__construct */ public function testConstruct() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/HiddenTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/HiddenTest.php index 5dd8a3ee1a349..4af553361f6ce 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/HiddenTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/HiddenTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Hidden::__construct + * covers \Magento\Framework\Data\Form\Element\Hidden::__construct */ public function testConstruct() { @@ -53,7 +53,7 @@ public function testConstruct() } /** - * @covers \Magento\Framework\Data\Form\Element\Hidden::getDefaultHtml + * covers \Magento\Framework\Data\Form\Element\Hidden::getDefaultHtml */ public function testGetDefaultHtml() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ImageTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ImageTest.php index a48451fca5acd..c0152bee3cca6 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ImageTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ImageTest.php @@ -46,7 +46,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Image::__construct + * covers \Magento\Framework\Data\Form\Element\Image::__construct */ public function testConstruct() { @@ -54,7 +54,7 @@ public function testConstruct() } /** - * @covers \Magento\Framework\Data\Form\Element\Image::getName + * covers \Magento\Framework\Data\Form\Element\Image::getName */ public function testGetName() { @@ -63,7 +63,7 @@ public function testGetName() } /** - * @covers \Magento\Framework\Data\Form\Element\Image::getElementHtml + * covers \Magento\Framework\Data\Form\Element\Image::getElementHtml */ public function testGetElementHtmlWithoutValue() { @@ -76,7 +76,7 @@ public function testGetElementHtmlWithoutValue() } /** - * @covers \Magento\Framework\Data\Form\Element\Image::getElementHtml + * covers \Magento\Framework\Data\Form\Element\Image::getElementHtml */ public function testGetElementHtmlWithValue() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ImagefileTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ImagefileTest.php index c21e75453fb4a..c2000ae3a4d5f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ImagefileTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ImagefileTest.php @@ -40,7 +40,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Imagefile::__construct + * covers \Magento\Framework\Data\Form\Element\Imagefile::__construct */ public function testConstruct() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/LabelTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/LabelTest.php index dd31ea7271e71..17721f61692ca 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/LabelTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/LabelTest.php @@ -40,7 +40,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Label::__construct + * covers \Magento\Framework\Data\Form\Element\Label::__construct */ public function testConstruct() { @@ -48,7 +48,7 @@ public function testConstruct() } /** - * @covers \Magento\Framework\Data\Form\Element\Label::getElementHtml + * covers \Magento\Framework\Data\Form\Element\Label::getElementHtml */ public function testGetElementHtml() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/LinkTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/LinkTest.php index 80658a3205126..a10b69ec0d287 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/LinkTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/LinkTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Link::__construct + * covers \Magento\Framework\Data\Form\Element\Link::__construct */ public function testConstruct() { @@ -52,7 +52,7 @@ public function testConstruct() } /** - * @covers \Magento\Framework\Data\Form\Element\Link::getElementHtml + * covers \Magento\Framework\Data\Form\Element\Link::getElementHtml */ public function testGetElementHtml() { @@ -69,7 +69,7 @@ public function testGetElementHtml() } /** - * @covers \Magento\Framework\Data\Form\Element\Link::getHtmlAttributes + * covers \Magento\Framework\Data\Form\Element\Link::getHtmlAttributes */ public function testGetHtmlAttributes() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/MultiselectTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/MultiselectTest.php index 24226c571b703..19a33aaf9aaae 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/MultiselectTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/MultiselectTest.php @@ -22,7 +22,7 @@ protected function setUp() /** * Verify that hidden input is present in multiselect * - * @covers \Magento\Framework\Data\Form\Element\Multiselect::getElementHtml + * covers \Magento\Framework\Data\Form\Element\Multiselect::getElementHtml */ public function testHiddenFieldPresentInMultiSelect() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/NoteTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/NoteTest.php index 26902b218a8d1..f7d2ca4d6deb2 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/NoteTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/NoteTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Note::__construct + * covers \Magento\Framework\Data\Form\Element\Note::__construct */ public function testConstruct() { @@ -52,7 +52,7 @@ public function testConstruct() } /** - * @covers \Magento\Framework\Data\Form\Element\Note::getElementHtml + * covers \Magento\Framework\Data\Form\Element\Note::getElementHtml */ public function testGetElementHtml() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ObscureTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ObscureTest.php index c1ef566ad2955..963dee564512b 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ObscureTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ObscureTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Obscure::__construct + * covers \Magento\Framework\Data\Form\Element\Obscure::__construct */ public function testConstruct() { @@ -53,7 +53,7 @@ public function testConstruct() } /** - * @covers \Magento\Framework\Data\Form\Element\Obscure::getEscapedValue + * covers \Magento\Framework\Data\Form\Element\Obscure::getEscapedValue */ public function testGetEscapedValue() { @@ -64,7 +64,7 @@ public function testGetEscapedValue() } /** - * @covers \Magento\Framework\Data\Form\Element\Obscure::getHtmlAttributes + * covers \Magento\Framework\Data\Form\Element\Obscure::getHtmlAttributes */ public function testGetHtmlAttributes() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/PasswordTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/PasswordTest.php index dcf24d50d1732..e355580f9527a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/PasswordTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/PasswordTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Password::__construct + * covers \Magento\Framework\Data\Form\Element\Password::__construct */ public function testConstruct() { @@ -53,7 +53,7 @@ public function testConstruct() } /** - * @covers \Magento\Framework\Data\Form\Element\Password::getHtml + * covers \Magento\Framework\Data\Form\Element\Password::getHtml */ public function testGetHtml() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/RadioTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/RadioTest.php index 7a4c5bafbe94c..f00e73a0020f6 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/RadioTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/RadioTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Radio::__construct + * covers \Magento\Framework\Data\Form\Element\Radio::__construct */ public function testConstruct() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ResetTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ResetTest.php index 6683bd3b994bc..a35dd4879eb81 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ResetTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/ResetTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Reset::__construct + * covers \Magento\Framework\Data\Form\Element\Reset::__construct */ public function testConstruct() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/SubmitTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/SubmitTest.php index 43514940b9885..0bd88441153a1 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/SubmitTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/SubmitTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Submit::__construct + * covers \Magento\Framework\Data\Form\Element\Submit::__construct */ public function testConstruct() { @@ -53,7 +53,7 @@ public function testConstruct() } /** - * @covers \Magento\Framework\Data\Form\Element\Submit::getHtml + * covers \Magento\Framework\Data\Form\Element\Submit::getHtml */ public function testGetHtml() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/TextTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/TextTest.php index 49e752d956a80..fa6eac3640d91 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/TextTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/TextTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Text::__construct + * covers \Magento\Framework\Data\Form\Element\Text::__construct */ public function testConstruct() { @@ -53,7 +53,7 @@ public function testConstruct() } /** - * @covers \Magento\Framework\Data\Form\Element\Text::getHtml + * covers \Magento\Framework\Data\Form\Element\Text::getHtml */ public function testGetHtml() { @@ -63,7 +63,7 @@ public function testGetHtml() } /** - * @covers \Magento\Framework\Data\Form\Element\Text::getHtmlAttributes + * covers \Magento\Framework\Data\Form\Element\Text::getHtmlAttributes */ public function testGetHtmlAttributes() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/TextareaTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/TextareaTest.php index cec4e7feb2d1f..1a327c003823d 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/TextareaTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/Form/Element/TextareaTest.php @@ -44,7 +44,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Data\Form\Element\Textarea::__construct + * covers \Magento\Framework\Data\Form\Element\Textarea::__construct */ public function testConstruct() { @@ -55,7 +55,7 @@ public function testConstruct() } /** - * @covers \Magento\Framework\Data\Form\Element\Textarea::getElementHtml + * covers \Magento\Framework\Data\Form\Element\Textarea::getElementHtml */ public function testGetElementHtml() { @@ -67,7 +67,7 @@ public function testGetElementHtml() } /** - * @covers \Magento\Framework\Data\Form\Element\Textarea::getHtmlAttributes + * covers \Magento\Framework\Data\Form\Element\Textarea::getHtmlAttributes */ public function testGetHtmlAttributes() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Data/StructureTest.php b/dev/tests/unit/testsuite/Magento/Framework/Data/StructureTest.php index 8ed9e1569fe23..5bc6510a7ff84 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Data/StructureTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Data/StructureTest.php @@ -499,8 +499,8 @@ public function testGetChildrenParentIdChildAlias() } /** - * @covers \Magento\Framework\Data\Structure::addToParentGroup - * @covers \Magento\Framework\Data\Structure::getGroupChildNames + * covers \Magento\Framework\Data\Structure::addToParentGroup + * covers \Magento\Framework\Data\Structure::getGroupChildNames */ public function testGroups() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/EscaperTest.php b/dev/tests/unit/testsuite/Magento/Framework/EscaperTest.php index 5c4fe9a2d1abc..8690f668be9a7 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/EscaperTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/EscaperTest.php @@ -21,7 +21,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Escaper::escapeHtml + * covers \Magento\Framework\Escaper::escapeHtml * @dataProvider escapeHtmlDataProvider */ public function testEscapeHtml($data, $expected, $allowedTags = null) @@ -56,7 +56,7 @@ public function escapeHtmlDataProvider() } /** - * @covers \Magento\Framework\Escaper::escapeUrl + * covers \Magento\Framework\Escaper::escapeUrl */ public function testEscapeUrl() { @@ -67,7 +67,7 @@ public function testEscapeUrl() } /** - * @covers \Magento\Framework\Escaper::escapeJsQuote + * covers \Magento\Framework\Escaper::escapeJsQuote */ public function testEscapeJsQuote() { @@ -78,7 +78,7 @@ public function testEscapeJsQuote() } /** - * @covers \Magento\Framework\Escaper::escapeQuote + * covers \Magento\Framework\Escaper::escapeQuote */ public function testEscapeQuote() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filter/RemoveTagsTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/RemoveTagsTest.php index 0d5c6e81eaacc..3a28a0dbff23c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Filter/RemoveTagsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/RemoveTagsTest.php @@ -8,8 +8,8 @@ class RemoveTagsTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Framework\Filter\RemoveTags::filter - * @covers \Magento\Framework\Filter\RemoveTags::_convertEntities + * covers \Magento\Framework\Filter\RemoveTags::filter + * covers \Magento\Framework\Filter\RemoveTags::_convertEntities */ public function testRemoveTags() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Filter/StripTagsTest.php b/dev/tests/unit/testsuite/Magento/Framework/Filter/StripTagsTest.php index a97669de3ac07..a6026097d340c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Filter/StripTagsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Filter/StripTagsTest.php @@ -8,7 +8,7 @@ class StripTagsTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Framework\Filter\StripTags::filter + * covers \Magento\Framework\Filter\StripTags::filter */ public function testStripTags() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/HTTP/HeaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/HTTP/HeaderTest.php index 9839c1a20e650..4505fa4712d0e 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/HTTP/HeaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/HTTP/HeaderTest.php @@ -44,11 +44,11 @@ protected function setUp() * * @dataProvider methodsDataProvider * - * @covers \Magento\Framework\HTTP\Header::getHttpHost - * @covers \Magento\Framework\HTTP\Header::getHttpUserAgent - * @covers \Magento\Framework\HTTP\Header::getHttpAcceptLanguage - * @covers \Magento\Framework\HTTP\Header::getHttpAcceptCharset - * @covers \Magento\Framework\HTTP\Header::getHttpReferer + * covers \Magento\Framework\HTTP\Header::getHttpHost + * covers \Magento\Framework\HTTP\Header::getHttpUserAgent + * covers \Magento\Framework\HTTP\Header::getHttpAcceptLanguage + * covers \Magento\Framework\HTTP\Header::getHttpAcceptCharset + * covers \Magento\Framework\HTTP\Header::getHttpReferer */ public function testHttpMethods($method, $clean, $expectedValue) { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Image/AdapterFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Image/AdapterFactoryTest.php index 1621ee43a08c2..23dae32027693 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Image/AdapterFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Image/AdapterFactoryTest.php @@ -83,7 +83,7 @@ public function createDataProvider() } /** - * @covers \Magento\Framework\Image\AdapterFactory::create + * covers \Magento\Framework\Image\AdapterFactory::create */ public function testCreateWithoutName() { @@ -118,7 +118,7 @@ public function testCreateWithoutName() } /** - * @covers \Magento\Framework\Image\AdapterFactory::create + * covers \Magento\Framework\Image\AdapterFactory::create * @expectedException \InvalidArgumentException * @expectedExceptionMessage Image adapter is not selected. */ @@ -137,7 +137,7 @@ public function testInvalidArgumentException() } /** - * @covers \Magento\Framework\Image\AdapterFactory::create + * covers \Magento\Framework\Image\AdapterFactory::create * @expectedException \InvalidArgumentException * @expectedExceptionMessage Image adapter for 'test' is not setup. */ @@ -157,7 +157,7 @@ public function testNonAdapterClass() } /** - * @covers \Magento\Framework\Image\AdapterFactory::create + * covers \Magento\Framework\Image\AdapterFactory::create * @expectedException \InvalidArgumentException * @expectedExceptionMessage stdClass is not instance of \Magento\Framework\Image\Adapter\AdapterInterface */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/Chain/ChainTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Chain/ChainTest.php index 2494ea1b9cd63..7471992909c08 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/Chain/ChainTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Chain/ChainTest.php @@ -25,8 +25,8 @@ protected function setUp() } /** - * @covers \Magento\Framework\Interception\Chain\Chain::invokeNext - * @covers \Magento\Framework\Interception\Chain\Chain::__construct + * covers \Magento\Framework\Interception\Chain\Chain::invokeNext + * covers \Magento\Framework\Interception\Chain\Chain::__construct */ public function testInvokeNextBeforePlugin() { @@ -64,7 +64,7 @@ public function testInvokeNextBeforePlugin() } /** - * @covers \Magento\Framework\Interception\Chain\Chain::invokeNext + * covers \Magento\Framework\Interception\Chain\Chain::invokeNext */ public function testInvokeNextAroundPlugin() { @@ -95,7 +95,7 @@ public function testInvokeNextAroundPlugin() } /** - * @covers \Magento\Framework\Interception\Chain\Chain::invokeNext + * covers \Magento\Framework\Interception\Chain\Chain::invokeNext */ public function testInvokeNextAfterPlugin() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php index a457e5d6479f6..dce8964b9c73a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Code/InterfaceValidatorTest.php @@ -33,12 +33,12 @@ protected function setUp() } /** - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::getMethodParameters - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::getMethodType - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::getOriginMethodName - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::getParametersType - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::__construct + * covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + * covers \Magento\Framework\Interception\Code\InterfaceValidator::getMethodParameters + * covers \Magento\Framework\Interception\Code\InterfaceValidator::getMethodType + * covers \Magento\Framework\Interception\Code\InterfaceValidator::getOriginMethodName + * covers \Magento\Framework\Interception\Code\InterfaceValidator::getParametersType + * covers \Magento\Framework\Interception\Code\InterfaceValidator::__construct */ public function testValidate() { @@ -51,7 +51,7 @@ public function testValidate() /** * @expectedException \Magento\Framework\Interception\Code\ValidatorException * @expectedExceptionMessage Incorrect interface in - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + * covers \Magento\Framework\Interception\Code\InterfaceValidator::validate */ public function testValidateIncorrectInterface() { @@ -64,7 +64,7 @@ public function testValidateIncorrectInterface() /** * @expectedException \Magento\Framework\Interception\Code\ValidatorException * @expectedExceptionMessage Invalid [\Magento\Framework\Interception\Custom\Module\Model\Item] $subject type - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + * covers \Magento\Framework\Interception\Code\InterfaceValidator::validate */ public function testValidateIncorrectSubjectType() { @@ -77,8 +77,8 @@ public function testValidateIncorrectSubjectType() /** * @expectedException \Magento\Framework\Interception\Code\ValidatorException * @expectedExceptionMessage Invalid method signature. Invalid method parameters count - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validateMethodsParameters + * covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + * covers \Magento\Framework\Interception\Code\InterfaceValidator::validateMethodsParameters */ public function testValidateIncompatibleMethodArgumentsCount() { @@ -92,8 +92,8 @@ public function testValidateIncompatibleMethodArgumentsCount() /** * @expectedException \Magento\Framework\Interception\Code\ValidatorException * @expectedExceptionMessage Incompatible parameter type - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validateMethodsParameters + * covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + * covers \Magento\Framework\Interception\Code\InterfaceValidator::validateMethodsParameters */ public function testValidateIncompatibleMethodArgumentsType() { @@ -107,7 +107,7 @@ public function testValidateIncompatibleMethodArgumentsType() /** * @expectedException \Magento\Framework\Interception\Code\ValidatorException * @expectedExceptionMessage Invalid method signature. Detected extra parameters - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + * covers \Magento\Framework\Interception\Code\InterfaceValidator::validate */ public function testValidateExtraParameters() { @@ -120,7 +120,7 @@ public function testValidateExtraParameters() /** * @expectedException \Magento\Framework\Interception\Code\ValidatorException * @expectedExceptionMessage Invalid [] $name type in - * @covers \Magento\Framework\Interception\Code\InterfaceValidator::validate + * covers \Magento\Framework\Interception\Code\InterfaceValidator::validate */ public function testValidateInvalidProceed() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/Definition/CompiledTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/Definition/CompiledTest.php index f2e8ef2be2dbc..1b9e1cf6e0b64 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/Definition/CompiledTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/Definition/CompiledTest.php @@ -13,8 +13,8 @@ class CompiledTest extends \PHPUnit_Framework_TestCase protected $_definitions = ['type' => 'definitions']; /** - * @covers \Magento\Framework\Interception\Definition\Compiled::getMethodList - * @covers \Magento\Framework\Interception\Definition\Compiled::__construct + * covers \Magento\Framework\Interception\Definition\Compiled::getMethodList + * covers \Magento\Framework\Interception\Definition\Compiled::__construct */ public function testGetMethodList() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Interception/PluginList/PluginListTest.php b/dev/tests/unit/testsuite/Magento/Framework/Interception/PluginList/PluginListTest.php index e97afe38d8716..9cc7d468a12d3 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Interception/PluginList/PluginListTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Interception/PluginList/PluginListTest.php @@ -169,8 +169,8 @@ public function getPluginsDataProvider() /** * @expectedException \InvalidArgumentException - * @covers \Magento\Framework\Interception\PluginList\PluginList::getNext - * @covers \Magento\Framework\Interception\PluginList\PluginList::_inheritPlugins + * covers \Magento\Framework\Interception\PluginList\PluginList::getNext + * covers \Magento\Framework\Interception\PluginList\PluginList::_inheritPlugins */ public function testInheritPluginsWithNonExistingClass() { @@ -182,8 +182,8 @@ public function testInheritPluginsWithNonExistingClass() } /** - * @covers \Magento\Framework\Interception\PluginList\PluginList::getNext - * @covers \Magento\Framework\Interception\PluginList\PluginList::_loadScopedData + * covers \Magento\Framework\Interception\PluginList\PluginList::getNext + * covers \Magento\Framework\Interception\PluginList\PluginList::_loadScopedData */ public function testLoadScopedDataCached() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/ImportTest.php b/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/ImportTest.php index 3c12c8e9d90ea..e370b1c9440e1 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/ImportTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Less/PreProcessor/Instruction/ImportTest.php @@ -106,7 +106,7 @@ public function testProcessNoImport() } /** - * @covers \Magento\Framework\Less\PreProcessor\Instruction\Import::resetRelatedFiles + * covers \Magento\Framework\Less\PreProcessor\Instruction\Import::resetRelatedFiles */ public function testGetRelatedFiles() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Locale/ValidatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Locale/ValidatorTest.php index 243ae109008b4..6c0700842c052 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Locale/ValidatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Locale/ValidatorTest.php @@ -41,7 +41,7 @@ public function testIsValidDataProvider() * @dataProvider testIsValidDataProvider * @param string $locale * @param boolean $valid - * @covers \Magento\Framework\Locale\Validator::isValid + * covers \Magento\Framework\Locale\Validator::isValid */ public function testIsValid($locale, $valid) { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mail/MessageTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mail/MessageTest.php index e432ad77fdc04..fe397979d2c93 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mail/MessageTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mail/MessageTest.php @@ -24,8 +24,8 @@ public function setUp() * @param string $messageType * @param string $method * - * @covers \Magento\Framework\Mail\Message::setBody - * @covers \Magento\Framework\Mail\Message::setMessageType + * covers \Magento\Framework\Mail\Message::setBody + * covers \Magento\Framework\Mail\Message::setMessageType * @dataProvider setBodyDataProvider */ public function testSetBody($messageType, $method) @@ -60,8 +60,8 @@ public function setBodyDataProvider() * @param string $messageType * @param string $method * - * @covers \Magento\Framework\Mail\Message::getBody - * @covers \Magento\Framework\Mail\Message::setMessageType + * covers \Magento\Framework\Mail\Message::getBody + * covers \Magento\Framework\Mail\Message::setMessageType * @dataProvider getBodyDataProvider */ public function testGetBody($messageType, $method) diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mail/Template/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mail/Template/FactoryTest.php index e8e51e8ee1b96..b99641cec7858 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mail/Template/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mail/Template/FactoryTest.php @@ -24,8 +24,8 @@ public function setUp() } /** - * @covers \Magento\Framework\Mail\Template\Factory::get - * @covers \Magento\Framework\Mail\Template\Factory::__construct + * covers \Magento\Framework\Mail\Template\Factory::get + * covers \Magento\Framework\Mail\Template\Factory::__construct */ public function testGet() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mail/Template/TransportBuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mail/Template/TransportBuilderTest.php index 17693ef609e13..ca8e62c1f5698 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mail/Template/TransportBuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mail/Template/TransportBuilderTest.php @@ -206,7 +206,7 @@ public function testSetCc() } /** - * @covers \Magento\Framework\Mail\Template\TransportBuilder::addTo + * covers \Magento\Framework\Mail\Template\TransportBuilder::addTo */ public function testAddTo() { @@ -219,7 +219,7 @@ public function testAddTo() } /** - * @covers \Magento\Framework\Mail\Template\TransportBuilder::addBcc + * covers \Magento\Framework\Mail\Template\TransportBuilder::addBcc */ public function testAddBcc() { @@ -232,7 +232,7 @@ public function testAddBcc() } /** - * @covers \Magento\Framework\Mail\Template\TransportBuilder::setReplyTo + * covers \Magento\Framework\Mail\Template\TransportBuilder::setReplyTo */ public function testSetReplyTo() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Mail/TransportTest.php b/dev/tests/unit/testsuite/Magento/Framework/Mail/TransportTest.php index 5b01004f4edc2..1378a0c795124 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Mail/TransportTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Mail/TransportTest.php @@ -34,7 +34,7 @@ public function testTransportWithIncorrectMessageObject() } /** - * @covers \Magento\Framework\Mail\Transport::sendMessage + * covers \Magento\Framework\Mail\Transport::sendMessage * @expectedException \Magento\Framework\Mail\Exception * @expectedExceptionMessage No body specified */ diff --git a/dev/tests/unit/testsuite/Magento/Framework/Math/CalculatorTest.php b/dev/tests/unit/testsuite/Magento/Framework/Math/CalculatorTest.php index 69e539709d9a4..5d3c9b3fc34d3 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Math/CalculatorTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Math/CalculatorTest.php @@ -34,8 +34,8 @@ public function setUp() * @param bool $negative * @param float $expected * @dataProvider deltaRoundDataProvider - * @covers \Magento\Framework\Math\Calculator::deltaRound - * @covers \Magento\Framework\Math\Calculator::__construct + * covers \Magento\Framework\Math\Calculator::deltaRound + * covers \Magento\Framework\Math\Calculator::__construct */ public function testDeltaRound($price, $negative, $expected) { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Message/AbstractMessageTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/AbstractMessageTest.php index 5ee0729acd05d..ce49dcdba9148 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Message/AbstractMessageTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/AbstractMessageTest.php @@ -25,8 +25,8 @@ public function setUp() } /** - * @covers \Magento\Framework\Message\AbstractMessage::getText - * @covers \Magento\Framework\Message\AbstractMessage::setText + * covers \Magento\Framework\Message\AbstractMessage::getText + * covers \Magento\Framework\Message\AbstractMessage::setText * @dataProvider setTextGetTextProvider */ public function testSetTextGetText($text) @@ -44,8 +44,8 @@ public function setTextGetTextProvider() } /** - * @covers \Magento\Framework\Message\AbstractMessage::getIdentifier - * @covers \Magento\Framework\Message\AbstractMessage::setIdentifier + * covers \Magento\Framework\Message\AbstractMessage::getIdentifier + * covers \Magento\Framework\Message\AbstractMessage::setIdentifier * @dataProvider setIdentifierGetIdentifierProvider */ public function testSetIdentifierGetIdentifier($identifier) @@ -63,8 +63,8 @@ public function setIdentifierGetIdentifierProvider() } /** - * @covers \Magento\Framework\Message\AbstractMessage::getIsSticky - * @covers \Magento\Framework\Message\AbstractMessage::setIsSticky + * covers \Magento\Framework\Message\AbstractMessage::getIsSticky + * covers \Magento\Framework\Message\AbstractMessage::setIsSticky */ public function testSetIsStickyGetIsSticky() { @@ -74,7 +74,7 @@ public function testSetIsStickyGetIsSticky() } /** - * @covers \Magento\Framework\Message\AbstractMessage::toString + * covers \Magento\Framework\Message\AbstractMessage::toString */ public function testToString() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Message/CollectionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Message/CollectionTest.php index 5f027baf5f2cd..fed1334504672 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Message/CollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Message/CollectionTest.php @@ -27,8 +27,8 @@ public function setUp() } /** - * @covers \Magento\Framework\Message\Collection::addMessage - * @covers \Magento\Framework\Message\Collection::getItemsByType + * covers \Magento\Framework\Message\Collection::addMessage + * covers \Magento\Framework\Message\Collection::getItemsByType */ public function testAddMessage() { @@ -49,9 +49,9 @@ public function testAddMessage() } /** - * @covers \Magento\Framework\Message\Collection::addMessage - * @covers \Magento\Framework\Message\Collection::getItems - * @covers \Magento\Framework\Message\Collection::getLastAddedMessage + * covers \Magento\Framework\Message\Collection::addMessage + * covers \Magento\Framework\Message\Collection::getItems + * covers \Magento\Framework\Message\Collection::getLastAddedMessage */ public function testGetItems() { @@ -73,10 +73,10 @@ public function testGetItems() } /** - * @covers \Magento\Framework\Message\Collection::addMessage - * @covers \Magento\Framework\Message\Collection::getItemsByType - * @covers \Magento\Framework\Message\Collection::getCount - * @covers \Magento\Framework\Message\Collection::getCountByType + * covers \Magento\Framework\Message\Collection::addMessage + * covers \Magento\Framework\Message\Collection::getItemsByType + * covers \Magento\Framework\Message\Collection::getCount + * covers \Magento\Framework\Message\Collection::getCountByType */ public function testGetItemsByType() { @@ -116,8 +116,8 @@ public function testGetItemsByType() } /** - * @covers \Magento\Framework\Message\Collection::addMessage - * @covers \Magento\Framework\Message\Collection::getErrors + * covers \Magento\Framework\Message\Collection::addMessage + * covers \Magento\Framework\Message\Collection::getErrors */ public function testGetErrors() { @@ -139,8 +139,8 @@ public function testGetErrors() } /** - * @covers \Magento\Framework\Message\Collection::getMessageByIdentifier - * @covers \Magento\Framework\Message\Collection::deleteMessageByIdentifier + * covers \Magento\Framework\Message\Collection::getMessageByIdentifier + * covers \Magento\Framework\Message\Collection::deleteMessageByIdentifier */ public function testGetMessageByIdentifier() { @@ -166,7 +166,7 @@ public function testGetMessageByIdentifier() } /** - * @covers \Magento\Framework\Message\Collection::clear + * covers \Magento\Framework\Message\Collection::clear */ public function testClear() { @@ -187,7 +187,7 @@ public function testClear() } /** - * @covers \Magento\Framework\Message\Collection::clear + * covers \Magento\Framework\Message\Collection::clear */ public function testClearWithSticky() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Model/ActionValidator/RemoveActionTest.php b/dev/tests/unit/testsuite/Magento/Framework/Model/ActionValidator/RemoveActionTest.php index e4b4f73ab2054..a50040a7c6356 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Model/ActionValidator/RemoveActionTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Model/ActionValidator/RemoveActionTest.php @@ -14,8 +14,8 @@ class RemoveActionTest extends \PHPUnit_Framework_TestCase * @param bool $expectedResult * * @dataProvider isAllowedDataProvider - * @covers \Magento\Framework\Model\ActionValidator\RemoveAction::isAllowed - * @covers \Magento\Framework\Model\ActionValidator\RemoveAction::getBaseClassName + * covers \Magento\Framework\Model\ActionValidator\RemoveAction::isAllowed + * covers \Magento\Framework\Model\ActionValidator\RemoveAction::getBaseClassName */ public function testIsAllowed($modelToCheck, $protectedModel, $secureArea, $expectedResult) { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php index 8f0baa332d33f..b84a2a94dbe6a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Module/Setup/MigrationTest.php @@ -135,7 +135,7 @@ public function whereCallback($condition) } /** - * @covers \Magento\Framework\Module\Setup\Migration::appendClassAliasReplace + * covers \Magento\Framework\Module\Setup\Migration::appendClassAliasReplace */ public function testAppendClassAliasReplace() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomTest.php b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomTest.php index 07a8c6f56e0f5..2bba0046619a1 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/ObjectManager/Config/Reader/DomTest.php @@ -72,7 +72,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\ObjectManager\Config\Reader\Dom::_createConfigMerger() + * covers \Magento\Framework\ObjectManager\Config\Reader\Dom::_createConfigMerger() */ public function testRead() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceInfo/BaseTest.php b/dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceInfo/BaseTest.php index 040e5b53be533..350089944a6a7 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceInfo/BaseTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Pricing/PriceInfo/BaseTest.php @@ -99,7 +99,7 @@ public function providerGetPrice() } /** - * @covers \Magento\Framework\Pricing\PriceInfo\Base::getAdjustments + * covers \Magento\Framework\Pricing\PriceInfo\Base::getAdjustments */ public function testGetAdjustments() { @@ -108,7 +108,7 @@ public function testGetAdjustments() } /** - * @covers \Magento\Framework\Pricing\PriceInfo\Base::getAdjustment + * covers \Magento\Framework\Pricing\PriceInfo\Base::getAdjustment */ public function testGetAdjustment() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Stdlib/ArrayUtilsTest.php b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/ArrayUtilsTest.php index 5df03a4d8c26f..10d702e9347ee 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Stdlib/ArrayUtilsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/ArrayUtilsTest.php @@ -21,7 +21,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Stdlib\ArrayUtils::ksortMultibyte + * covers \Magento\Framework\Stdlib\ArrayUtils::ksortMultibyte * @dataProvider ksortMultibyteDataProvider */ public function testKsortMultibyte($input, $locale) @@ -45,7 +45,7 @@ public function ksortMultibyteDataProvider() } /** - * @covers \Magento\Framework\Stdlib\ArrayUtils::decorateArray + * covers \Magento\Framework\Stdlib\ArrayUtils::decorateArray */ public function testDecorateArray() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php index b55e6bedcf03b..9a41dd45e5455 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/Cookie/CookieScopeTest.php @@ -49,7 +49,7 @@ public function setUp() } /** - * @covers ::getSensitiveCookieMetadata + * covers ::getSensitiveCookieMetadata */ public function testGetSensitiveCookieMetadataEmpty() { @@ -65,7 +65,7 @@ public function testGetSensitiveCookieMetadataEmpty() } /** - * @covers ::getPublicCookieMetadata + * covers ::getPublicCookieMetadata */ public function testGetPublicCookieMetadataEmpty() { @@ -75,7 +75,7 @@ public function testGetPublicCookieMetadataEmpty() } /** - * @covers ::getCookieMetadata + * covers ::getCookieMetadata */ public function testGetCookieMetadataEmpty() { @@ -85,7 +85,7 @@ public function testGetCookieMetadataEmpty() } /** - * @covers ::createSensitiveMetadata ::getPublicCookieMetadata + * covers ::createSensitiveMetadata ::getPublicCookieMetadata */ public function testGetSensitiveCookieMetadataDefaults() { @@ -115,7 +115,7 @@ public function testGetSensitiveCookieMetadataDefaults() } /** - * @covers ::createSensitiveMetadata ::getPublicCookieMetadata ::getCookieMetadata + * covers ::createSensitiveMetadata ::getPublicCookieMetadata ::getCookieMetadata */ public function testGetPublicCookieMetadataDefaults() { @@ -147,7 +147,7 @@ public function testGetPublicCookieMetadataDefaults() } /** - * @covers ::createSensitiveMetadata ::getPublicCookieMetadata ::getCookieMetadata + * covers ::createSensitiveMetadata ::getPublicCookieMetadata ::getCookieMetadata */ public function testGetCookieMetadataDefaults() { @@ -168,7 +168,7 @@ public function testGetCookieMetadataDefaults() } /** - * @covers ::createSensitiveMetadata ::getPublicCookieMetadata ::getCookieMetadata + * covers ::createSensitiveMetadata ::getPublicCookieMetadata ::getCookieMetadata */ public function testGetSensitiveCookieMetadataOverrides() { @@ -204,7 +204,7 @@ public function testGetSensitiveCookieMetadataOverrides() } /** - * @covers ::createSensitiveMetadata ::getPublicCookieMetadata ::getCookieMetadata + * covers ::createSensitiveMetadata ::getPublicCookieMetadata ::getCookieMetadata */ public function testGetPublicCookieMetadataOverrides() { @@ -235,7 +235,7 @@ public function testGetPublicCookieMetadataOverrides() } /** - * @covers ::createSensitiveMetadata ::getPublicCookieMetadata ::getCookieMetadata + * covers ::createSensitiveMetadata ::getPublicCookieMetadata ::getCookieMetadata */ public function testGetCookieMetadataOverrides() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Stdlib/StringTest.php b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/StringTest.php index 600f949b160db..9c6b624023ca7 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Stdlib/StringTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Stdlib/StringTest.php @@ -21,7 +21,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\Stdlib\String::split + * covers \Magento\Framework\Stdlib\String::split */ public function testStrSplit() { @@ -39,7 +39,7 @@ public function testStrSplit() } /** - * @covers \Magento\Framework\Stdlib\String::splitInjection + * covers \Magento\Framework\Stdlib\String::splitInjection */ public function testSplitInjection() { @@ -48,7 +48,7 @@ public function testSplitInjection() } /** - * @covers \Magento\Framework\Stdlib\String::cleanString + * covers \Magento\Framework\Stdlib\String::cleanString */ public function testCleanString() { @@ -68,7 +68,7 @@ public function testStrrev() } /** - * @covers \Magento\Framework\Stdlib\String::strpos + * covers \Magento\Framework\Stdlib\String::strpos */ public function testStrpos() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/Url/DecoderTest.php b/dev/tests/unit/testsuite/Magento/Framework/Url/DecoderTest.php index 1ebe0e792e9b7..61e0000040783 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/Url/DecoderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/Url/DecoderTest.php @@ -8,8 +8,8 @@ class DecoderTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Framework\Url\Encoder::encode - * @covers \Magento\Framework\Url\Decoder::decode + * covers \Magento\Framework\Url\Encoder::encode + * covers \Magento\Framework\Url\Decoder::decode */ public function testDecode() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/File/FallbackContextTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/File/FallbackContextTest.php index 68d55d2fc1bae..a6fa73263c1c8 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Asset/File/FallbackContextTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Asset/File/FallbackContextTest.php @@ -6,7 +6,7 @@ namespace Magento\Framework\View\Asset\File; /** - * @covers \Magento\Framework\View\Asset\File\FallbackContext + * covers \Magento\Framework\View\Asset\File\FallbackContext */ class FallbackContextTest extends \PHPUnit_Framework_TestCase { @@ -26,7 +26,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\View\Asset\File\FallbackContext::getConfigPath + * covers \Magento\Framework\View\Asset\File\FallbackContext::getConfigPath * @param string $baseUrl * @param string $areaType * @param string $themePath diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/AbstractFileTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/AbstractFileTest.php index 1b17ab4324365..3ee5f3d56d92a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/AbstractFileTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/AbstractFileTest.php @@ -69,8 +69,8 @@ protected function tearDown() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::__construct - * @covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::create + * covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::__construct + * covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::create */ public function testCreate() { @@ -83,7 +83,7 @@ public function testCreate() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::getFullPath + * covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::getFullPath */ public function testGetFullPath() { @@ -108,10 +108,10 @@ public function testGetFullPath() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::prepareFile - * @covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::_prepareFileName - * @covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::_prepareFilePath - * @covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::_prepareSortOrder + * covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::prepareFile + * covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::_prepareFileName + * covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::_prepareFilePath + * covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::_prepareSortOrder * @dataProvider getTestContent */ public function testPrepareFile($type, $fileContent, $expectedContent, $existedFiles) @@ -204,8 +204,8 @@ public function getTestContent() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::save - * @covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::_saveFileContent + * covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::save + * covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::_saveFileContent */ public function testSave() { @@ -248,8 +248,8 @@ public function testSave() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::delete - * @covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::_deleteFileContent + * covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::delete + * covers \Magento\Framework\View\Design\Theme\Customization\AbstractFile::_deleteFileContent */ public function testDelete() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/PathTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/PathTest.php index e408ed7f86f6e..11b718841aee2 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/PathTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Customization/PathTest.php @@ -58,8 +58,8 @@ protected function tearDown() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization\Path::__construct - * @covers \Magento\Framework\View\Design\Theme\Customization\Path::getCustomizationPath + * covers \Magento\Framework\View\Design\Theme\Customization\Path::__construct + * covers \Magento\Framework\View\Design\Theme\Customization\Path::getCustomizationPath */ public function testGetCustomizationPath() { @@ -69,7 +69,7 @@ public function testGetCustomizationPath() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization\Path::getThemeFilesPath + * covers \Magento\Framework\View\Design\Theme\Customization\Path::getThemeFilesPath */ public function testGetThemeFilesPath() { @@ -80,7 +80,7 @@ public function testGetThemeFilesPath() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization\Path::getCustomViewConfigPath + * covers \Magento\Framework\View\Design\Theme\Customization\Path::getCustomViewConfigPath */ public function testGetCustomViewConfigPath() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/CustomizationTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/CustomizationTest.php index 82b49486b0600..e4bf1f96c3286 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/CustomizationTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/CustomizationTest.php @@ -75,8 +75,8 @@ protected function tearDown() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization::getFiles - * @covers \Magento\Framework\View\Design\Theme\Customization::__construct + * covers \Magento\Framework\View\Design\Theme\Customization::getFiles + * covers \Magento\Framework\View\Design\Theme\Customization::__construct */ public function testGetFiles() { @@ -93,7 +93,7 @@ public function testGetFiles() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization::getFilesByType + * covers \Magento\Framework\View\Design\Theme\Customization::getFilesByType */ public function testGetFilesByType() { @@ -112,7 +112,7 @@ public function testGetFilesByType() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization::generateFileInfo + * covers \Magento\Framework\View\Design\Theme\Customization::generateFileInfo */ public function testGenerationOfFileInfo() { @@ -122,7 +122,7 @@ public function testGenerationOfFileInfo() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization::getCustomizationPath + * covers \Magento\Framework\View\Design\Theme\Customization::getCustomizationPath */ public function testGetCustomizationPath() { @@ -139,7 +139,7 @@ public function testGetCustomizationPath() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization::getThemeFilesPath + * covers \Magento\Framework\View\Design\Theme\Customization::getThemeFilesPath * @dataProvider getThemeFilesPathDataProvider * @param string $type * @param string $expectedMethod @@ -172,7 +172,7 @@ public function getThemeFilesPathDataProvider() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization::getCustomViewConfigPath + * covers \Magento\Framework\View\Design\Theme\Customization::getCustomViewConfigPath */ public function testGetCustomViewConfigPath() { @@ -189,7 +189,7 @@ public function testGetCustomViewConfigPath() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization::reorder + * covers \Magento\Framework\View\Design\Theme\Customization::reorder * @dataProvider customFileContent */ public function testReorder($sequence, $filesContent) @@ -265,7 +265,7 @@ public function customFileContent() } /** - * @covers \Magento\Framework\View\Design\Theme\Customization::delete + * covers \Magento\Framework\View\Design\Theme\Customization::delete */ public function testDelete() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Domain/FactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Domain/FactoryTest.php index 1024b16bcc56f..b45d6ff8ae496 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Domain/FactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Domain/FactoryTest.php @@ -12,7 +12,7 @@ class FactoryTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Framework\View\Design\Theme\Domain\Factory::create + * covers \Magento\Framework\View\Design\Theme\Domain\Factory::create */ public function testCreate() { @@ -44,7 +44,7 @@ public function testCreate() } /** - * @covers \Magento\Framework\View\Design\Theme\Domain\Factory::create + * covers \Magento\Framework\View\Design\Theme\Domain\Factory::create */ public function testCreateWithWrongThemeType() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/FlyweightFactoryTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/FlyweightFactoryTest.php index 8fe6e05a0a854..09e3f7aff0e7a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/FlyweightFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/FlyweightFactoryTest.php @@ -27,7 +27,7 @@ protected function setUp() * @param string $path * @param int $expectedId * @dataProvider createByIdDataProvider - * @covers \Magento\Framework\View\Design\Theme\FlyweightFactory::create + * covers \Magento\Framework\View\Design\Theme\FlyweightFactory::create */ public function testCreateById($path, $expectedId) { @@ -61,7 +61,7 @@ public function createByIdDataProvider() } /** - * @covers \Magento\Framework\View\Design\Theme\FlyweightFactory::create + * covers \Magento\Framework\View\Design\Theme\FlyweightFactory::create */ public function testCreateByPath() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Image/UploaderTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Image/UploaderTest.php index 12387276463e8..13d084b628874 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Image/UploaderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/Image/UploaderTest.php @@ -125,7 +125,7 @@ public function uploadDataProvider() /** * @dataProvider uploadDataProvider - * @covers \Magento\Framework\View\Design\Theme\Image\Uploader::uploadPreviewImage + * covers \Magento\Framework\View\Design\Theme\Image\Uploader::uploadPreviewImage */ public function testUploadPreviewImage($isUploaded, $isValid, $checkExtension, $save, $result, $exception) { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php index 6997945dfc982..0446e0cbfa39c 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Design/Theme/ImageTest.php @@ -166,7 +166,7 @@ protected function _getThemeSampleData() } /** - * @covers \Magento\Framework\View\Design\Theme\Image::__construct + * covers \Magento\Framework\View\Design\Theme\Image::__construct */ public function testConstructor() { @@ -174,7 +174,7 @@ public function testConstructor() } /** - * @covers \Magento\Framework\View\Design\Theme\Image::createPreviewImage + * covers \Magento\Framework\View\Design\Theme\Image::createPreviewImage */ public function testCreatePreviewImage() { @@ -193,7 +193,7 @@ public function testCreatePreviewImage() } /** - * @covers \Magento\Framework\View\Design\Theme\Image::createPreviewImageCopy + * covers \Magento\Framework\View\Design\Theme\Image::createPreviewImageCopy */ public function testCreatePreviewImageCopy() { @@ -240,7 +240,7 @@ public function testCreatePreviewImageCopy() } /** - * @covers \Magento\Framework\View\Design\Theme\Image::removePreviewImage + * covers \Magento\Framework\View\Design\Theme\Image::removePreviewImage */ public function testRemovePreviewImage() { @@ -252,7 +252,7 @@ public function testRemovePreviewImage() } /** - * @covers \Magento\Framework\View\Design\Theme\Image::removePreviewImage + * covers \Magento\Framework\View\Design\Theme\Image::removePreviewImage */ public function testRemoveEmptyPreviewImage() { @@ -264,7 +264,7 @@ public function testRemoveEmptyPreviewImage() } /** - * @covers \Magento\Framework\View\Design\Theme\Image::uploadPreviewImage + * covers \Magento\Framework\View\Design\Theme\Image::uploadPreviewImage */ public function testUploadPreviewImage() { @@ -292,7 +292,7 @@ public function testUploadPreviewImage() } /** - * @covers \Magento\Framework\View\Design\Theme\Image::getPreviewImageUrl + * covers \Magento\Framework\View\Design\Theme\Image::getPreviewImageUrl */ public function testGetPreviewImageUrl() { @@ -307,7 +307,7 @@ public function testGetPreviewImageUrl() } /** - * @covers \Magento\Framework\View\Design\Theme\Image::getPreviewImageUrl + * covers \Magento\Framework\View\Design\Theme\Image::getPreviewImageUrl */ public function testGetDefaultPreviewImageUrl() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Helper/JsTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Helper/JsTest.php index 2262411bb031f..e1bbdbd268a2f 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Helper/JsTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Helper/JsTest.php @@ -8,7 +8,7 @@ class JsTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Framework\View\Helper\Js::getScript + * covers \Magento\Framework\View\Helper\Js::getScript */ public function testGetScript() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/BuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/BuilderTest.php index c3739b34d952b..dc0420a6f3460 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/BuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/BuilderTest.php @@ -10,14 +10,14 @@ /** * Class BuilderTest - * @covers \Magento\Framework\View\Layout\Builder + * covers \Magento\Framework\View\Layout\Builder */ class BuilderTest extends \PHPUnit_Framework_TestCase { const CLASS_NAME = 'Magento\Framework\View\Layout\Builder'; /** - * @covers \Magento\Framework\View\Layout\Builder::build() + * covers \Magento\Framework\View\Layout\Builder::build() */ public function testBuild() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Generator/BlockTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Generator/BlockTest.php index d6d6a3d70e929..50f211911697d 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Generator/BlockTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Generator/BlockTest.php @@ -6,13 +6,13 @@ namespace Magento\Framework\View\Layout\Generator; /** - * @covers Magento\Framework\View\Layout\Generator\Block + * covers Magento\Framework\View\Layout\Generator\Block */ class BlockTest extends \PHPUnit_Framework_TestCase { /** - * @covers Magento\Framework\View\Layout\Generator\Block::process() - * @covers Magento\Framework\View\Layout\Generator\Block::createBlock() + * covers Magento\Framework\View\Layout\Generator\Block::process() + * covers Magento\Framework\View\Layout\Generator\Block::createBlock() * @param string $testGroup * @param string $testTemplate * @param string $testTtl diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/BlockTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/BlockTest.php index 812277405dad2..67378529fe524 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/BlockTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/BlockTest.php @@ -12,7 +12,7 @@ /** * Class BlockTest * - * @covers Magento\Framework\View\Layout\Reader\Block + * covers Magento\Framework\View\Layout\Reader\Block */ class BlockTest extends \PHPUnit_Framework_TestCase { @@ -96,7 +96,7 @@ public function setUp() * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $isSetFlagCount * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $scheduleStructureCount * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $getScopeCount - * @covers Magento\Framework\View\Layout\Reader\Block::interpret() + * covers Magento\Framework\View\Layout\Reader\Block::interpret() * @dataProvider processDataProvider */ public function testProcessBlock( @@ -139,7 +139,7 @@ public function testProcessBlock( } /** - * @covers Magento\Framework\View\Layout\Reader\Block::interpret() + * covers Magento\Framework\View\Layout\Reader\Block::interpret() */ public function testProcessReference() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/ScheduledStructure/HelperTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/ScheduledStructure/HelperTest.php index 189edb4e3fc62..1b1579d7e168a 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/ScheduledStructure/HelperTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/ScheduledStructure/HelperTest.php @@ -10,7 +10,7 @@ /** * Class HelperTest - * @covers Magento\Framework\View\Layout\ScheduledStructure\Helper + * covers Magento\Framework\View\Layout\ScheduledStructure\Helper */ class HelperTest extends \PHPUnit_Framework_TestCase { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/ScheduledStructureTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/ScheduledStructureTest.php index 91a5a9b873df1..46a57e3bdee39 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/ScheduledStructureTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/ScheduledStructureTest.php @@ -59,7 +59,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::getListToMove + * covers \Magento\Framework\View\Layout\ScheduledStructure::getListToMove */ public function testGetListToMove() { @@ -71,7 +71,7 @@ public function testGetListToMove() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::getListToRemove + * covers \Magento\Framework\View\Layout\ScheduledStructure::getListToRemove */ public function testGetListToRemove() { @@ -83,7 +83,7 @@ public function testGetListToRemove() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::getElements + * covers \Magento\Framework\View\Layout\ScheduledStructure::getElements */ public function testGetElements() { @@ -91,7 +91,7 @@ public function testGetElements() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::getElement + * covers \Magento\Framework\View\Layout\ScheduledStructure::getElement */ public function testGetElement() { @@ -103,7 +103,7 @@ public function testGetElement() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::isElementsEmpty + * covers \Magento\Framework\View\Layout\ScheduledStructure::isElementsEmpty */ public function testIsElementsEmpty() { @@ -113,7 +113,7 @@ public function testIsElementsEmpty() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::setElement + * covers \Magento\Framework\View\Layout\ScheduledStructure::setElement */ public function testSetElement() { @@ -131,7 +131,7 @@ public function testSetElement() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::hasElement + * covers \Magento\Framework\View\Layout\ScheduledStructure::hasElement */ public function testHasElement() { @@ -140,7 +140,7 @@ public function testHasElement() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::unsetElement + * covers \Magento\Framework\View\Layout\ScheduledStructure::unsetElement */ public function testUnsetElement() { @@ -150,7 +150,7 @@ public function testUnsetElement() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::getElementToMove + * covers \Magento\Framework\View\Layout\ScheduledStructure::getElementToMove */ public function testGetElementToMove() { @@ -163,7 +163,7 @@ public function testGetElementToMove() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::setElementToMove + * covers \Magento\Framework\View\Layout\ScheduledStructure::setElementToMove */ public function testSetElementToMove() { @@ -181,7 +181,7 @@ public function testSetElementToMove() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::unsetElementFromListToRemove + * covers \Magento\Framework\View\Layout\ScheduledStructure::unsetElementFromListToRemove */ public function testUnsetElementFromListToRemove() { @@ -191,7 +191,7 @@ public function testUnsetElementFromListToRemove() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::setElementToRemoveList + * covers \Magento\Framework\View\Layout\ScheduledStructure::setElementToRemoveList */ public function testSetElementToRemoveList() { @@ -201,7 +201,7 @@ public function testSetElementToRemoveList() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::getStructure + * covers \Magento\Framework\View\Layout\ScheduledStructure::getStructure */ public function testGetStructure() { @@ -209,7 +209,7 @@ public function testGetStructure() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::getStructureElement + * covers \Magento\Framework\View\Layout\ScheduledStructure::getStructureElement */ public function testGetStructureElement() { @@ -221,7 +221,7 @@ public function testGetStructureElement() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::isStructureEmpty + * covers \Magento\Framework\View\Layout\ScheduledStructure::isStructureEmpty */ public function testIsStructureEmpty() { @@ -231,7 +231,7 @@ public function testIsStructureEmpty() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::hasStructureElement + * covers \Magento\Framework\View\Layout\ScheduledStructure::hasStructureElement */ public function testHasStructureElement() { @@ -240,7 +240,7 @@ public function testHasStructureElement() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::setStructureElement + * covers \Magento\Framework\View\Layout\ScheduledStructure::setStructureElement */ public function testSetStructureElement() { @@ -258,7 +258,7 @@ public function testSetStructureElement() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::unsetStructureElement + * covers \Magento\Framework\View\Layout\ScheduledStructure::unsetStructureElement */ public function testUnsetStructureElement() { @@ -268,7 +268,7 @@ public function testUnsetStructureElement() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::getPaths + * covers \Magento\Framework\View\Layout\ScheduledStructure::getPaths */ public function testGetPaths() { @@ -276,7 +276,7 @@ public function testGetPaths() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::getPath + * covers \Magento\Framework\View\Layout\ScheduledStructure::getPath */ public function testGetPath() { @@ -286,7 +286,7 @@ public function testGetPath() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::hasPath + * covers \Magento\Framework\View\Layout\ScheduledStructure::hasPath */ public function testHasPath() { @@ -295,7 +295,7 @@ public function testHasPath() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::setPathElement + * covers \Magento\Framework\View\Layout\ScheduledStructure::setPathElement */ public function testSetPathElement() { @@ -313,7 +313,7 @@ public function testSetPathElement() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::unsetPathElement + * covers \Magento\Framework\View\Layout\ScheduledStructure::unsetPathElement */ public function testUnsetPathElement() { @@ -323,7 +323,7 @@ public function testUnsetPathElement() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::flushPaths + * covers \Magento\Framework\View\Layout\ScheduledStructure::flushPaths */ public function testFlushPaths() { @@ -333,7 +333,7 @@ public function testFlushPaths() } /** - * @covers \Magento\Framework\View\Layout\ScheduledStructure::flushScheduledStructure + * covers \Magento\Framework\View\Layout\ScheduledStructure::flushScheduledStructure */ public function testFlushScheduledStructure() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/LayoutTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/LayoutTest.php index 07792d1add264..9b8323905c1c9 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/LayoutTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/LayoutTest.php @@ -400,9 +400,9 @@ public function isManipulationAllowedDataProvider() } /** - * @covers \Magento\Framework\View\Layout::setBlock - * @covers \Magento\Framework\View\Layout::getAllBlocks - * @covers \Magento\Framework\View\Layout::unsetElement + * covers \Magento\Framework\View\Layout::setBlock + * covers \Magento\Framework\View\Layout::getAllBlocks + * covers \Magento\Framework\View\Layout::unsetElement */ public function testSetGetBlock() { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Page/BuilderTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Page/BuilderTest.php index eca6dc7badffd..60d8cbe861db5 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Page/BuilderTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Page/BuilderTest.php @@ -10,7 +10,7 @@ /** * Class BuilderTest - * @covers \Magento\Framework\View\Page\Builder + * covers \Magento\Framework\View\Page\Builder */ class BuilderTest extends \Magento\Framework\View\Layout\BuilderTest { diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Result/LayoutTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Result/LayoutTest.php index b9dc7d0afbf4e..33f0c0ce6fc85 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Result/LayoutTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Result/LayoutTest.php @@ -8,7 +8,7 @@ /** * Class LayoutTest - * @covers \Magento\Framework\View\Result\Layout + * covers \Magento\Framework\View\Result\Layout */ class LayoutTest extends \PHPUnit_Framework_TestCase { @@ -57,7 +57,7 @@ protected function setUp() } /** - * @covers \Magento\Framework\View\Result\Layout::getLayout() + * covers \Magento\Framework\View\Result\Layout::getLayout() */ public function testGetLayout() { diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Adminhtml/Product/Composite/Fieldset/GroupedTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Adminhtml/Product/Composite/Fieldset/GroupedTest.php index 796207b675067..75e3348e41f1c 100644 --- a/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Adminhtml/Product/Composite/Fieldset/GroupedTest.php +++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Adminhtml/Product/Composite/Fieldset/GroupedTest.php @@ -63,7 +63,7 @@ protected function setUp() } /** - * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getProduct + * covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getProduct */ public function testGetProductPositive() { @@ -86,7 +86,7 @@ public function testGetProductPositive() } /** - * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getProduct + * covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getProduct */ public function testGetProductNegative() { @@ -130,7 +130,7 @@ public function testGetProductNegative() } /** - * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getAssociatedProducts + * covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getAssociatedProducts */ public function testGetAssociatedProducts() { @@ -166,7 +166,7 @@ public function testGetAssociatedProducts() } /** - * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::setPreconfiguredValue + * covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::setPreconfiguredValue */ public function testSetPreconfiguredValue() { @@ -213,7 +213,7 @@ public function testSetPreconfiguredValue() } /** - * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getCanShowProductPrice + * covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getCanShowProductPrice */ public function testGetCanShowProductPrice() { @@ -221,7 +221,7 @@ public function testGetCanShowProductPrice() } /** - * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getIsLastFieldset + * covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getIsLastFieldset */ public function testGetIsLastFieldsetPositive() { @@ -236,7 +236,7 @@ public function testGetIsLastFieldsetPositive() * @param array|bool $options * @param bool $expectedResult * - * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getIsLastFieldset + * covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getIsLastFieldset * @dataProvider getIsLastFieldsetDataProvider */ public function testGetIsLastFieldsetNegative($options, $expectedResult) @@ -274,7 +274,7 @@ public function getIsLastFieldsetDataProvider() } /** - * @covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getCurrencyPrice + * covers Magento\GroupedProduct\Block\Adminhtml\Product\Composite\Fieldset\Grouped::getCurrencyPrice */ public function testGetCurrencyPrice() { diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts/ListAssociatedProductsTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts/ListAssociatedProductsTest.php index d57ec03abd9db..ced261459a684 100644 --- a/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts/ListAssociatedProductsTest.php +++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProducts/ListAssociatedProductsTest.php @@ -76,7 +76,7 @@ protected function setUp() } /** - * @covers Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts + * covers Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts\ListAssociatedProducts * ::getAssociatedProducts */ public function testGetAssociatedProducts() diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProductsTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProductsTest.php index 27bfee0b00366..ae277dba49af1 100644 --- a/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProductsTest.php +++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Block/Product/Grouped/AssociatedProductsTest.php @@ -24,7 +24,7 @@ protected function setUp() } /** - * @covers Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts::getParentTab + * covers Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts::getParentTab */ public function testGetParentTab() { @@ -32,7 +32,7 @@ public function testGetParentTab() } /** - * @covers Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts::getTabLabel + * covers Magento\GroupedProduct\Block\Product\Grouped\AssociatedProducts::getTabLabel */ public function testGetTabLabel() { diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Helper/Product/Configuration/Plugin/GroupedTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Helper/Product/Configuration/Plugin/GroupedTest.php index fa1843b390c34..fb75015ebe2ea 100644 --- a/dev/tests/unit/testsuite/Magento/GroupedProduct/Helper/Product/Configuration/Plugin/GroupedTest.php +++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Helper/Product/Configuration/Plugin/GroupedTest.php @@ -70,7 +70,7 @@ protected function setUp() } /** - * @covers Magento\GroupedProduct\Helper\Product\Configuration\Plugin\Grouped::aroundGetOptions + * covers Magento\GroupedProduct\Helper\Product\Configuration\Plugin\Grouped::aroundGetOptions */ public function testAroundGetOptionsGroupedProductWithAssociated() { @@ -136,7 +136,7 @@ public function testAroundGetOptionsGroupedProductWithAssociated() } /** - * @covers Magento\GroupedProduct\Helper\Product\Configuration\Plugin\Grouped::aroundGetOptions + * covers Magento\GroupedProduct\Helper\Product\Configuration\Plugin\Grouped::aroundGetOptions */ public function testAroundGetOptionsGroupedProductWithoutAssociated() { @@ -173,7 +173,7 @@ public function testAroundGetOptionsGroupedProductWithoutAssociated() } /** - * @covers Magento\GroupedProduct\Helper\Product\Configuration\Plugin\Grouped::aroundGetOptions + * covers Magento\GroupedProduct\Helper\Product\Configuration\Plugin\Grouped::aroundGetOptions */ public function testAroundGetOptionsAnotherProductType() { diff --git a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/Grouped/PriceTest.php b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/Grouped/PriceTest.php index 59d52a48ca39f..0881621b7ded4 100644 --- a/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/Grouped/PriceTest.php +++ b/dev/tests/unit/testsuite/Magento/GroupedProduct/Model/Product/Type/Grouped/PriceTest.php @@ -29,7 +29,7 @@ protected function setUp() } /** - * @covers Magento\GroupedProduct\Model\Product\Type\Grouped\Price::getFinalPrice + * covers Magento\GroupedProduct\Model\Product\Type\Grouped\Price::getFinalPrice */ public function testGetFinalPriceIfQtyIsNullAndFinalPriceExist() { @@ -55,7 +55,7 @@ public function testGetFinalPriceIfQtyIsNullAndFinalPriceExist() * @param $expectedFinalPrice * * @dataProvider getFinalPriceDataProvider - * @covers Magento\GroupedProduct\Model\Product\Type\Grouped\Price::getFinalPrice + * covers Magento\GroupedProduct\Model\Product\Type\Grouped\Price::getFinalPrice */ public function testGetFinalPrice( array $associatedProducts, diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/AbstractEavTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/AbstractEavTest.php index 0e278558505bc..a012420c0a346 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/AbstractEavTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/Entity/AbstractEavTest.php @@ -50,7 +50,7 @@ protected function tearDown() /** * Test for method _addAttributesToCollection() * - * @covers \Magento\ImportExport\Model\Export\Entity\AbstractEav::_addAttributesToCollection + * covers \Magento\ImportExport\Model\Export\Entity\AbstractEav::_addAttributesToCollection */ public function testAddAttributesToCollection() { @@ -70,8 +70,8 @@ public function testAddAttributesToCollection() /** * Test for methods _addAttributeValuesToRow() * - * @covers \Magento\ImportExport\Model\Export\Entity\AbstractEav::_initAttributeValues - * @covers \Magento\ImportExport\Model\Export\Entity\AbstractEav::_addAttributeValuesToRow + * covers \Magento\ImportExport\Model\Export\Entity\AbstractEav::_initAttributeValues + * covers \Magento\ImportExport\Model\Export\Entity\AbstractEav::_addAttributeValuesToRow */ public function testAddAttributeValuesToRow() { diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php index bd69a4a06e4b4..393fdbbc9bf8c 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Export/EntityAbstractTest.php @@ -14,8 +14,8 @@ class EntityAbstractTest extends \PHPUnit_Framework_TestCase /** * Test for setter and getter of file name property * - * @covers \Magento\ImportExport\Model\Export\AbstractEntity::getFileName - * @covers \Magento\ImportExport\Model\Export\AbstractEntity::setFileName + * covers \Magento\ImportExport\Model\Export\AbstractEntity::getFileName + * covers \Magento\ImportExport\Model\Export\AbstractEntity::setFileName */ public function testGetFileNameAndSetFileName() { diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/AbstractTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/AbstractTest.php index af1f9e833f5ba..f3b9341ea9f69 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/AbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/AbstractTest.php @@ -67,7 +67,7 @@ protected function _createSourceAdapterMock(array $columns) /** * Test for method validateData() * - * @covers \Magento\ImportExport\Model\Import\Entity\AbstractEntity::validateData + * covers \Magento\ImportExport\Model\Import\Entity\AbstractEntity::validateData * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Columns number: "1" have empty headers */ @@ -80,7 +80,7 @@ public function testValidateDataEmptyColumnName() /** * Test for method validateData() * - * @covers \Magento\ImportExport\Model\Import\Entity\AbstractEntity::validateData + * covers \Magento\ImportExport\Model\Import\Entity\AbstractEntity::validateData * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Columns number: "1" have empty headers */ @@ -93,7 +93,7 @@ public function testValidateDataColumnNameWithWhitespaces() /** * Test for method validateData() * - * @covers \Magento\ImportExport\Model\Import\Entity\AbstractEntity::validateData + * covers \Magento\ImportExport\Model\Import\Entity\AbstractEntity::validateData * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Column names: "_test1" are invalid */ @@ -107,7 +107,7 @@ public function testValidateDataAttributeNames() * Test for method isAttributeValid() * * @dataProvider isAttributeValidDataProvider - * @covers \Magento\ImportExport\Model\Import\Entity\AbstractEntity::isAttributeValid + * covers \Magento\ImportExport\Model\Import\Entity\AbstractEntity::isAttributeValid * * @param string $attrCode * @param array $attrParams diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/EavAbstractTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/EavAbstractTest.php index 288782ca318d4..655f1f7423ce0 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/EavAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/Entity/EavAbstractTest.php @@ -143,7 +143,7 @@ protected function _getModelDependencies() /** * Test entity type id getter * - * @covers \Magento\ImportExport\Model\Import\Entity\AbstractEav::getEntityTypeId + * covers \Magento\ImportExport\Model\Import\Entity\AbstractEav::getEntityTypeId */ public function testGetEntityTypeId() { diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php index 07a8d3be8980e..8a46010db0763 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Import/EntityAbstractTest.php @@ -83,7 +83,7 @@ protected function _getModelDependencies() /** * Test for method _prepareRowForDb() * - * @covers \Magento\ImportExport\Model\Import\AbstractEntity::_prepareRowForDb + * covers \Magento\ImportExport\Model\Import\AbstractEntity::_prepareRowForDb */ public function testPrepareRowForDb() { @@ -212,7 +212,7 @@ public function testIsRowAllowedToImport() /** * Test for method getBehavior() with $rowData argument = null * - * @covers \Magento\ImportExport\Model\Import\AbstractEntity::getBehavior + * covers \Magento\ImportExport\Model\Import\AbstractEntity::getBehavior */ public function testGetBehaviorWithoutRowData() { @@ -376,7 +376,7 @@ public function dataProviderForTestGetBehaviorWithRowData() /** * Test for method getBehavior() with $rowData argument = null * - * @covers \Magento\ImportExport\Model\Import\AbstractEntity::getBehavior + * covers \Magento\ImportExport\Model\Import\AbstractEntity::getBehavior * * @dataProvider dataProviderForTestGetBehaviorWithRowData * @param $inputBehavior @@ -525,7 +525,7 @@ protected function _getDataSet($code, $type, $validValue, $invalidValue, $isUniq /** * Test for method validateData() * - * @covers \Magento\ImportExport\Model\Import\AbstractEntity::validateData + * covers \Magento\ImportExport\Model\Import\AbstractEntity::validateData * @expectedException \Magento\Framework\Model\Exception */ public function testValidateDataPermanentAttributes() @@ -544,7 +544,7 @@ public function testValidateDataPermanentAttributes() /** * Test for method validateData() * - * @covers \Magento\ImportExport\Model\Import\AbstractEntity::validateData + * covers \Magento\ImportExport\Model\Import\AbstractEntity::validateData * @expectedException \Magento\Framework\Model\Exception */ public function testValidateDataEmptyColumnName() @@ -556,7 +556,7 @@ public function testValidateDataEmptyColumnName() /** * Test for method validateData() * - * @covers \Magento\ImportExport\Model\Import\AbstractEntity::validateData + * covers \Magento\ImportExport\Model\Import\AbstractEntity::validateData * @expectedException \Magento\Framework\Model\Exception */ public function testValidateDataColumnNameWithWhitespaces() @@ -568,7 +568,7 @@ public function testValidateDataColumnNameWithWhitespaces() /** * Test for method validateData() * - * @covers \Magento\ImportExport\Model\Import\AbstractEntity::validateData + * covers \Magento\ImportExport\Model\Import\AbstractEntity::validateData * @expectedException \Magento\Framework\Model\Exception */ public function testValidateDataAttributeNames() diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/CollectionByPagesIteratorTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/CollectionByPagesIteratorTest.php index 22ca3357dd73f..22dd48c73e182 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/CollectionByPagesIteratorTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Resource/CollectionByPagesIteratorTest.php @@ -27,7 +27,7 @@ protected function tearDown() } /** - * @covers \Magento\ImportExport\Model\Resource\CollectionByPagesIterator::iterate + * covers \Magento\ImportExport\Model\Resource\CollectionByPagesIterator::iterate */ public function testIterate() { diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Source/Import/Behavior/BasicTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Source/Import/Behavior/BasicTest.php index a3980011d067f..e550643d41506 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Source/Import/Behavior/BasicTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Source/Import/Behavior/BasicTest.php @@ -38,7 +38,7 @@ protected function setUp() /** * Test toArray method * - * @covers \Magento\ImportExport\Model\Source\Import\Behavior\Basic::toArray + * covers \Magento\ImportExport\Model\Source\Import\Behavior\Basic::toArray */ public function testToArray() { @@ -50,7 +50,7 @@ public function testToArray() /** * Test behavior group code * - * @covers \Magento\ImportExport\Model\Source\Import\Behavior\Basic::getCode + * covers \Magento\ImportExport\Model\Source\Import\Behavior\Basic::getCode */ public function testGetCode() { diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Source/Import/Behavior/CustomTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Source/Import/Behavior/CustomTest.php index 9004b1af7958f..9d19a82441d50 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Source/Import/Behavior/CustomTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Source/Import/Behavior/CustomTest.php @@ -38,7 +38,7 @@ protected function setUp() /** * Test toArray method * - * @covers \Magento\ImportExport\Model\Source\Import\Behavior\Custom::toArray + * covers \Magento\ImportExport\Model\Source\Import\Behavior\Custom::toArray */ public function testToArray() { @@ -50,7 +50,7 @@ public function testToArray() /** * Test behavior group code * - * @covers \Magento\ImportExport\Model\Source\Import\Behavior\Custom::getCode + * covers \Magento\ImportExport\Model\Source\Import\Behavior\Custom::getCode */ public function testGetCode() { diff --git a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Source/Import/BehaviorAbstractTest.php b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Source/Import/BehaviorAbstractTest.php index ce8323363f170..07fa27c62a794 100644 --- a/dev/tests/unit/testsuite/Magento/ImportExport/Model/Source/Import/BehaviorAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/ImportExport/Model/Source/Import/BehaviorAbstractTest.php @@ -49,7 +49,7 @@ protected function setUp() /** * Test for toOptionArray method * - * @covers \Magento\ImportExport\Model\Source\Import\AbstractBehavior::toOptionArray + * covers \Magento\ImportExport\Model\Source\Import\AbstractBehavior::toOptionArray */ public function testToOptionArray() { diff --git a/dev/tests/unit/testsuite/Magento/LayeredNavigation/Block/NavigationTest.php b/dev/tests/unit/testsuite/Magento/LayeredNavigation/Block/NavigationTest.php index 8431e8f7bf2e4..f5c9cdf151a99 100644 --- a/dev/tests/unit/testsuite/Magento/LayeredNavigation/Block/NavigationTest.php +++ b/dev/tests/unit/testsuite/Magento/LayeredNavigation/Block/NavigationTest.php @@ -85,9 +85,9 @@ public function testGetStateHtml() } /** - * @covers \Magento\LayeredNavigation\Block\Navigation::getLayer() - * @covers \Magento\LayeredNavigation\Block\Navigation::getFilters() - * @covers \Magento\LayeredNavigation\Block\Navigation::canShowBlock() + * covers \Magento\LayeredNavigation\Block\Navigation::getLayer() + * covers \Magento\LayeredNavigation\Block\Navigation::getFilters() + * covers \Magento\LayeredNavigation\Block\Navigation::canShowBlock() */ public function testCanShowBlock() { diff --git a/dev/tests/unit/testsuite/Magento/PageCache/Block/JavascriptTest.php b/dev/tests/unit/testsuite/Magento/PageCache/Block/JavascriptTest.php index 162e20f4d0b6c..208cfec820e07 100644 --- a/dev/tests/unit/testsuite/Magento/PageCache/Block/JavascriptTest.php +++ b/dev/tests/unit/testsuite/Magento/PageCache/Block/JavascriptTest.php @@ -6,7 +6,7 @@ namespace Magento\PageCache\Block; /** - * @covers \Magento\PageCache\Block\Javascript + * covers \Magento\PageCache\Block\Javascript */ class JavascriptTest extends \PHPUnit_Framework_TestCase { @@ -92,7 +92,7 @@ protected function setUp() } /** - * @covers \Magento\PageCache\Block\Javascript::getScriptOptions + * covers \Magento\PageCache\Block\Javascript::getScriptOptions * @param bool $isSecure * @param string $url * @param string $expectedResult diff --git a/dev/tests/unit/testsuite/Magento/Payment/Block/Form/ContainerTest.php b/dev/tests/unit/testsuite/Magento/Payment/Block/Form/ContainerTest.php index 7d6014128d3ae..a26e22223f3ee 100644 --- a/dev/tests/unit/testsuite/Magento/Payment/Block/Form/ContainerTest.php +++ b/dev/tests/unit/testsuite/Magento/Payment/Block/Form/ContainerTest.php @@ -12,7 +12,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Payment\Block\Form\Container::getChildBlock + * covers \Magento\Payment\Block\Form\Container::getChildBlock */ public function testSetMethodFormTemplate() { diff --git a/dev/tests/unit/testsuite/Magento/Persistent/Model/SessionTest.php b/dev/tests/unit/testsuite/Magento/Persistent/Model/SessionTest.php index 3e5cb6c7695b0..e38e0f1ddb5f5 100644 --- a/dev/tests/unit/testsuite/Magento/Persistent/Model/SessionTest.php +++ b/dev/tests/unit/testsuite/Magento/Persistent/Model/SessionTest.php @@ -85,7 +85,7 @@ public function testLoadByCookieKeyWithNull() } /** - * @covers \Magento\Persistent\Model\Session::removePersistentCookie + * covers \Magento\Persistent\Model\Session::removePersistentCookie */ public function testAfterDeleteCommit() { diff --git a/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/Item/RelatedProductsTest.php b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/Item/RelatedProductsTest.php index 6403e1054d93e..946cf0d9eea04 100644 --- a/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/Item/RelatedProductsTest.php +++ b/dev/tests/unit/testsuite/Magento/Quote/Model/Quote/Item/RelatedProductsTest.php @@ -28,7 +28,7 @@ protected function setUp() * @param int|bool $productId * @param array $expectedResult * - * @covers \Magento\Quote\Model\Quote\Item\RelatedProducts::getRelatedProductIds + * covers \Magento\Quote\Model\Quote\Item\RelatedProducts::getRelatedProductIds * @dataProvider getRelatedProductIdsDataProvider */ public function testGetRelatedProductIds($optionValue, $productId, $expectedResult) @@ -75,7 +75,7 @@ public function getRelatedProductIdsDataProvider() } /** - * @covers \Magento\Quote\Model\Quote\Item\RelatedProducts::getRelatedProductIds + * covers \Magento\Quote\Model\Quote\Item\RelatedProducts::getRelatedProductIds */ public function testGetRelatedProductIdsNoOptions() { diff --git a/dev/tests/unit/testsuite/Magento/Reports/Model/Plugin/LogTest.php b/dev/tests/unit/testsuite/Magento/Reports/Model/Plugin/LogTest.php index 3d2461676b62b..e6d05dff149e2 100644 --- a/dev/tests/unit/testsuite/Magento/Reports/Model/Plugin/LogTest.php +++ b/dev/tests/unit/testsuite/Magento/Reports/Model/Plugin/LogTest.php @@ -66,7 +66,7 @@ protected function setUp() } /** - * @covers \Magento\Reports\Model\Plugin\Log::afterClean + * covers \Magento\Reports\Model\Plugin\Log::afterClean */ public function testAfterClean() { diff --git a/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/CombineTest.php b/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/CombineTest.php index e4d42a4cca751..f9fe5d0387ee0 100644 --- a/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/CombineTest.php +++ b/dev/tests/unit/testsuite/Magento/Rule/Model/Condition/CombineTest.php @@ -62,7 +62,7 @@ protected function setUp() /** * - * @covers \Magento\Rule\Model\Condition\AbstractCondition::getValueName + * covers \Magento\Rule\Model\Condition\AbstractCondition::getValueName * * @dataProvider optionValuesData * diff --git a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php index 8141a6af4c9ee..a86b4db47356f 100644 --- a/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Block/Adminhtml/Order/Create/Items/GridTest.php @@ -218,7 +218,7 @@ protected function prepareItem($tierPrices, $productType) } /** - * @covers \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid::getItems + * covers \Magento\Sales\Block\Adminhtml\Order\Create\Items\Grid::getItems */ public function testGetItems() { diff --git a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php index 2700025b25761..67636393754e2 100644 --- a/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php +++ b/dev/tests/unit/testsuite/Magento/SalesRule/Model/Rule/Action/Discount/CartFixedTest.php @@ -78,7 +78,7 @@ protected function setUp() } /** - * @covers \Magento\SalesRule\Model\Rule\Action\Discount\CartFixed::calculate + * covers \Magento\SalesRule\Model\Rule\Action\Discount\CartFixed::calculate */ public function testCalculate() { diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Model/Carrier/AbstractCarrierOnlineTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Model/Carrier/AbstractCarrierOnlineTest.php index 2d8642bc7702a..2f2d0b72d506a 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Model/Carrier/AbstractCarrierOnlineTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Model/Carrier/AbstractCarrierOnlineTest.php @@ -59,7 +59,7 @@ protected function setUp() } /** - * @covers \Magento\Shipping\Model\Shipping::composePackagesForCarrier + * covers \Magento\Shipping\Model\Shipping::composePackagesForCarrier */ public function testComposePackages() { diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Model/ShippingTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Model/ShippingTest.php index c16ec9de790e2..9c766b80d8388 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Model/ShippingTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Model/ShippingTest.php @@ -62,7 +62,7 @@ protected function setUp() } /** - * @covers \Magento\Shipping\Model\Shipping::composePackagesForCarrier + * covers \Magento\Shipping\Model\Shipping::composePackagesForCarrier */ public function testComposePackages() { diff --git a/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/ReaderPoolTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/ReaderPoolTest.php index 577c58a6f788a..4e08ba501b670 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/ReaderPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/Config/Reader/ReaderPoolTest.php @@ -47,7 +47,7 @@ protected function setUp() } /** - * @covers \Magento\Store\Model\Config\Reader\ReaderPool::getReader + * covers \Magento\Store\Model\Config\Reader\ReaderPool::getReader * @dataProvider getReaderDataProvider * @param string $scope * @param string $instanceType diff --git a/dev/tests/unit/testsuite/Magento/Store/Model/StorageFactoryTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/StorageFactoryTest.php index d1b60f61bd714..677ad5fd465c7 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/StorageFactoryTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/StorageFactoryTest.php @@ -251,11 +251,11 @@ public function testGetWithInvalidStorageClassName() } /** - * @covers \Magento\Store\Model\StorageFactory::_reinitStores - * @covers \Magento\Store\Model\StorageFactory::_getStoreByGroup - * @covers \Magento\Store\Model\StorageFactory::_getStoreByWebsite - * @covers \Magento\Store\Model\StorageFactory::_checkCookieStore - * @covers \Magento\Store\Model\StorageFactory::_checkRequestStore + * covers \Magento\Store\Model\StorageFactory::_reinitStores + * covers \Magento\Store\Model\StorageFactory::_getStoreByGroup + * covers \Magento\Store\Model\StorageFactory::_getStoreByWebsite + * covers \Magento\Store\Model\StorageFactory::_checkCookieStore + * covers \Magento\Store\Model\StorageFactory::_checkRequestStore * * @dataProvider getWithStoresReinitDataProvider * @@ -313,9 +313,9 @@ public function testGetWithStoresReinitUnknownScopeType() } /** - * @covers \Magento\Store\Model\StorageFactory::_checkCookieStore - * @covers \Magento\Store\Model\StorageFactory::getActiveStoreByCode - * @covers \Magento\Store\Model\StorageFactory::setCurrentStore + * covers \Magento\Store\Model\StorageFactory::_checkCookieStore + * covers \Magento\Store\Model\StorageFactory::getActiveStoreByCode + * covers \Magento\Store\Model\StorageFactory::setCurrentStore * * @dataProvider getFromCookieDataProvider */ @@ -352,9 +352,9 @@ public function getFromCookieDataProvider() } /** - * @covers \Magento\Store\Model\StorageFactory::_checkRequestStore - * @covers \Magento\Store\Model\StorageFactory::getActiveStoreByCode - * @covers \Magento\Store\Model\StorageFactory::setCurrentStore + * covers \Magento\Store\Model\StorageFactory::_checkRequestStore + * covers \Magento\Store\Model\StorageFactory::getActiveStoreByCode + * covers \Magento\Store\Model\StorageFactory::setCurrentStore * * @dataProvider getFromRequestDataProvider * diff --git a/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php b/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php index ea561e593e4a5..5c0cddd7cdfd5 100644 --- a/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php +++ b/dev/tests/unit/testsuite/Magento/Store/Model/StoreTest.php @@ -179,10 +179,10 @@ public function testGetUrl() /** * @dataProvider getBaseUrlDataProvider * - * @covers \Magento\Store\Model\Store::getBaseUrl - * @covers \Magento\Store\Model\Store::getCode - * @covers \Magento\Store\Model\Store::_updatePathUseRewrites - * @covers \Magento\Store\Model\Store::_getConfig + * covers \Magento\Store\Model\Store::getBaseUrl + * covers \Magento\Store\Model\Store::getCode + * covers \Magento\Store\Model\Store::_updatePathUseRewrites + * covers \Magento\Store\Model\Store::_getConfig * * @param string $type * @param boolean $secure @@ -595,7 +595,7 @@ public function isCurrentlySecureDataProvider() } /** - * @covers \Magento\Store\Model\Store::getBaseMediaDir + * covers \Magento\Store\Model\Store::getBaseMediaDir */ public function testGetBaseMediaDir() { @@ -608,7 +608,7 @@ public function testGetBaseMediaDir() } /** - * @covers \Magento\Store\Model\Store::getBaseStaticDir + * covers \Magento\Store\Model\Store::getBaseStaticDir */ public function testGetBaseStaticDir() { diff --git a/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/CssTest.php b/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/CssTest.php index 116115af88250..92eacf8e5b6dd 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/CssTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Block/Adminhtml/System/Design/Theme/Tab/CssTest.php @@ -126,7 +126,7 @@ protected static function getMethod($name) } /** - * @covers \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab\Css::getDownloadUrl + * covers \Magento\Theme\Block\Adminhtml\System\Design\Theme\Edit\Tab\Css::getDownloadUrl */ public function testGetterDownloadUrl() { diff --git a/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Header/LogoTest.php b/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Header/LogoTest.php index 03e4bdca9e7af..3c05697d8a4f6 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Header/LogoTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Block/Html/Header/LogoTest.php @@ -8,7 +8,7 @@ class LogoTest extends \PHPUnit_Framework_TestCase { /** - * @covers \Magento\Theme\Block\Html\Header\Logo::getLogoSrc + * covers \Magento\Theme\Block\Html\Header\Logo::getLogoSrc */ public function testGetLogoSrc() { diff --git a/dev/tests/unit/testsuite/Magento/Theme/Helper/StorageTest.php b/dev/tests/unit/testsuite/Magento/Theme/Helper/StorageTest.php index 37091442b424a..2f4832307ef93 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Helper/StorageTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Helper/StorageTest.php @@ -136,7 +136,7 @@ protected function tearDown() } /** - * @covers \Magento\Theme\Helper\Storage::getShortFilename + * covers \Magento\Theme\Helper\Storage::getShortFilename */ public function testGetShortFilename() { diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/ConfigTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/ConfigTest.php index 428bf670e9085..f56f7e987ab56 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Model/ConfigTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Model/ConfigTest.php @@ -95,7 +95,7 @@ protected function tearDown() } /** - * @covers \Magento\Theme\Model\Config::assignToStore + * covers \Magento\Theme\Model\Config::assignToStore */ public function testAssignToStoreInSingleStoreMode() { @@ -146,7 +146,7 @@ public function testAssignToStoreInSingleStoreMode() } /** - * @covers \Magento\Theme\Model\Config::assignToStore + * covers \Magento\Theme\Model\Config::assignToStore */ public function testAssignToStoreNonSingleStoreMode() { diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php index 605c16c895f06..0b09d1a8fa640 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php @@ -250,7 +250,7 @@ protected function tearDown() } /** - * @covers \Magento\Theme\Model\CopyService::_copyLayoutCustomization + * covers \Magento\Theme\Model\CopyService::_copyLayoutCustomization */ public function testCopyLayoutUpdates() { @@ -333,7 +333,7 @@ public function testCopyLayoutUpdates() } /** - * @covers \Magento\Theme\Model\CopyService::_copyDatabaseCustomization + * covers \Magento\Theme\Model\CopyService::_copyDatabaseCustomization * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ public function testCopyDatabaseCustomization() @@ -456,7 +456,7 @@ public function testCopyDatabaseCustomization() } /** - * @covers \Magento\Theme\Model\CopyService::_copyFilesystemCustomization + * covers \Magento\Theme\Model\CopyService::_copyFilesystemCustomization */ public function testCopyFilesystemCustomization() { diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php index 504cee015b4ab..9fb5749894b8f 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Wysiwyg/StorageTest.php @@ -102,8 +102,8 @@ protected function tearDown() } /** - * @covers \Magento\Theme\Model\Wysiwyg\Storage::_createThumbnail - * @covers \Magento\Theme\Model\Wysiwyg\Storage::uploadFile + * covers \Magento\Theme\Model\Wysiwyg\Storage::_createThumbnail + * covers \Magento\Theme\Model\Wysiwyg\Storage::uploadFile */ public function testUploadFile() { @@ -154,7 +154,7 @@ public function testUploadFile() } /** - * @covers \Magento\Theme\Model\Wysiwyg\Storage::uploadFile + * covers \Magento\Theme\Model\Wysiwyg\Storage::uploadFile * @expectedException \Magento\Framework\Model\Exception */ public function testUploadInvalidFile() @@ -183,7 +183,7 @@ protected function _prepareUploader() /** * @dataProvider booleanCasesDataProvider - * @covers \Magento\Theme\Model\Wysiwyg\Storage::createFolder + * covers \Magento\Theme\Model\Wysiwyg\Storage::createFolder */ public function testCreateFolder($isWritable) { @@ -252,7 +252,7 @@ public function testCreateFolder($isWritable) } /** - * @covers \Magento\Theme\Model\Wysiwyg\Storage::createFolder + * covers \Magento\Theme\Model\Wysiwyg\Storage::createFolder * @expectedException \Magento\Framework\Model\Exception */ public function testCreateFolderWithInvalidName() @@ -262,7 +262,7 @@ public function testCreateFolderWithInvalidName() } /** - * @covers \Magento\Theme\Model\Wysiwyg\Storage::createFolder + * covers \Magento\Theme\Model\Wysiwyg\Storage::createFolder * @expectedException \Magento\Framework\Model\Exception */ public function testCreateFolderDirectoryAlreadyExist() @@ -294,7 +294,7 @@ public function testCreateFolderDirectoryAlreadyExist() } /** - * @covers \Magento\Theme\Model\Wysiwyg\Storage::getDirsCollection + * covers \Magento\Theme\Model\Wysiwyg\Storage::getDirsCollection */ public function testGetDirsCollection() { @@ -318,7 +318,7 @@ public function testGetDirsCollection() } /** - * @covers \Magento\Theme\Model\Wysiwyg\Storage::getDirsCollection + * covers \Magento\Theme\Model\Wysiwyg\Storage::getDirsCollection * @expectedException \Magento\Framework\Model\Exception */ public function testGetDirsCollectionWrongDirName() @@ -337,7 +337,7 @@ public function testGetDirsCollectionWrongDirName() } /** - * @covers \Magento\Theme\Model\Wysiwyg\Storage::getFilesCollection + * covers \Magento\Theme\Model\Wysiwyg\Storage::getFilesCollection */ public function testGetFilesCollection() { @@ -373,7 +373,7 @@ public function testGetFilesCollection() } /** - * @covers \Magento\Theme\Model\Wysiwyg\Storage::getFilesCollection + * covers \Magento\Theme\Model\Wysiwyg\Storage::getFilesCollection */ public function testGetFilesCollectionImageType() { @@ -417,7 +417,7 @@ public function testGetFilesCollectionImageType() } /** - * @covers \Magento\Theme\Model\Wysiwyg\Storage::getTreeArray + * covers \Magento\Theme\Model\Wysiwyg\Storage::getTreeArray */ public function testTreeArray() { @@ -460,7 +460,7 @@ public function testTreeArray() } /** - * @covers \Magento\Theme\Model\Wysiwyg\Storage::deleteFile + * covers \Magento\Theme\Model\Wysiwyg\Storage::deleteFile */ public function testDeleteFile() { @@ -503,7 +503,7 @@ public function testDeleteFile() } /** - * @covers \Magento\Theme\Model\Wysiwyg\Storage::deleteDirectory + * covers \Magento\Theme\Model\Wysiwyg\Storage::deleteDirectory */ public function testDeleteDirectory() { @@ -523,7 +523,7 @@ public function testDeleteDirectory() } /** - * @covers \Magento\Theme\Model\Wysiwyg\Storage::deleteDirectory + * covers \Magento\Theme\Model\Wysiwyg\Storage::deleteDirectory * @expectedException \Magento\Framework\Model\Exception */ public function testDeleteRootDirectory() diff --git a/dev/tests/unit/testsuite/Magento/Tools/Migration/Acl/Db/LoggerAbstractTest.php b/dev/tests/unit/testsuite/Magento/Tools/Migration/Acl/Db/LoggerAbstractTest.php index d0ce3cf13fcd7..d63c4c17a69b9 100644 --- a/dev/tests/unit/testsuite/Magento/Tools/Migration/Acl/Db/LoggerAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Tools/Migration/Acl/Db/LoggerAbstractTest.php @@ -26,8 +26,8 @@ protected function tearDown() } /** - * @covers \Magento\Tools\Migration\Acl\Db\AbstractLogger::add() - * @covers \Magento\Tools\Migration\Acl\Db\AbstractLogger::__toString() + * covers \Magento\Tools\Migration\Acl\Db\AbstractLogger::add() + * covers \Magento\Tools\Migration\Acl\Db\AbstractLogger::__toString() */ public function testToString() { diff --git a/dev/tests/unit/testsuite/Magento/Tools/Migration/Acl/GeneratorTest.php b/dev/tests/unit/testsuite/Magento/Tools/Migration/Acl/GeneratorTest.php index 4518f238a5755..e0237bc7460b6 100644 --- a/dev/tests/unit/testsuite/Magento/Tools/Migration/Acl/GeneratorTest.php +++ b/dev/tests/unit/testsuite/Magento/Tools/Migration/Acl/GeneratorTest.php @@ -187,8 +187,8 @@ public function testGetAdminhtmlFiles() } /** - * @covers \Magento\Tools\Migration\Acl\Generator::parseNode - * @covers \Magento\Tools\Migration\Acl\Generator::generateId + * covers \Magento\Tools\Migration\Acl\Generator::parseNode + * covers \Magento\Tools\Migration\Acl\Generator::generateId */ public function testParseNode() { @@ -233,8 +233,8 @@ public function testParseAdminhtmlFiles() } /** - * @covers \Magento\Tools\Migration\Acl\Generator::updateAclResourceIds() - * @covers \Magento\Tools\Migration\Acl\Generator::updateChildAclNodes() (removing of xpath attribute) + * covers \Magento\Tools\Migration\Acl\Generator::updateAclResourceIds() + * covers \Magento\Tools\Migration\Acl\Generator::updateChildAclNodes() (removing of xpath attribute) */ public function testUpdateAclResourceIds() { diff --git a/dev/tests/unit/testsuite/Magento/Tools/Migration/Acl/Menu/GeneratorTest.php b/dev/tests/unit/testsuite/Magento/Tools/Migration/Acl/Menu/GeneratorTest.php index fd0bd2e460fd7..967d4ef6a9a2a 100644 --- a/dev/tests/unit/testsuite/Magento/Tools/Migration/Acl/Menu/GeneratorTest.php +++ b/dev/tests/unit/testsuite/Magento/Tools/Migration/Acl/Menu/GeneratorTest.php @@ -147,8 +147,8 @@ public function testInitParentItems() } /** - * @covers \Magento\Tools\Migration\Acl\Menu\Generator::buildMenuItemsXPath - * @covers \Magento\Tools\Migration\Acl\Menu\Generator::buildXPath + * covers \Magento\Tools\Migration\Acl\Menu\Generator::buildMenuItemsXPath + * covers \Magento\Tools\Migration\Acl\Menu\Generator::buildXPath */ public function testBuildMenuItemsXPath() { diff --git a/dev/tests/unit/testsuite/Magento/Tools/Migration/System/Configuration/LoggerAbstractTest.php b/dev/tests/unit/testsuite/Magento/Tools/Migration/System/Configuration/LoggerAbstractTest.php index 94a94bb4ae647..8600b424781ee 100644 --- a/dev/tests/unit/testsuite/Magento/Tools/Migration/System/Configuration/LoggerAbstractTest.php +++ b/dev/tests/unit/testsuite/Magento/Tools/Migration/System/Configuration/LoggerAbstractTest.php @@ -26,8 +26,8 @@ protected function tearDown() } /** - * @covers \Magento\Tools\Migration\System\Configuration\AbstractLogger::add() - * @covers \Magento\Tools\Migration\System\Configuration\AbstractLogger::__toString() + * covers \Magento\Tools\Migration\System\Configuration\AbstractLogger::add() + * covers \Magento\Tools\Migration\System\Configuration\AbstractLogger::__toString() */ public function testToString() { diff --git a/dev/tests/unit/testsuite/Magento/Ups/Model/CarrierTest.php b/dev/tests/unit/testsuite/Magento/Ups/Model/CarrierTest.php index a6cb5067125c0..6571fa55b91e3 100644 --- a/dev/tests/unit/testsuite/Magento/Ups/Model/CarrierTest.php +++ b/dev/tests/unit/testsuite/Magento/Ups/Model/CarrierTest.php @@ -43,7 +43,7 @@ protected function setUp() * @param int $freeShippingSubtotal * @param int $requestSubtotal * @param int $expectedPrice - * @covers Magento\Shipping\Model\Carrier\AbstractCarrierOnline::getMethodPrice + * covers Magento\Shipping\Model\Carrier\AbstractCarrierOnline::getMethodPrice */ public function testGetMethodPrice( $cost, diff --git a/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/Resource/UrlRewriteCollectionTest.php b/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/Resource/UrlRewriteCollectionTest.php index 8d0324fe4cb03..6eeea46c5e8a2 100644 --- a/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/Resource/UrlRewriteCollectionTest.php +++ b/dev/tests/unit/testsuite/Magento/UrlRewrite/Model/Resource/UrlRewriteCollectionTest.php @@ -94,7 +94,7 @@ protected function setUp() * @param bool $withAdmin * @param array $condition * @dataProvider dataProviderForTestAddStoreIfStoreIsArray - * @covers \Magento\UrlRewrite\Model\Resource\UrlRewriteCollection + * covers \Magento\UrlRewrite\Model\Resource\UrlRewriteCollection */ public function testAddStoreFilterIfStoreIsArray($storeId, $withAdmin, $condition) { @@ -121,7 +121,7 @@ public function dataProviderForTestAddStoreIfStoreIsArray() * @param bool $withAdmin * @param array $condition * @dataProvider dataProviderForTestAddStoreFilterIfStoreIsInt - * @covers \Magento\UrlRewrite\Model\Resource\UrlRewriteCollection + * covers \Magento\UrlRewrite\Model\Resource\UrlRewriteCollection */ public function testAddStoreFilterIfStoreIsInt($storeId, $withAdmin, $condition) { diff --git a/dev/tests/unit/testsuite/Magento/Usps/Helper/DataTest.php b/dev/tests/unit/testsuite/Magento/Usps/Helper/DataTest.php index e5b3b8696d7a7..31cd5124a3198 100644 --- a/dev/tests/unit/testsuite/Magento/Usps/Helper/DataTest.php +++ b/dev/tests/unit/testsuite/Magento/Usps/Helper/DataTest.php @@ -24,7 +24,7 @@ protected function setUp() } /** - * @covers \Magento\Usps\Helper\Data::displayGirthValue + * covers \Magento\Usps\Helper\Data::displayGirthValue * @dataProvider shippingMethodDataProvider */ public function testDisplayGirthValue($shippingMethod) @@ -33,7 +33,7 @@ public function testDisplayGirthValue($shippingMethod) } /** - * @covers \Magento\Usps\Helper\Data::displayGirthValue + * covers \Magento\Usps\Helper\Data::displayGirthValue */ public function testDisplayGirthValueFalse() { From 062c7f44133a18bcd369888ec93586a571445f17 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Thu, 5 Feb 2015 12:58:52 +0200 Subject: [PATCH 12/60] MAGETWO-33398: HTML response minification --- lib/internal/Magento/Framework/View/Template/Html/Minifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php index 984430d9286c7..2d46e0d847887 100644 --- a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php +++ b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php @@ -68,7 +68,7 @@ public function minify($file) '#(?)[^\n\r]*#', '', preg_replace( - '#//[^\n\r]*(\s\?\>)#', + '#(?)#', '$1', $this->appDirectory->readFile($file) ) From 1325bf8d9a6865eec7a7a1570191849d61140d09 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Thu, 5 Feb 2015 13:00:36 +0200 Subject: [PATCH 13/60] MAGETWO-33398: HTML response minification --- .../Magento/Framework/View/Template/Html/MinifierTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php index 39bbd3144d86f..8bf0792f9d7f6 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php @@ -108,6 +108,7 @@ public function testMinify() }); //]]> + TEXT; @@ -124,7 +125,7 @@ public function testMinify() } }); //]]> - + TEXT; $this->appDirectory->expects($this->once()) From aced6e9de0b49ad8635036747b85df7ac0f4ee58 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Thu, 5 Feb 2015 15:22:56 +0200 Subject: [PATCH 14/60] MAGETWO-31369: [South] Unit and Integration tests coverage --- app/code/Magento/Theme/Model/CopyService.php | 9 +- .../Magento/Theme/Model/CopyServiceTest.php | 186 ++++++++++-------- 2 files changed, 105 insertions(+), 90 deletions(-) diff --git a/app/code/Magento/Theme/Model/CopyService.php b/app/code/Magento/Theme/Model/CopyService.php index 3fd2b2ba29f55..2bf227c3569ef 100644 --- a/app/code/Magento/Theme/Model/CopyService.php +++ b/app/code/Magento/Theme/Model/CopyService.php @@ -197,11 +197,10 @@ protected function _copyFilesRecursively($baseDir, $sourceDir, $targetDir) */ protected function _deleteFilesRecursively($targetDir) { - if (!$this->_directory->isExist($targetDir)) { - return; - } - foreach ($this->_directory->read($targetDir) as $path) { - $this->_directory->delete($path); + if ($this->_directory->isExist($targetDir)) { + foreach ($this->_directory->read($targetDir) as $path) { + $this->_directory->delete($path); + } } } } diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php index 0b09d1a8fa640..7181a02a61d28 100644 --- a/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php +++ b/dev/tests/unit/testsuite/Magento/Theme/Model/CopyServiceTest.php @@ -12,69 +12,72 @@ class CopyServiceTest extends \PHPUnit_Framework_TestCase /**#@+ * @var \Magento\Theme\Model\CopyService */ - protected $_object; + protected $object; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_fileFactory; + protected $fileFactory; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_filesystem; + protected $filesystem; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_sourceTheme; + protected $sourceTheme; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_targetTheme; + protected $targetTheme; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_link; + protected $link; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_linkCollection; + protected $linkCollection; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_update; + protected $update; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_updateCollection; + protected $updateCollection; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_updateFactory; + protected $updateFactory; /** * @var \PHPUnit_Framework_MockObject_MockObject */ - protected $_customizationPath; + protected $customizationPath; /** * @var \PHPUnit_Framework_MockObject_MockObject[] */ - protected $_targetFiles = []; + protected $targetFiles = []; /** * @var \PHPUnit_Framework_MockObject_MockObject[] */ - protected $_sourceFiles = []; + protected $sourceFiles = []; - protected $_dirWriteMock; + /** + * @var \PHPUnit_Framework_MockObject_MockObject + */ + protected $dirWriteMock; /** * @return void @@ -112,8 +115,8 @@ protected function setUp() 'sort_order' => 20, ] ); - $this->_sourceFiles = [$sourceFileOne, $sourceFileTwo]; - $this->_sourceTheme = $this->getMock( + $this->sourceFiles = [$sourceFileOne, $sourceFileTwo]; + $this->sourceTheme = $this->getMock( 'Magento\Core\Model\Theme', ['__wakeup', 'getCustomization'], [], @@ -121,20 +124,20 @@ protected function setUp() false ); - $this->_targetFiles = [ + $this->targetFiles = [ $this->getMock('Magento\Core\Model\Theme\File', ['__wakeup', 'delete'], [], '', false), $this->getMock('Magento\Core\Model\Theme\File', ['__wakeup', 'delete'], [], '', false), ]; - $this->_targetTheme = $this->getMock( + $this->targetTheme = $this->getMock( 'Magento\Core\Model\Theme', ['__wakeup', 'getCustomization'], [], '', false ); - $this->_targetTheme->setId(123); + $this->targetTheme->setId(123); - $this->_customizationPath = $this->getMock( + $this->customizationPath = $this->getMock( 'Magento\Framework\View\Design\Theme\Customization\Path', [], [], @@ -142,79 +145,79 @@ protected function setUp() false ); - $this->_fileFactory = $this->getMock( + $this->fileFactory = $this->getMock( 'Magento\Framework\View\Design\Theme\FileFactory', ['create'], [], '', false ); - $this->_filesystem = + $this->filesystem = $this->getMock('Magento\Framework\Filesystem', ['getDirectoryWrite'], [], '', false); - $this->_dirWriteMock = $this->getMock( + $this->dirWriteMock = $this->getMock( 'Magento\Framework\Filesystem\Directory\Write', ['isDirectory', 'search', 'copy', 'delete', 'read', 'copyFile', 'isExist'], [], '', false ); - $this->_filesystem->expects( + $this->filesystem->expects( $this->any() )->method( 'getDirectoryWrite' )->with( DirectoryList::MEDIA )->will( - $this->returnValue($this->_dirWriteMock) + $this->returnValue($this->dirWriteMock) ); /* Init \Magento\Core\Model\Resource\Layout\Collection model */ - $this->_updateFactory = $this->getMock( + $this->updateFactory = $this->getMock( 'Magento\Core\Model\Layout\UpdateFactory', ['create'], [], '', false ); - $this->_update = $this->getMock( + $this->update = $this->getMock( 'Magento\Core\Model\Layout\Update', ['__wakeup', 'getCollection'], [], '', false ); - $this->_updateFactory->expects($this->at(0))->method('create')->will($this->returnValue($this->_update)); - $this->_updateCollection = $this->getMock( + $this->updateFactory->expects($this->at(0))->method('create')->will($this->returnValue($this->update)); + $this->updateCollection = $this->getMock( 'Magento\Core\Model\Resource\Layout\Collection', ['addThemeFilter', 'delete', 'getIterator'], [], '', false ); - $this->_update->expects( + $this->update->expects( $this->any() )->method( 'getCollection' )->will( - $this->returnValue($this->_updateCollection) + $this->returnValue($this->updateCollection) ); /* Init Link an Link_Collection model */ - $this->_link = $this->getMock( + $this->link = $this->getMock( 'Magento\Core\Model\Layout\Link', ['__wakeup', 'getCollection'], [], '', false ); - $this->_linkCollection = $this->getMock( + $this->linkCollection = $this->getMock( 'Magento\Core\Model\Resource\Layout\Link\Collection', ['addThemeFilter', 'getIterator'], [], '', false ); - $this->_link->expects($this->any())->method('getCollection')->will($this->returnValue($this->_linkCollection)); + $this->link->expects($this->any())->method('getCollection')->will($this->returnValue($this->linkCollection)); $eventManager = $this->getMock( 'Magento\Framework\Event\ManagerInterface', @@ -224,29 +227,29 @@ protected function setUp() false ); - $this->_object = new \Magento\Theme\Model\CopyService( - $this->_filesystem, - $this->_fileFactory, - $this->_link, - $this->_updateFactory, + $this->object = new \Magento\Theme\Model\CopyService( + $this->filesystem, + $this->fileFactory, + $this->link, + $this->updateFactory, $eventManager, - $this->_customizationPath + $this->customizationPath ); } protected function tearDown() { - $this->_object = null; - $this->_filesystem = null; - $this->_fileFactory = null; - $this->_sourceTheme = null; - $this->_targetTheme = null; - $this->_link = null; - $this->_linkCollection = null; - $this->_updateCollection = null; - $this->_updateFactory = null; - $this->_sourceFiles = []; - $this->_targetFiles = []; + $this->object = null; + $this->filesystem = null; + $this->fileFactory = null; + $this->sourceTheme = null; + $this->targetTheme = null; + $this->link = null; + $this->linkCollection = null; + $this->updateCollection = null; + $this->updateFactory = null; + $this->sourceFiles = []; + $this->targetFiles = []; } /** @@ -262,14 +265,14 @@ public function testCopyLayoutUpdates() false ); $customization->expects($this->atLeastOnce())->method('getFiles')->will($this->returnValue([])); - $this->_sourceTheme->expects( + $this->sourceTheme->expects( $this->once() )->method( 'getCustomization' )->will( $this->returnValue($customization) ); - $this->_targetTheme->expects( + $this->targetTheme->expects( $this->once() )->method( 'getCustomization' @@ -277,8 +280,8 @@ public function testCopyLayoutUpdates() $this->returnValue($customization) ); - $this->_updateCollection->expects($this->once())->method('delete'); - $this->_linkCollection->expects($this->once())->method('addThemeFilter'); + $this->updateCollection->expects($this->once())->method('delete'); + $this->linkCollection->expects($this->once())->method('addThemeFilter'); $targetLinkOne = $this->getMock( 'Magento\Core\Model\Layout\Link', @@ -308,7 +311,7 @@ public function testCopyLayoutUpdates() $targetLinkTwo->expects($this->at(3))->method('save'); $linkReturnValues = $this->onConsecutiveCalls(new \ArrayIterator([$targetLinkOne, $targetLinkTwo])); - $this->_linkCollection->expects($this->any())->method('getIterator')->will($linkReturnValues); + $this->linkCollection->expects($this->any())->method('getIterator')->will($linkReturnValues); $targetUpdateOne = $this->getMock( 'Magento\Core\Model\Layout\Update', @@ -326,10 +329,10 @@ public function testCopyLayoutUpdates() false ); $targetUpdateTwo->setData(['id' => 2]); - $updateReturnValues = $this->onConsecutiveCalls($this->_update, $targetUpdateOne, $targetUpdateTwo); - $this->_updateFactory->expects($this->any())->method('create')->will($updateReturnValues); + $updateReturnValues = $this->onConsecutiveCalls($this->update, $targetUpdateOne, $targetUpdateTwo); + $this->updateFactory->expects($this->any())->method('create')->will($updateReturnValues); - $this->_object->copy($this->_sourceTheme, $this->_targetTheme); + $this->object->copy($this->sourceTheme, $this->targetTheme); } /** @@ -350,9 +353,9 @@ public function testCopyDatabaseCustomization() )->method( 'getFiles' )->will( - $this->returnValue($this->_sourceFiles) + $this->returnValue($this->sourceFiles) ); - $this->_sourceTheme->expects( + $this->sourceTheme->expects( $this->once() )->method( 'getCustomization' @@ -371,9 +374,9 @@ public function testCopyDatabaseCustomization() )->method( 'getFiles' )->will( - $this->returnValue($this->_targetFiles) + $this->returnValue($this->targetFiles) ); - $this->_targetTheme->expects( + $this->targetTheme->expects( $this->once() )->method( 'getCustomization' @@ -381,14 +384,14 @@ public function testCopyDatabaseCustomization() $this->returnValue($targetCustom) ); - $this->_linkCollection->expects( + $this->linkCollection->expects( $this->any() )->method( 'addFieldToFilter' )->will( - $this->returnValue($this->_linkCollection) + $this->returnValue($this->linkCollection) ); - $this->_linkCollection->expects( + $this->linkCollection->expects( $this->any() )->method( 'getIterator' @@ -396,7 +399,7 @@ public function testCopyDatabaseCustomization() $this->returnValue(new \ArrayIterator([])) ); - foreach ($this->_targetFiles as $targetFile) { + foreach ($this->targetFiles as $targetFile) { $targetFile->expects($this->once())->method('delete'); } @@ -442,7 +445,7 @@ public function testCopyDatabaseCustomization() ] ); $newFileTwo->expects($this->at(1))->method('save'); - $this->_fileFactory->expects( + $this->fileFactory->expects( $this->any() )->method( 'create' @@ -452,7 +455,7 @@ public function testCopyDatabaseCustomization() $this->onConsecutiveCalls($newFileOne, $newFileTwo) ); - $this->_object->copy($this->_sourceTheme, $this->_targetTheme); + $this->object->copy($this->sourceTheme, $this->targetTheme); } /** @@ -468,14 +471,14 @@ public function testCopyFilesystemCustomization() false ); $customization->expects($this->atLeastOnce())->method('getFiles')->will($this->returnValue([])); - $this->_sourceTheme->expects( + $this->sourceTheme->expects( $this->once() )->method( 'getCustomization' )->will( $this->returnValue($customization) ); - $this->_targetTheme->expects( + $this->targetTheme->expects( $this->once() )->method( 'getCustomization' @@ -483,14 +486,14 @@ public function testCopyFilesystemCustomization() $this->returnValue($customization) ); - $this->_linkCollection->expects( + $this->linkCollection->expects( $this->any() )->method( 'addFieldToFilter' )->will( - $this->returnValue($this->_linkCollection) + $this->returnValue($this->linkCollection) ); - $this->_linkCollection->expects( + $this->linkCollection->expects( $this->any() )->method( 'getIterator' @@ -498,7 +501,7 @@ public function testCopyFilesystemCustomization() $this->returnValue(new \ArrayIterator([])) ); - $this->_customizationPath->expects( + $this->customizationPath->expects( $this->at(0) )->method( 'getCustomizationPath' @@ -506,7 +509,7 @@ public function testCopyFilesystemCustomization() $this->returnValue('source/path') ); - $this->_customizationPath->expects( + $this->customizationPath->expects( $this->at(1) )->method( 'getCustomizationPath' @@ -514,38 +517,51 @@ public function testCopyFilesystemCustomization() $this->returnValue('target/path') ); - $this->_dirWriteMock->expects( + $this->dirWriteMock->expects( $this->any() )->method( 'isDirectory' )->will( - $this->returnValueMap([['source/path', true]]) + $this->returnValueMap([['source/path', true], ['source/path/subdir', true]]) + ); + + $this->dirWriteMock->expects( + $this->any() + )->method( + 'isExist' + )->will( + $this->returnValueMap( + [ + ['target/path', true] + ] + ) ); - $this->_dirWriteMock->expects( + $this->dirWriteMock->expects( $this->any() )->method( 'read' )->will( $this->returnValueMap( [ - ['target/path', []], - ['source/path', ['source/path/file_one.jpg', 'source/path/file_two.png']], + ['target/path', ['target/path/subdir']], + ['source/path', ['source/path/subdir']], + ['source/path/subdir', ['source/path/subdir/file_one.jpg', 'source/path/subdir/file_two.png']], ] ) ); $expectedCopyEvents = [ - ['source/path/file_one.jpg', 'target/path/file_one.jpg', null], - ['source/path/file_two.png', 'target/path/file_two.png', null], + ['source/path/subdir/file_one.jpg', 'target/path/subdir/file_one.jpg', null], + ['source/path/subdir/file_two.png', 'target/path/subdir/file_two.png', null], ]; $actualCopyEvents = []; $recordCopyEvent = function () use (&$actualCopyEvents) { $actualCopyEvents[] = func_get_args(); }; - $this->_dirWriteMock->expects($this->any())->method('copyFile')->will($this->returnCallback($recordCopyEvent)); + $this->dirWriteMock->expects($this->any())->method('copyFile')->will($this->returnCallback($recordCopyEvent)); - $this->_object->copy($this->_sourceTheme, $this->_targetTheme); + $this->object->copy($this->sourceTheme, $this->targetTheme); $this->assertEquals($expectedCopyEvents, $actualCopyEvents); } From ff92d268ba7479c9232becfb08d753e19b84df93 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Thu, 5 Feb 2015 18:14:17 +0200 Subject: [PATCH 15/60] MAGETWO-31369: [South] Unit and Integration tests coverage --- .../Theme/Model/Favicon/FaviconTest.php | 129 ++++++++++++++++++ .../Customization/File/CustomCssTest.php | 106 ++++++++++++++ 2 files changed, 235 insertions(+) create mode 100644 dev/tests/unit/testsuite/Magento/Theme/Model/Favicon/FaviconTest.php create mode 100644 dev/tests/unit/testsuite/Magento/Theme/Model/Theme/Customization/File/CustomCssTest.php diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/Favicon/FaviconTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/Favicon/FaviconTest.php new file mode 100644 index 0000000000000..6aaa3f3c16944 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Favicon/FaviconTest.php @@ -0,0 +1,129 @@ +getMockBuilder('Magento\Store\Model\StoreManagerInterface')->getMock(); + $this->store = $this->getMockBuilder('Magento\Store\Model\Store')->disableOriginalConstructor()->getMock(); + $storeManager->expects($this->any()) + ->method('getStore') + ->willReturn($this->store); + /** @var \Magento\Store\Model\StoreManagerInterface $storeManager */ + $this->scopeManager = $this->getMockBuilder('Magento\Framework\App\Config\ScopeConfigInterface')->getMock(); + $this->fileStorageDatabase = $this->getMockBuilder('Magento\Core\Helper\File\Storage\Database') + ->disableOriginalConstructor() + ->getMock(); + $filesystem = $this->getMockBuilder('Magento\Framework\Filesystem') + ->disableOriginalConstructor() + ->getMock(); + $this->mediaDir = $this->getMockBuilder('Magento\Framework\Filesystem\Directory\ReadInterface')->getMock(); + $filesystem->expects($this->once()) + ->method('getDirectoryRead') + ->with(DirectoryList::MEDIA) + ->willReturn($this->mediaDir); + /** @var \Magento\Framework\Filesystem $filesystem */ + + $this->object = new Favicon( + $storeManager, + $this->scopeManager, + $this->fileStorageDatabase, + $filesystem + ); + } + + /** + * cover negative case for getFaviconFile + */ + public function testGetFaviconFileNegative() + { + $this->assertFalse($this->object->getFaviconFile()); + } + + /** + * cover positive case for getFaviconFile and checkIsFile + */ + public function testGetFaviconFile() + { + $scopeConfigValue = 'path'; + $urlToMediaDir = 'http://magneto.url/pub/media/'; + $expectedFile = ImageFavicon::UPLOAD_DIR . '/' . $scopeConfigValue; + $expectedUrl = $urlToMediaDir . $expectedFile; + + $this->scopeManager->expects($this->once()) + ->method('getValue') + ->with('design/head/shortcut_icon', ScopeInterface::SCOPE_STORE) + ->willReturn($scopeConfigValue); + $this->store->expects($this->once()) + ->method('getBaseUrl') + ->with(UrlInterface::URL_TYPE_MEDIA) + ->willReturn($urlToMediaDir); + $this->fileStorageDatabase->expects($this->once()) + ->method('checkDbUsage') + ->willReturn(true); + $this->fileStorageDatabase->expects($this->once()) + ->method('saveFileToFilesystem') + ->willReturn(true); + $this->mediaDir->expects($this->at(0)) + ->method('isFile') + ->with($expectedFile) + ->willReturn(false); + $this->mediaDir->expects($this->at(1)) + ->method('isFile') + ->with($expectedFile) + ->willReturn(true); + + $results = $this->object->getFaviconFile(); + $this->assertEquals( + $expectedUrl, + $results + ); + $this->assertNotFalse($results); + } + + /** + * cover getDefaultFavicon + */ + public function testGetDefaultFavicon() + { + $this->assertEquals('Magento_Theme::favicon.ico', $this->object->getDefaultFavicon()); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/Theme/Customization/File/CustomCssTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/Theme/Customization/File/CustomCssTest.php new file mode 100644 index 0000000000000..2c5bd1325a324 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Theme/Customization/File/CustomCssTest.php @@ -0,0 +1,106 @@ +customizationPath = $this->getMockBuilder('Magento\Framework\View\Design\Theme\Customization\Path') + ->disableOriginalConstructor() + ->getMock(); + $this->fileFactory = $this->getMockBuilder('Magento\Framework\View\Design\Theme\FileFactory') + ->setMethods(['create']) + ->disableOriginalConstructor() + ->getMock(); + $this->filesystem = $this->getMockBuilder('Magento\Framework\Filesystem') + ->disableOriginalConstructor() + ->getMock(); + + $this->object = new CustomCss( + $this->customizationPath, + $this->fileFactory, + $this->filesystem + ); + } + + /** + * cover _prepareSortOrder + * cover _prepareFileName + */ + public function testPrepareFile() + { + $file = $this->getMockBuilder('Magento\Framework\View\Design\Theme\FileInterface') + ->setMethods( + [ + 'delete', + 'save', + 'getContent', + 'getFileInfo', + 'getFullPath', + 'getFileName', + 'setFileName', + 'getTheme', + 'setTheme', + 'getCustomizationService', + 'setCustomizationService', + 'getId', + 'setData', + ] + ) + ->getMock(); + $file->expects($this->any()) + ->method('setData') + ->willReturnMap( + [ + ['file_type', CustomCss::TYPE, $this->returnSelf()], + ['file_path', CustomCss::TYPE . '/' . CustomCss::FILE_NAME, $this->returnSelf()], + ['sort_order', CustomCss::SORT_ORDER, $this->returnSelf()], + ] + ); + $file->expects($this->once()) + ->method('getId') + ->willReturn(null); + $file->expects($this->at(0)) + ->method('getFileName') + ->willReturn(null); + $file->expects($this->at(1)) + ->method('getFileName') + ->willReturn(CustomCss::FILE_NAME); + $file->expects($this->once()) + ->method('setFileName') + ->with(CustomCss::FILE_NAME); + + /** @var $file \Magento\Framework\View\Design\Theme\FileInterface */ + $this->assertInstanceOf( + 'Magento\Theme\Model\Theme\Customization\File\CustomCss', + $this->object->prepareFile($file) + ); + } +} From 99503610a391bf8b635bda0ee01cdc557db547ab Mon Sep 17 00:00:00 2001 From: okarpenko Date: Thu, 5 Feb 2015 18:26:30 +0200 Subject: [PATCH 16/60] MAGETWO-31369: Unit and Integration tests coverage - add unit test for Wishlist\Controller\Index\Add --- .../Wishlist/Controller/Index/AddTest.php | 775 ++++++++++++++++++ 1 file changed, 775 insertions(+) create mode 100644 dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/AddTest.php diff --git a/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/AddTest.php b/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/AddTest.php new file mode 100644 index 0000000000000..0442cfc341331 --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/AddTest.php @@ -0,0 +1,775 @@ +context = $this->getMock( + 'Magento\Framework\App\Action\Context', + [ + 'getRequest', + 'getResponse', + 'getObjectManager', + 'getEventManager', + 'getUrl', + 'getActionFlag', + 'getRedirect', + 'getView', + 'getMessageManager' + ], + [], + '', + false + ); + $this->wishlistProvider = $this->getMock( + 'Magento\Wishlist\Controller\WishlistProvider', + ['getWishlist'], + [], + '', + false + ); + $this->customerSession = $this->getMock( + 'Magento\Customer\Model\Session', + [ + 'getBeforeWishlistRequest', + 'unsBeforeWishlistRequest', + 'getBeforeWishlistUrl', + 'setAddActionReferer', + 'setBeforeWishlistUrl', + ], + [], + '', + false + ); + $this->productRepository = $this->getMock( + '\Magento\Catalog\Model\ProductRepository', + [], + [], + '', + false + ); + } + + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function configureContext() + { + $om = $this->getMock( + 'Magento\Framework\App\ObjectManager', + null, + [], + '', + false + ); + $request = $this->getMock( + 'Magento\Framework\App\Request\Http', + null, + [], + '', + false + ); + $response = $this->getMock( + 'Magento\Framework\App\Response\Http', + null, + [], + '', + false + ); + $eventManager = $this->getMock( + 'Magento\Framework\Event\Manager', + null, + [], + '', + false + ); + $url = $this->getMock( + 'Magento\Framework\Url', + null, + [], + '', + false + ); + $actionFlag = $this->getMock( + 'Magento\Framework\App\ActionFlag', + null, + [], + '', + false + ); + $redirect = $this->getMock( + '\Magento\Store\App\Response\Redirect', + null, + [], + '', + false + ); + $view = $this->getMock( + 'Magento\Framework\App\View', + null, + [], + '', + false + ); + $messageManager = $this->getMock( + 'Magento\Framework\Message\Manager', + null, + [], + '', + false + ); + + $this->context + ->expects($this->any()) + ->method('getObjectManager') + ->will($this->returnValue($om)); + $this->context + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)); + $this->context + ->expects($this->any()) + ->method('getResponse') + ->will($this->returnValue($response)); + $this->context + ->expects($this->any()) + ->method('getEventManager') + ->will($this->returnValue($eventManager)); + $this->context + ->expects($this->any()) + ->method('getUrl') + ->will($this->returnValue($url)); + $this->context + ->expects($this->any()) + ->method('getActionFlag') + ->will($this->returnValue($actionFlag)); + $this->context + ->expects($this->any()) + ->method('getRedirect') + ->will($this->returnValue($redirect)); + $this->context + ->expects($this->any()) + ->method('getView') + ->will($this->returnValue($view)); + $this->context + ->expects($this->any()) + ->method('getMessageManager') + ->will($this->returnValue($messageManager)); + } + + public function configureCustomerSession() + { + $this->customerSession + ->expects($this->exactly(2)) + ->method('getBeforeWishlistRequest') + ->will($this->returnValue(false)); + $this->customerSession + ->expects($this->once()) + ->method('unsBeforeWishlistRequest') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->once()) + ->method('getBeforeWishlistUrl') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->once()) + ->method('setAddActionReferer') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->once()) + ->method('setBeforeWishlistUrl') + ->will($this->returnValue(null)); + } + + protected function createController() + { + $this->controller = new \Magento\Wishlist\Controller\Index\Add( + $this->context, + $this->customerSession, + $this->wishlistProvider, + $this->productRepository + ); + } + + public function testExecuteWithoutWishList() + { + $this->setExpectedException('Magento\Framework\App\Action\NotFoundException'); + + $this->wishlistProvider + ->expects($this->once()) + ->method('getWishlist') + ->will($this->returnValue(null)); + + $this->configureContext(); + $this->createController(); + + $this->controller->execute(); + } + + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testExecuteWithoutProductId() + { + $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', ['addNewItem', 'save', 'getId'], [], '', false); + $this->wishlistProvider + ->expects($this->once()) + ->method('getWishlist') + ->will($this->returnValue($wishlist)); + + + $request = $this->getMock('Magento\Framework\App\Request\Http', ['getParams'], [], '', false); + $request + ->expects($this->once()) + ->method('getParams') + ->will($this->returnValue([])); + + $om = $this->getMock('Magento\Framework\App\ObjectManager', null, [], '', false ); + $response = $this->getMock('Magento\Framework\App\Response\Http', null, [], '', false); + $eventManager = $this->getMock('Magento\Framework\Event\Manager', null, [], '', false); + $url = $this->getMock('Magento\Framework\Url', null, [], '', false); + $actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', null, [], '', false); + $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', ['redirect'], [], '', false); + $redirect + ->expects($this->once()) + ->method('redirect') + ->with($response, '*/', []) + ->will($this->returnValue(null)); + $view = $this->getMock('Magento\Framework\App\View', null, [], '', false); + $messageManager = $this->getMock('Magento\Framework\Message\Manager', null, [], '', false); + + $this->context + ->expects($this->any()) + ->method('getObjectManager') + ->will($this->returnValue($om)); + $this->context + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)); + $this->context + ->expects($this->any()) + ->method('getResponse') + ->will($this->returnValue($response)); + $this->context + ->expects($this->any()) + ->method('getEventManager') + ->will($this->returnValue($eventManager)); + $this->context + ->expects($this->any()) + ->method('getUrl') + ->will($this->returnValue($url)); + $this->context + ->expects($this->any()) + ->method('getActionFlag') + ->will($this->returnValue($actionFlag)); + $this->context + ->expects($this->any()) + ->method('getRedirect') + ->will($this->returnValue($redirect)); + $this->context + ->expects($this->any()) + ->method('getView') + ->will($this->returnValue($view)); + $this->context + ->expects($this->any()) + ->method('getMessageManager') + ->will($this->returnValue($messageManager)); + + $this->customerSession + ->expects($this->exactly(2)) + ->method('getBeforeWishlistRequest') + ->will($this->returnValue(true)); + $this->customerSession + ->expects($this->once()) + ->method('unsBeforeWishlistRequest') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->never()) + ->method('getBeforeWishlistUrl') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->never()) + ->method('setAddActionReferer') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->never()) + ->method('setBeforeWishlistUrl') + ->will($this->returnValue(null)); + + $this->createController(); + + $this->controller->execute(); + } + + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testExecuteWithProductIdAndWithoutProduct() + { + $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', ['addNewItem', 'save', 'getId'], [], '', false); + $this->wishlistProvider + ->expects($this->once()) + ->method('getWishlist') + ->will($this->returnValue($wishlist)); + + + $request = $this->getMock('Magento\Framework\App\Request\Http', ['getParams'], [], '', false); + $request + ->expects($this->once()) + ->method('getParams') + ->will($this->returnValue(['product' => 2])); + + $om = $this->getMock('Magento\Framework\App\ObjectManager', null, [], '', false ); + $response = $this->getMock('Magento\Framework\App\Response\Http', null, [], '', false); + $eventManager = $this->getMock('Magento\Framework\Event\Manager', null, [], '', false ); + $url = $this->getMock('Magento\Framework\Url', null, [], '', false); + $actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', null, [], '', false); + $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', ['redirect'], [], '', false); + $redirect + ->expects($this->once()) + ->method('redirect') + ->with($response, '*/', []) + ->will($this->returnValue(null)); + $view = $this->getMock('Magento\Framework\App\View', null, [], '', false); + $messageManager = $this->getMock('Magento\Framework\Message\Manager', ['addError'], [], '', false); + $messageManager + ->expects($this->once()) + ->method('addError') + ->with('We can\'t specify a product.') + ->will($this->returnValue(null)); + + $this->context + ->expects($this->any()) + ->method('getObjectManager') + ->will($this->returnValue($om)); + $this->context + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)); + $this->context + ->expects($this->any()) + ->method('getResponse') + ->will($this->returnValue($response)); + $this->context + ->expects($this->any()) + ->method('getEventManager') + ->will($this->returnValue($eventManager)); + $this->context + ->expects($this->any()) + ->method('getUrl') + ->will($this->returnValue($url)); + $this->context + ->expects($this->any()) + ->method('getActionFlag') + ->will($this->returnValue($actionFlag)); + $this->context + ->expects($this->any()) + ->method('getRedirect') + ->will($this->returnValue($redirect)); + $this->context + ->expects($this->any()) + ->method('getView') + ->will($this->returnValue($view)); + $this->context + ->expects($this->any()) + ->method('getMessageManager') + ->will($this->returnValue($messageManager)); + + $this->customerSession + ->expects($this->exactly(1)) + ->method('getBeforeWishlistRequest') + ->will($this->returnValue(false)); + $this->customerSession + ->expects($this->never()) + ->method('unsBeforeWishlistRequest') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->never()) + ->method('getBeforeWishlistUrl') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->never()) + ->method('setAddActionReferer') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->never()) + ->method('setBeforeWishlistUrl') + ->will($this->returnValue(null)); + + $this->createController(); + + $this->controller->execute(); + } + + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testExecuteWithProductAndCantAddProductToWishlist() + { + $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', ['addNewItem', 'save', 'getId'], [], '', false); + $wishlist + ->expects($this->once()) + ->method('addNewItem') + ->will($this->returnValue('Can\'t add product to wishlist')); + + $wishlist + ->expects($this->once()) + ->method('getId') + ->will($this->returnValue(2)); + + $this->wishlistProvider + ->expects($this->once()) + ->method('getWishlist') + ->will($this->returnValue($wishlist)); + + + $request = $this->getMock('Magento\Framework\App\Request\Http', ['getParams'], [], '', false); + $request + ->expects($this->once()) + ->method('getParams') + ->will($this->returnValue(['product' => 2])); + + $om = $this->getMock('Magento\Framework\App\ObjectManager', null, [], '', false ); + $response = $this->getMock('Magento\Framework\App\Response\Http', null, [], '', false); + $eventManager = $this->getMock('Magento\Framework\Event\Manager', null, [], '', false ); + $url = $this->getMock('Magento\Framework\Url', null, [], '', false); + $actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', null, [], '', false); + $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', ['redirect'], [], '', false); + $redirect + ->expects($this->once()) + ->method('redirect') + ->with($response, '*', ['wishlist_id' => 2]) + ->will($this->returnValue(null)); + + $view = $this->getMock('Magento\Framework\App\View', null, [], '', false); + $messageManager = $this->getMock('Magento\Framework\Message\Manager', ['addError'], [], '', false); + $messageManager + ->expects($this->once()) + ->method('addError') + ->with('An error occurred while adding item to wish list: Can\'t add product to wishlist') + ->will($this->returnValue(null)); + + $this->context + ->expects($this->any()) + ->method('getObjectManager') + ->will($this->returnValue($om)); + $this->context + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)); + $this->context + ->expects($this->any()) + ->method('getResponse') + ->will($this->returnValue($response)); + $this->context + ->expects($this->any()) + ->method('getEventManager') + ->will($this->returnValue($eventManager)); + $this->context + ->expects($this->any()) + ->method('getUrl') + ->will($this->returnValue($url)); + $this->context + ->expects($this->any()) + ->method('getActionFlag') + ->will($this->returnValue($actionFlag)); + $this->context + ->expects($this->any()) + ->method('getRedirect') + ->will($this->returnValue($redirect)); + $this->context + ->expects($this->any()) + ->method('getView') + ->will($this->returnValue($view)); + $this->context + ->expects($this->any()) + ->method('getMessageManager') + ->will($this->returnValue($messageManager)); + + $this->customerSession + ->expects($this->exactly(1)) + ->method('getBeforeWishlistRequest') + ->will($this->returnValue(false)); + $this->customerSession + ->expects($this->never()) + ->method('unsBeforeWishlistRequest') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->never()) + ->method('getBeforeWishlistUrl') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->never()) + ->method('setAddActionReferer') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->never()) + ->method('setBeforeWishlistUrl') + ->will($this->returnValue(null)); + + $product = $this->getMock( + 'Magento\Catalog\Model\Product', + ['isVisibleInCatalog'], + [], + '', + false + ); + $product + ->expects($this->once()) + ->method('isVisibleInCatalog') + ->will($this->returnValue(true)); + + $this->productRepository + ->expects($this->once()) + ->method('getById') + ->with(2) + ->will($this->returnValue($product)); + + $this->createController(); + + $this->controller->execute(); + } + + /** + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + */ + public function testExecuteProductAddedToWishlistAfterObjectManagerThrowException() + { + $product = $this->getMock( + 'Magento\Catalog\Model\Product', + ['isVisibleInCatalog', 'getName'], + [], + '', + false + ); + $product + ->expects($this->once()) + ->method('isVisibleInCatalog') + ->will($this->returnValue(true)); + $product + ->expects($this->once()) + ->method('getName') + ->will($this->returnValue('Product test name')); + + $this->productRepository + ->expects($this->once()) + ->method('getById') + ->with(2) + ->will($this->returnValue($product)); + + $exception = new \Exception('Exception'); + $wishListItem = new \stdClass(); + + $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', ['addNewItem', 'save', 'getId'], [], '', false); + $wishlist + ->expects($this->once()) + ->method('addNewItem') + ->will($this->returnValue($wishListItem)); + + $wishlist + ->expects($this->once()) + ->method('getId') + ->will($this->returnValue(2)); + + $wishlist + ->expects($this->once()) + ->method('save') + ->will($this->returnValue(true)); + + $this->wishlistProvider + ->expects($this->once()) + ->method('getWishlist') + ->will($this->returnValue($wishlist)); + + + $request = $this->getMock('Magento\Framework\App\Request\Http', ['getParams'], [], '', false); + $request + ->expects($this->once()) + ->method('getParams') + ->will($this->returnValue(['product' => 2])); + + $wishlistHelper = $this->getMock('Magento\Wishlist\Helper\Data', ['calculate'], [], '', false); + $wishlistHelper + ->expects($this->once()) + ->method('calculate') + ->will($this->returnSelf()); + + $escaper = $this->getMock('Magento\Framework\Escaper', ['escapeHtml', 'escapeUrl'], [], '', false); + $escaper + ->expects($this->once()) + ->method('escapeHtml') + ->with('Product test name') + ->will($this->returnValue('Product test name')); + $escaper + ->expects($this->once()) + ->method('escapeUrl') + ->with('http://test-url.com') + ->will($this->returnValue('http://test-url.com')); + + $logger = $this->getMock( + 'Magento\Framework\Logger\Monolog', + ['critical'], + [], + '', + false + ); + $logger + ->expects($this->once()) + ->method('critical') + ->with($exception) + ->will($this->returnValue(true)); + + $om = $this->getMock('Magento\Framework\App\ObjectManager', ['get'], [], '', false ); + $om + ->expects($this->at(0)) + ->method('get') + ->with('Magento\Wishlist\Helper\Data') + ->will($this->returnValue($wishlistHelper)); + $om + ->expects($this->at(1)) + ->method('get') + ->with('Magento\Framework\Escaper') + ->will($this->returnValue($escaper)); + $om + ->expects($this->at(2)) + ->method('get') + ->with('Magento\Framework\Escaper') + ->will($this->returnValue($escaper)); + $om + ->expects($this->at(3)) + ->method('get') + ->with('Psr\Log\LoggerInterface') + ->will($this->returnValue($logger)); + + $response = $this->getMock('Magento\Framework\App\Response\Http', null, [], '', false); + $eventManager = $this->getMock('Magento\Framework\Event\Manager', ['dispatch'], [], '', false ); + $eventManager + ->expects($this->once()) + ->method('dispatch') + ->with('wishlist_add_product', ['wishlist' => $wishlist, 'product' => $product, 'item' => $wishListItem]) + ->will($this->returnValue(true)); + + $url = $this->getMock('Magento\Framework\Url', null, [], '', false); + $actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', null, [], '', false); + $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', ['redirect'], [], '', false); + $redirect + ->expects($this->once()) + ->method('redirect') + ->with($response, '*', ['wishlist_id' => 2]) + ->will($this->returnValue(null)); + + $view = $this->getMock('Magento\Framework\App\View', null, [], '', false); + + $messageManager = $this->getMock( + 'Magento\Framework\Message\Manager', + ['addError', 'addSuccess'], + [], + '', + false + ); + $messageManager + ->expects($this->once()) + ->method('addError') + ->with('An error occurred while adding item to wish list.') + ->will($this->returnValue(null)); + $messageManager + ->expects($this->once()) + ->method('addSuccess') + ->will($this->throwException($exception)); + + $this->context + ->expects($this->any()) + ->method('getObjectManager') + ->will($this->returnValue($om)); + $this->context + ->expects($this->any()) + ->method('getRequest') + ->will($this->returnValue($request)); + $this->context + ->expects($this->any()) + ->method('getResponse') + ->will($this->returnValue($response)); + $this->context + ->expects($this->any()) + ->method('getEventManager') + ->will($this->returnValue($eventManager)); + $this->context + ->expects($this->any()) + ->method('getUrl') + ->will($this->returnValue($url)); + $this->context + ->expects($this->any()) + ->method('getActionFlag') + ->will($this->returnValue($actionFlag)); + $this->context + ->expects($this->any()) + ->method('getRedirect') + ->will($this->returnValue($redirect)); + $this->context + ->expects($this->any()) + ->method('getView') + ->will($this->returnValue($view)); + $this->context + ->expects($this->any()) + ->method('getMessageManager') + ->will($this->returnValue($messageManager)); + + $this->customerSession + ->expects($this->exactly(1)) + ->method('getBeforeWishlistRequest') + ->will($this->returnValue(false)); + $this->customerSession + ->expects($this->never()) + ->method('unsBeforeWishlistRequest') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->once()) + ->method('getBeforeWishlistUrl') + ->will($this->returnValue('http://test-url.com')); + $this->customerSession + ->expects($this->once()) + ->method('setAddActionReferer') + ->with('http://test-url.com') + ->will($this->returnValue(null)); + $this->customerSession + ->expects($this->once()) + ->method('setBeforeWishlistUrl') + ->with(null) + ->will($this->returnValue(null)); + + $this->createController(); + + $this->controller->execute(); + } +} From 89a29063a657b4a6c42d7f92be3d3169d51e5d66 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Thu, 5 Feb 2015 18:49:00 +0200 Subject: [PATCH 17/60] MAGETWO-33398: HTML response minification --- .../View/Template/Html/MinifierTest.php | 5 +- .../Framework/View/Template/Html/Minifier.php | 61 ++++++++++++++++--- 2 files changed, 55 insertions(+), 11 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php index 8bf0792f9d7f6..0c7c77e82ecdf 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php @@ -109,11 +109,12 @@ public function testMinify() //]]> + inline text TEXT; $expectedContent = <<Test titleText Linksome textsomeMethod(); ?>
+ inline text TEXT; $this->appDirectory->expects($this->once()) diff --git a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php index 2d46e0d847887..9b3e01f43dc59 100644 --- a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php +++ b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php @@ -16,6 +16,44 @@ class Minifier implements MinifierInterface */ protected $filesystem; + /** + * All inline HTML tags + * + * @var array + */ + protected $inlineHtmlTags = [ + 'b', + 'big', + 'i', + 'small', + 'tt', + 'abbr', + 'acronym', + 'cite', + 'code', + 'dfn', + 'em', + 'kbd', + 'strong', + 'samp', + 'var', + 'a', + 'bdo', + 'br', + 'img', + 'map', + 'object', + 'q', + 'span', + 'sub', + 'sup', + 'button', + 'input', + 'label', + 'select', + 'textarea', + ]; + /** * @param Filesystem $filesystem */ @@ -61,18 +99,23 @@ public function getPathToMinified($file) public function minify($file) { $file = $this->appDirectory->getRelativePath($file); - $content = preg_replace('#\> \<#', '><', preg_replace( - '#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre|script)\b))*+)(?:<(?>textarea|pre|script)\b|\z))#', - ' ', + $content = preg_replace( + '#(?inlineHtmlTags) . ')(? \<#', + '><', preg_replace( - '#(?)[^\n\r]*#', - '', + '#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre|script)\b))*+)' + . '(?:<(?>textarea|pre|script)\b|\z))#', + ' ', preg_replace( - '#(?)#', - '$1', - $this->appDirectory->readFile($file) + '#(?)[^\n\r]*#', + '', + preg_replace( + '#(?)#', + '$1', + $this->appDirectory->readFile($file) + ) ) - )) + ) ); if (!$this->htmlDirectory->isExist()) { From b74070139a83120be83bdc73eefde4c0e4a1af7f Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Thu, 5 Feb 2015 20:22:49 +0200 Subject: [PATCH 18/60] MAGETWO-31369: [South] Unit and Integration tests coverage --- .../Theme/Model/Theme/SingleFileTest.php | 175 ++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 dev/tests/unit/testsuite/Magento/Theme/Model/Theme/SingleFileTest.php diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/Theme/SingleFileTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/Theme/SingleFileTest.php new file mode 100644 index 0000000000000..6fad477bc174d --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Theme/SingleFileTest.php @@ -0,0 +1,175 @@ +file = $this->getMockBuilder('Magento\Framework\View\Design\Theme\Customization\FileInterface') + ->getMock(); + + $this->object = new SingleFile($this->file); + } + + /** + * cover update method + */ + public function testUpdate() + { + $fileContent = 'file content'; + $customFiles = []; + $fileType = 'png'; + $customCss = $this->getMockBuilder('Magento\Framework\View\Design\Theme\FileInterface') + ->disableOriginalConstructor() + ->setMethods( + [ + 'delete', + 'save', + 'getContent', + 'getFileInfo', + 'getFullPath', + 'getFileName', + 'setFileName', + 'getTheme', + 'setTheme', + 'getCustomizationService', + 'setCustomizationService', + 'setData', + 'getType', + 'prepareFile', + ] + ) + ->getMock(); + $theme = $this->getMockBuilder('Magento\Framework\View\Design\ThemeInterface') + ->setMethods( + [ + 'getArea', + 'getThemePath', + 'getFullPath', + 'getParentTheme', + 'getCode', + 'isPhysical', + 'getInheritedThemes', + 'getId', + 'getCustomization', + ] + ) + ->getMock(); + $customization = $this->getMockBuilder('Magento\Framework\View\Design\Theme\CustomizationInterface') + ->getMock(); + + $customCss->expects($this->once()) + ->method('setData') + ->with('content', $fileContent); + $customCss->expects($this->once()) + ->method('setTheme') + ->with($theme); + $customCss->expects($this->once()) + ->method('save'); + $this->file->expects($this->once()) + ->method('create') + ->willReturn($customCss); + $this->file->expects($this->once()) + ->method('getType') + ->willReturn($fileType); + $customization->expects($this->once()) + ->method('getFilesByType') + ->with($fileType) + ->willReturn($customFiles); + $theme->expects($this->once()) + ->method('getCustomization') + ->willReturn($customization); + + /** @var \Magento\Framework\View\Design\ThemeInterface $theme */ + $this->assertInstanceOf( + 'Magento\Framework\View\Design\Theme\FileInterface', + $this->object->update($theme, $fileContent) + ); + } + + /** + * cover update method when fileContent is empty + */ + public function testUpdateWhenFileDelete() + { + $customCss = $this->getMockBuilder('Magento\Framework\View\Design\Theme\FileInterface') + ->disableOriginalConstructor() + ->setMethods( + [ + 'delete', + 'save', + 'getContent', + 'getFileInfo', + 'getFullPath', + 'getFileName', + 'setFileName', + 'getTheme', + 'setTheme', + 'getCustomizationService', + 'setCustomizationService', + 'setData', + 'getType', + 'prepareFile', + ] + ) + ->getMock(); + $fileContent = ''; + $customFiles = [$customCss]; + $fileType = 'png'; + + $theme = $this->getMockBuilder('Magento\Framework\View\Design\ThemeInterface') + ->setMethods( + [ + 'getArea', + 'getThemePath', + 'getFullPath', + 'getParentTheme', + 'getCode', + 'isPhysical', + 'getInheritedThemes', + 'getId', + 'getCustomization', + ] + ) + ->getMock(); + $customization = $this->getMockBuilder('Magento\Framework\View\Design\Theme\CustomizationInterface') + ->getMock(); + + + $customCss->expects($this->once()) + ->method('delete'); + $this->file->expects($this->once()) + ->method('getType') + ->willReturn($fileType); + $customization->expects($this->once()) + ->method('getFilesByType') + ->with($fileType) + ->willReturn($customFiles); + $theme->expects($this->once()) + ->method('getCustomization') + ->willReturn($customization); + + /** @var \Magento\Framework\View\Design\ThemeInterface $theme */ + $this->assertInstanceOf( + 'Magento\Framework\View\Design\Theme\FileInterface', + $this->object->update($theme, $fileContent) + ); + } +} From 49365141e1b763cd201e91c5d05bd5e5d78dbeb4 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Thu, 5 Feb 2015 20:37:23 +0200 Subject: [PATCH 19/60] MAGETWO-31369: [South] Unit and Integration tests coverage --- .../Model/Layout/Config/SchemaLocatorTest.php | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 dev/tests/unit/testsuite/Magento/Theme/Model/Layout/Config/SchemaLocatorTest.php diff --git a/dev/tests/unit/testsuite/Magento/Theme/Model/Layout/Config/SchemaLocatorTest.php b/dev/tests/unit/testsuite/Magento/Theme/Model/Layout/Config/SchemaLocatorTest.php new file mode 100644 index 0000000000000..00bfff0f9ee7d --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Theme/Model/Layout/Config/SchemaLocatorTest.php @@ -0,0 +1,53 @@ +getMockBuilder('Magento\Framework\Filesystem')->disableOriginalConstructor()->getMock(); + $read = $this->getMockBuilder('Magento\Framework\Filesystem\Directory\ReadInterface')->getMock(); + + $filesystem->expects($this->once()) + ->method('getDirectoryRead') + ->with(DirectoryList::LIB_INTERNAL) + ->willReturn($read); + $read->expects($this->once()) + ->method('getAbsolutePath') + ->willReturn($path); + + $this->scheme = $path . '/Magento/Framework/View/PageLayout/etc/layouts.xsd'; + + /** @var $filesystem \Magento\Framework\Filesystem */ + $this->object = new SchemaLocator($filesystem); + } + + /** + * cover getPerFileSchema and getSchema + */ + public function testGetScheme() + { + $this->assertEquals($this->scheme, $this->object->getPerFileSchema()); + $this->assertEquals($this->scheme, $this->object->getSchema()); + } +} From a342cafc7e5104f65d8632dcbc02a6f48e02bc8e Mon Sep 17 00:00:00 2001 From: vsevostianov Date: Fri, 6 Feb 2015 11:22:03 +0200 Subject: [PATCH 20/60] MAGETWO-33398: HTML response minification - Functional test fix --- .../tests/app/Magento/User/Test/Handler/Curl/CreateUser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/functional/tests/app/Magento/User/Test/Handler/Curl/CreateUser.php b/dev/tests/functional/tests/app/Magento/User/Test/Handler/Curl/CreateUser.php index e3598d5173060..aff666573395b 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/Handler/Curl/CreateUser.php +++ b/dev/tests/functional/tests/app/Magento/User/Test/Handler/Curl/CreateUser.php @@ -51,7 +51,7 @@ protected function _getUserId($data) $response = $curl->read(); $curl->close(); preg_match( - '/class=\"\scol\-id col\-user_id\W*>\W+(\d+)\W+<\/td>\W+\W+?' . $data['username'] . '/siu', + '/class=\"\scol\-id col\-user_id\W*>\W*(\d+)\W*<\/td>\W*\W*?' . $data['username'] . '/siu', $response, $matches ); From 01db15b7ba712bbcf685837b735375d8d8a07e4f Mon Sep 17 00:00:00 2001 From: okarpenko Date: Fri, 6 Feb 2015 12:02:07 +0200 Subject: [PATCH 21/60] MAGETWO-31369: Unit and Integration tests coverage - code refactoring according code review --- .../Wishlist/Controller/Index/AddTest.php | 307 +++++------------- 1 file changed, 78 insertions(+), 229 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/AddTest.php b/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/AddTest.php index 0442cfc341331..b37e417b23e71 100644 --- a/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/AddTest.php +++ b/dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/AddTest.php @@ -35,50 +35,10 @@ class AddTest extends \PHPUnit_Framework_TestCase public function setUp() { - $this->context = $this->getMock( - 'Magento\Framework\App\Action\Context', - [ - 'getRequest', - 'getResponse', - 'getObjectManager', - 'getEventManager', - 'getUrl', - 'getActionFlag', - 'getRedirect', - 'getView', - 'getMessageManager' - ], - [], - '', - false - ); - $this->wishlistProvider = $this->getMock( - 'Magento\Wishlist\Controller\WishlistProvider', - ['getWishlist'], - [], - '', - false - ); - $this->customerSession = $this->getMock( - 'Magento\Customer\Model\Session', - [ - 'getBeforeWishlistRequest', - 'unsBeforeWishlistRequest', - 'getBeforeWishlistUrl', - 'setAddActionReferer', - 'setBeforeWishlistUrl', - ], - [], - '', - false - ); - $this->productRepository = $this->getMock( - '\Magento\Catalog\Model\ProductRepository', - [], - [], - '', - false - ); + $this->context = $this->getMock('Magento\Framework\App\Action\Context', [], [], '', false); + $this->wishlistProvider = $this->getMock('Magento\Wishlist\Controller\WishlistProvider', [], [], '', false); + $this->customerSession = $this->getMock('Magento\Customer\Model\Session', [], [], '', false); + $this->productRepository = $this->getMock(' Magento\Catalog\Model\ProductRepository', [], [], '', false); } /** @@ -86,69 +46,15 @@ public function setUp() */ public function configureContext() { - $om = $this->getMock( - 'Magento\Framework\App\ObjectManager', - null, - [], - '', - false - ); - $request = $this->getMock( - 'Magento\Framework\App\Request\Http', - null, - [], - '', - false - ); - $response = $this->getMock( - 'Magento\Framework\App\Response\Http', - null, - [], - '', - false - ); - $eventManager = $this->getMock( - 'Magento\Framework\Event\Manager', - null, - [], - '', - false - ); - $url = $this->getMock( - 'Magento\Framework\Url', - null, - [], - '', - false - ); - $actionFlag = $this->getMock( - 'Magento\Framework\App\ActionFlag', - null, - [], - '', - false - ); - $redirect = $this->getMock( - '\Magento\Store\App\Response\Redirect', - null, - [], - '', - false - ); - $view = $this->getMock( - 'Magento\Framework\App\View', - null, - [], - '', - false - ); - $messageManager = $this->getMock( - 'Magento\Framework\Message\Manager', - null, - [], - '', - false - ); + $om = $this->getMock('Magento\Framework\App\ObjectManager', null, [], '', false); + $request = $this->getMock('Magento\Framework\App\Request\Http', null, [], '', false); + $response = $this->getMock('Magento\Framework\App\Response\Http', null, [], '', false); + $eventManager = $this->getMock('Magento\Framework\Event\Manager', null, [], '', false); + $url = $this->getMock('Magento\Framework\Url', null, [], '', false); + $actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', null, [], '', false); + $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', null, [], '', false); + $view = $this->getMock('Magento\Framework\App\View', null, [], '', false); + $messageManager = $this->getMock('Magento\Framework\Message\Manager', null, [], '', false); $this->context ->expects($this->any()) @@ -191,24 +97,29 @@ public function configureContext() public function configureCustomerSession() { $this->customerSession - ->expects($this->exactly(2)) - ->method('getBeforeWishlistRequest') + ->expects($this->at(0)) + ->method('__call') + ->with('getBeforeWishlistRequest') ->will($this->returnValue(false)); $this->customerSession - ->expects($this->once()) - ->method('unsBeforeWishlistRequest') + ->expects($this->at(1)) + ->method('__call') + ->with('unsBeforeWishlistRequest') ->will($this->returnValue(null)); $this->customerSession - ->expects($this->once()) - ->method('getBeforeWishlistUrl') + ->expects($this->at(2)) + ->method('__call') + ->with('getBeforeWishlistUrl') ->will($this->returnValue(null)); $this->customerSession - ->expects($this->once()) - ->method('setAddActionReferer') + ->expects($this->at(3)) + ->method('__call') + ->with('setAddActionReferer') ->will($this->returnValue(null)); $this->customerSession - ->expects($this->once()) - ->method('setBeforeWishlistUrl') + ->expects($this->at(4)) + ->method('__call') + ->with('setBeforeWishlistUrl') ->will($this->returnValue(null)); } @@ -242,14 +153,13 @@ public function testExecuteWithoutWishList() */ public function testExecuteWithoutProductId() { - $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', ['addNewItem', 'save', 'getId'], [], '', false); + $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', [], [], '', false); $this->wishlistProvider ->expects($this->once()) ->method('getWishlist') ->will($this->returnValue($wishlist)); - - $request = $this->getMock('Magento\Framework\App\Request\Http', ['getParams'], [], '', false); + $request = $this->getMock('Magento\Framework\App\Request\Http', [], [], '', false); $request ->expects($this->once()) ->method('getParams') @@ -260,7 +170,7 @@ public function testExecuteWithoutProductId() $eventManager = $this->getMock('Magento\Framework\Event\Manager', null, [], '', false); $url = $this->getMock('Magento\Framework\Url', null, [], '', false); $actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', null, [], '', false); - $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', ['redirect'], [], '', false); + $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', [], [], '', false); $redirect ->expects($this->once()) ->method('redirect') @@ -307,24 +217,19 @@ public function testExecuteWithoutProductId() ->will($this->returnValue($messageManager)); $this->customerSession - ->expects($this->exactly(2)) - ->method('getBeforeWishlistRequest') + ->expects($this->at(0)) + ->method('__call') + ->with('getBeforeWishlistRequest') ->will($this->returnValue(true)); $this->customerSession - ->expects($this->once()) - ->method('unsBeforeWishlistRequest') - ->will($this->returnValue(null)); - $this->customerSession - ->expects($this->never()) - ->method('getBeforeWishlistUrl') - ->will($this->returnValue(null)); - $this->customerSession - ->expects($this->never()) - ->method('setAddActionReferer') - ->will($this->returnValue(null)); + ->expects($this->at(1)) + ->method('__call') + ->with('getBeforeWishlistRequest') + ->will($this->returnValue(true)); $this->customerSession - ->expects($this->never()) - ->method('setBeforeWishlistUrl') + ->expects($this->at(2)) + ->method('__call') + ->with('unsBeforeWishlistRequest') ->will($this->returnValue(null)); $this->createController(); @@ -337,14 +242,13 @@ public function testExecuteWithoutProductId() */ public function testExecuteWithProductIdAndWithoutProduct() { - $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', ['addNewItem', 'save', 'getId'], [], '', false); + $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', [], [], '', false); $this->wishlistProvider ->expects($this->once()) ->method('getWishlist') ->will($this->returnValue($wishlist)); - - $request = $this->getMock('Magento\Framework\App\Request\Http', ['getParams'], [], '', false); + $request = $this->getMock('Magento\Framework\App\Request\Http', [], [], '', false); $request ->expects($this->once()) ->method('getParams') @@ -355,14 +259,14 @@ public function testExecuteWithProductIdAndWithoutProduct() $eventManager = $this->getMock('Magento\Framework\Event\Manager', null, [], '', false ); $url = $this->getMock('Magento\Framework\Url', null, [], '', false); $actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', null, [], '', false); - $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', ['redirect'], [], '', false); + $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', [], [], '', false); $redirect ->expects($this->once()) ->method('redirect') ->with($response, '*/', []) ->will($this->returnValue(null)); $view = $this->getMock('Magento\Framework\App\View', null, [], '', false); - $messageManager = $this->getMock('Magento\Framework\Message\Manager', ['addError'], [], '', false); + $messageManager = $this->getMock('Magento\Framework\Message\Manager', [], [], '', false); $messageManager ->expects($this->once()) ->method('addError') @@ -408,24 +312,9 @@ public function testExecuteWithProductIdAndWithoutProduct() $this->customerSession ->expects($this->exactly(1)) - ->method('getBeforeWishlistRequest') + ->method('__call') + ->with('getBeforeWishlistRequest') ->will($this->returnValue(false)); - $this->customerSession - ->expects($this->never()) - ->method('unsBeforeWishlistRequest') - ->will($this->returnValue(null)); - $this->customerSession - ->expects($this->never()) - ->method('getBeforeWishlistUrl') - ->will($this->returnValue(null)); - $this->customerSession - ->expects($this->never()) - ->method('setAddActionReferer') - ->will($this->returnValue(null)); - $this->customerSession - ->expects($this->never()) - ->method('setBeforeWishlistUrl') - ->will($this->returnValue(null)); $this->createController(); @@ -437,7 +326,7 @@ public function testExecuteWithProductIdAndWithoutProduct() */ public function testExecuteWithProductAndCantAddProductToWishlist() { - $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', ['addNewItem', 'save', 'getId'], [], '', false); + $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', [], [], '', false); $wishlist ->expects($this->once()) ->method('addNewItem') @@ -453,8 +342,7 @@ public function testExecuteWithProductAndCantAddProductToWishlist() ->method('getWishlist') ->will($this->returnValue($wishlist)); - - $request = $this->getMock('Magento\Framework\App\Request\Http', ['getParams'], [], '', false); + $request = $this->getMock('Magento\Framework\App\Request\Http', [], [], '', false); $request ->expects($this->once()) ->method('getParams') @@ -465,7 +353,7 @@ public function testExecuteWithProductAndCantAddProductToWishlist() $eventManager = $this->getMock('Magento\Framework\Event\Manager', null, [], '', false ); $url = $this->getMock('Magento\Framework\Url', null, [], '', false); $actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', null, [], '', false); - $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', ['redirect'], [], '', false); + $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', [], [], '', false); $redirect ->expects($this->once()) ->method('redirect') @@ -473,7 +361,7 @@ public function testExecuteWithProductAndCantAddProductToWishlist() ->will($this->returnValue(null)); $view = $this->getMock('Magento\Framework\App\View', null, [], '', false); - $messageManager = $this->getMock('Magento\Framework\Message\Manager', ['addError'], [], '', false); + $messageManager = $this->getMock('Magento\Framework\Message\Manager', [], [], '', false); $messageManager ->expects($this->once()) ->method('addError') @@ -519,32 +407,11 @@ public function testExecuteWithProductAndCantAddProductToWishlist() $this->customerSession ->expects($this->exactly(1)) - ->method('getBeforeWishlistRequest') + ->method('__call') + ->with('getBeforeWishlistRequest') ->will($this->returnValue(false)); - $this->customerSession - ->expects($this->never()) - ->method('unsBeforeWishlistRequest') - ->will($this->returnValue(null)); - $this->customerSession - ->expects($this->never()) - ->method('getBeforeWishlistUrl') - ->will($this->returnValue(null)); - $this->customerSession - ->expects($this->never()) - ->method('setAddActionReferer') - ->will($this->returnValue(null)); - $this->customerSession - ->expects($this->never()) - ->method('setBeforeWishlistUrl') - ->will($this->returnValue(null)); - $product = $this->getMock( - 'Magento\Catalog\Model\Product', - ['isVisibleInCatalog'], - [], - '', - false - ); + $product = $this->getMock('Magento\Catalog\Model\Product', [], [], '', false); $product ->expects($this->once()) ->method('isVisibleInCatalog') @@ -566,13 +433,7 @@ public function testExecuteWithProductAndCantAddProductToWishlist() */ public function testExecuteProductAddedToWishlistAfterObjectManagerThrowException() { - $product = $this->getMock( - 'Magento\Catalog\Model\Product', - ['isVisibleInCatalog', 'getName'], - [], - '', - false - ); + $product = $this->getMock('Magento\Catalog\Model\Product', [], [], '', false); $product ->expects($this->once()) ->method('isVisibleInCatalog') @@ -591,7 +452,7 @@ public function testExecuteProductAddedToWishlistAfterObjectManagerThrowExceptio $exception = new \Exception('Exception'); $wishListItem = new \stdClass(); - $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', ['addNewItem', 'save', 'getId'], [], '', false); + $wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', [], [], '', false); $wishlist ->expects($this->once()) ->method('addNewItem') @@ -613,19 +474,19 @@ public function testExecuteProductAddedToWishlistAfterObjectManagerThrowExceptio ->will($this->returnValue($wishlist)); - $request = $this->getMock('Magento\Framework\App\Request\Http', ['getParams'], [], '', false); + $request = $this->getMock('Magento\Framework\App\Request\Http', [], [], '', false); $request ->expects($this->once()) ->method('getParams') ->will($this->returnValue(['product' => 2])); - $wishlistHelper = $this->getMock('Magento\Wishlist\Helper\Data', ['calculate'], [], '', false); + $wishlistHelper = $this->getMock('Magento\Wishlist\Helper\Data', [], [], '', false); $wishlistHelper ->expects($this->once()) ->method('calculate') ->will($this->returnSelf()); - $escaper = $this->getMock('Magento\Framework\Escaper', ['escapeHtml', 'escapeUrl'], [], '', false); + $escaper = $this->getMock('Magento\Framework\Escaper', [], [], '', false); $escaper ->expects($this->once()) ->method('escapeHtml') @@ -637,20 +498,14 @@ public function testExecuteProductAddedToWishlistAfterObjectManagerThrowExceptio ->with('http://test-url.com') ->will($this->returnValue('http://test-url.com')); - $logger = $this->getMock( - 'Magento\Framework\Logger\Monolog', - ['critical'], - [], - '', - false - ); + $logger = $this->getMock('Magento\Framework\Logger\Monolog', [], [], '', false); $logger ->expects($this->once()) ->method('critical') ->with($exception) ->will($this->returnValue(true)); - $om = $this->getMock('Magento\Framework\App\ObjectManager', ['get'], [], '', false ); + $om = $this->getMock('Magento\Framework\App\ObjectManager', [], [], '', false ); $om ->expects($this->at(0)) ->method('get') @@ -673,7 +528,7 @@ public function testExecuteProductAddedToWishlistAfterObjectManagerThrowExceptio ->will($this->returnValue($logger)); $response = $this->getMock('Magento\Framework\App\Response\Http', null, [], '', false); - $eventManager = $this->getMock('Magento\Framework\Event\Manager', ['dispatch'], [], '', false ); + $eventManager = $this->getMock('Magento\Framework\Event\Manager', [], [], '', false ); $eventManager ->expects($this->once()) ->method('dispatch') @@ -682,7 +537,7 @@ public function testExecuteProductAddedToWishlistAfterObjectManagerThrowExceptio $url = $this->getMock('Magento\Framework\Url', null, [], '', false); $actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', null, [], '', false); - $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', ['redirect'], [], '', false); + $redirect = $this->getMock('\Magento\Store\App\Response\Redirect', [], [], '', false); $redirect ->expects($this->once()) ->method('redirect') @@ -691,13 +546,7 @@ public function testExecuteProductAddedToWishlistAfterObjectManagerThrowExceptio $view = $this->getMock('Magento\Framework\App\View', null, [], '', false); - $messageManager = $this->getMock( - 'Magento\Framework\Message\Manager', - ['addError', 'addSuccess'], - [], - '', - false - ); + $messageManager = $this->getMock('Magento\Framework\Message\Manager', [], [], '', false); $messageManager ->expects($this->once()) ->method('addError') @@ -746,26 +595,26 @@ public function testExecuteProductAddedToWishlistAfterObjectManagerThrowExceptio ->will($this->returnValue($messageManager)); $this->customerSession - ->expects($this->exactly(1)) - ->method('getBeforeWishlistRequest') + ->expects($this->at(0)) + ->method('__call') + ->with('getBeforeWishlistRequest') ->will($this->returnValue(false)); $this->customerSession - ->expects($this->never()) - ->method('unsBeforeWishlistRequest') - ->will($this->returnValue(null)); - $this->customerSession - ->expects($this->once()) - ->method('getBeforeWishlistUrl') + ->expects($this->at(1)) + ->method('__call') + ->with('getBeforeWishlistUrl') ->will($this->returnValue('http://test-url.com')); + $this->customerSession - ->expects($this->once()) - ->method('setAddActionReferer') - ->with('http://test-url.com') + ->expects($this->at(2)) + ->method('__call') + ->with('setBeforeWishlistUrl', [null]) ->will($this->returnValue(null)); + $this->customerSession - ->expects($this->once()) - ->method('setBeforeWishlistUrl') - ->with(null) + ->expects($this->at(3)) + ->method('__call') + ->with('setAddActionReferer', ['http://test-url.com']) ->will($this->returnValue(null)); $this->createController(); From c5b4c7b75c0c0c64a826ed023a54583315634483 Mon Sep 17 00:00:00 2001 From: Sviatoslav Mankivskyi Date: Fri, 6 Feb 2015 17:05:35 +0200 Subject: [PATCH 22/60] MAGETWO-33068: [Dev] Layout Processing Improvement --- app/code/Magento/Backend/Model/View.php | 63 ------------------- .../Backend/Model/View/Layout/Builder.php | 30 --------- .../Backend/Model/View/Layout/Filter/Acl.php | 55 ++++++++++++---- .../Model/View/Layout/GeneratorPool.php | 57 +++++++++++++++++ .../Model/View/Layout/Reader/Block.php | 29 +++++++++ .../Backend/Model/View/Page/Builder.php | 34 ---------- app/code/Magento/Backend/etc/adminhtml/di.xml | 4 +- .../Magento/Framework/View/LayoutTest.php | 1 + .../Magento/Framework/View/Utility/Layout.php | 1 + .../Category/Widget/CategoriesJsonTest.php | 4 +- .../Adminhtml/Category/Widget/ChooserTest.php | 4 +- .../Order/Invoice/AddCommentTest.php | 2 +- .../Adminhtml/Order/Invoice/NewActionTest.php | 2 +- .../Adminhtml/Order/Invoice/ViewTest.php | 2 +- .../Shipment/GetShippingItemsGridTest.php | 4 +- .../Order/Shipment/RemoveTrackTest.php | 4 +- .../Adminhtml/Order/Shipment/ViewTest.php | 4 +- .../Magento/Framework/View/Layout.php | 14 +---- .../Framework/View/Layout/Generator/Block.php | 28 +++++++-- .../Framework/View/Layout/GeneratorPool.php | 53 +++++++++++++++- .../Framework/View/Layout/Reader/Block.php | 29 +-------- .../View/Layout/Reader/UiComponent.php | 22 +------ .../View/Layout/ScheduledStructure.php | 53 ++++++++++++++++ 23 files changed, 280 insertions(+), 219 deletions(-) delete mode 100644 app/code/Magento/Backend/Model/View.php create mode 100644 app/code/Magento/Backend/Model/View/Layout/GeneratorPool.php create mode 100644 app/code/Magento/Backend/Model/View/Layout/Reader/Block.php diff --git a/app/code/Magento/Backend/Model/View.php b/app/code/Magento/Backend/Model/View.php deleted file mode 100644 index 048b77b50f2e3..0000000000000 --- a/app/code/Magento/Backend/Model/View.php +++ /dev/null @@ -1,63 +0,0 @@ -_aclFilter = $aclFilter; - parent::__construct($layout, $request, $response, $configScope, $eventManager, $pageFactory, $actionFlag); - } - - /** - * {@inheritdoc} - */ - public function loadLayout($handles = null, $generateBlocks = true, $generateXml = true, $addActionHandles = true) - { - parent::loadLayout($handles, false, $generateXml, $addActionHandles); - $this->_aclFilter->filterAclNodes($this->getLayout()->getNode()); - if ($generateBlocks) { - $this->generateLayoutBlocks(); - $this->_isLayoutLoaded = true; - } - $this->getLayout()->initMessages(); - return $this; - } - - /** - * Returns is layout loaded - * - * @return bool - */ - public function isLayoutLoaded() - { - return $this->_isLayoutLoaded; - } -} diff --git a/app/code/Magento/Backend/Model/View/Layout/Builder.php b/app/code/Magento/Backend/Model/View/Layout/Builder.php index f5c1642cb2eaa..2464d0aea8b33 100644 --- a/app/code/Magento/Backend/Model/View/Layout/Builder.php +++ b/app/code/Magento/Backend/Model/View/Layout/Builder.php @@ -11,36 +11,6 @@ class Builder extends \Magento\Framework\View\Layout\Builder { - /** - * @var Filter\Acl - */ - protected $aclFilter; - - /** - * @param View\LayoutInterface $layout - * @param App\Request\Http $request - * @param Event\ManagerInterface $eventManager - * @param Filter\Acl $aclFilter - */ - public function __construct( - View\LayoutInterface $layout, - App\Request\Http $request, - Event\ManagerInterface $eventManager, - Filter\Acl $aclFilter - ) { - parent::__construct($layout, $request, $eventManager); - $this->aclFilter = $aclFilter; - } - - /** - * @return $this - */ - protected function beforeGenerateBlock() - { - $this->aclFilter->filterAclNodes($this->layout->getNode()); - return $this; - } - /** * @return $this */ diff --git a/app/code/Magento/Backend/Model/View/Layout/Filter/Acl.php b/app/code/Magento/Backend/Model/View/Layout/Filter/Acl.php index 5cbc57eb5a773..bde8cc286da9e 100644 --- a/app/code/Magento/Backend/Model/View/Layout/Filter/Acl.php +++ b/app/code/Magento/Backend/Model/View/Layout/Filter/Acl.php @@ -7,6 +7,9 @@ */ namespace Magento\Backend\Model\View\Layout\Filter; +use Magento\Framework\View\Layout\ScheduledStructure; +use Magento\Framework\View\Layout\Data\Structure; + class Acl { /** @@ -14,32 +17,60 @@ class Acl * * @var \Magento\Framework\AuthorizationInterface */ - protected $_authorization; + protected $authorization; /** * @param \Magento\Framework\AuthorizationInterface $authorization */ public function __construct(\Magento\Framework\AuthorizationInterface $authorization) { - $this->_authorization = $authorization; + $this->authorization = $authorization; } /** - * Delete nodes that have "acl" attribute but value is "not allowed" + * Delete elements that have "acl" attribute but value is "not allowed" * In any case, the "acl" attribute will be unset * - * @param \Magento\Framework\Simplexml\Element $xml - * @return void + * @param ScheduledStructure $scheduledStructure + * @param Structure $structure */ - public function filterAclNodes(\Magento\Framework\Simplexml\Element $xml) + public function filterAclElements(ScheduledStructure $scheduledStructure, Structure $structure) { - $limitations = $xml->xpath('//*[@acl]') ?: []; - foreach ($limitations as $node) { - if (!$this->_authorization->isAllowed($node['acl'])) { - $node->unsetSelf(); - } else { - unset($node['acl']); + foreach ($scheduledStructure->getElements() as $name => $data) { + list(, $data) = $data; + if (isset($data['attributes']['acl']) && $data['attributes']['acl']) { + if (!$this->authorization->isAllowed($data['attributes']['acl'])) { + $this->removeElement($scheduledStructure, $structure, $name); + } else { + unset($data['attributes']['acl']); + } } } } + + /** + * Remove scheduled element + * + * @param ScheduledStructure $scheduledStructure + * @param Structure $structure + * @param string $elementName + * @param bool $isChild + * @return $this + */ + protected function removeElement( + ScheduledStructure $scheduledStructure, + Structure $structure, + $elementName, + $isChild = false + ) { + $elementsToRemove = array_keys($structure->getChildren($elementName)); + $scheduledStructure->unsetElement($elementName); + foreach ($elementsToRemove as $element) { + $this->removeElement($scheduledStructure, $structure, $element, true); + } + if (!$isChild) { + $structure->unsetElement($elementName); + } + return $this; + } } diff --git a/app/code/Magento/Backend/Model/View/Layout/GeneratorPool.php b/app/code/Magento/Backend/Model/View/Layout/GeneratorPool.php new file mode 100644 index 0000000000000..8cb5621e70f31 --- /dev/null +++ b/app/code/Magento/Backend/Model/View/Layout/GeneratorPool.php @@ -0,0 +1,57 @@ +aclFilter = $aclFilter; + parent::__construct( + $helper, + $scopeConfig, + $scopeResolver, + $generators + ); + } + + /** + * Build structure that is based on scheduled structure + * + * @param ScheduledStructure $scheduledStructure + * @param Structure $structure + * @return $this + */ + protected function buildStructure(ScheduledStructure $scheduledStructure, Structure $structure) + { + parent::buildStructure($scheduledStructure, $structure); + $this->aclFilter->filterAclElements($scheduledStructure, $structure); + return $this; + } +} diff --git a/app/code/Magento/Backend/Model/View/Layout/Reader/Block.php b/app/code/Magento/Backend/Model/View/Layout/Reader/Block.php new file mode 100644 index 0000000000000..8da72955244ce --- /dev/null +++ b/app/code/Magento/Backend/Model/View/Layout/Reader/Block.php @@ -0,0 +1,29 @@ +attributes[] = 'acl'; + parent::__construct( + $helper, + $argumentParser, + $readerPool, + $scopeType + ); + } +} diff --git a/app/code/Magento/Backend/Model/View/Page/Builder.php b/app/code/Magento/Backend/Model/View/Page/Builder.php index bab9c4abf8ef6..7ebc4dea21f75 100644 --- a/app/code/Magento/Backend/Model/View/Page/Builder.php +++ b/app/code/Magento/Backend/Model/View/Page/Builder.php @@ -12,40 +12,6 @@ class Builder extends View\Page\Builder { - /** - * @var Layout\Filter\Acl $aclFilter - */ - protected $aclFilter; - - /** - * @param View\LayoutInterface $layout - * @param App\Request\Http $request - * @param Event\ManagerInterface $eventManager - * @param View\Page\Config $pageConfig - * @param View\Page\Layout\Reader $pageLayoutReader - * @param Layout\Filter\Acl $aclFilter - */ - public function __construct( - View\LayoutInterface $layout, - App\Request\Http $request, - Event\ManagerInterface $eventManager, - View\Page\Config $pageConfig, - View\Page\Layout\Reader $pageLayoutReader, - Layout\Filter\Acl $aclFilter - ) { - parent::__construct($layout, $request, $eventManager, $pageConfig, $pageLayoutReader); - $this->aclFilter = $aclFilter; - } - - /** - * @return $this - */ - protected function beforeGenerateBlock() - { - $this->aclFilter->filterAclNodes($this->layout->getNode()); - return $this; - } - /** * @return $this */ diff --git a/app/code/Magento/Backend/etc/adminhtml/di.xml b/app/code/Magento/Backend/etc/adminhtml/di.xml index 9b069a40b9453..31f6b689edf69 100644 --- a/app/code/Magento/Backend/etc/adminhtml/di.xml +++ b/app/code/Magento/Backend/etc/adminhtml/di.xml @@ -16,7 +16,9 @@ - + + + diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTest.php index 689068525611c..d08e9b2195931 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTest.php @@ -30,6 +30,7 @@ protected function setUp() $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->layoutFactory = $objectManager->get('Magento\Framework\View\LayoutFactory'); $this->_layout = $this->layoutFactory->create(); + $objectManager->get('Magento\Framework\App\Cache\Type\Layout')->clean(); } public function testConstructorStructure() diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Utility/Layout.php b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/Layout.php index cf50358a44d1f..1b7d57bde5df8 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/Utility/Layout.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Utility/Layout.php @@ -103,6 +103,7 @@ public function getLayoutDependencies() 'pageConfigStructure' => $objectManager->create('Magento\Framework\View\Page\Config\Structure'), 'reader' => $objectManager->get('commonRenderPool'), 'generatorPool' => $objectManager->get('Magento\Framework\View\Layout\GeneratorPool'), + 'cache' => $objectManager->get('Magento\Framework\App\Cache\Type\Layout'), ]; } } diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/CategoriesJsonTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/CategoriesJsonTest.php index 13653fcab211b..046eacae7d444 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/CategoriesJsonTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/CategoriesJsonTest.php @@ -32,7 +32,7 @@ class CategoriesJsonTest extends \PHPUnit_Framework_TestCase protected $requestMock; /** - * @var \Magento\Backend\Model\View|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\App\View|\PHPUnit_Framework_MockObject_MockObject */ protected $viewMock; @@ -60,7 +60,7 @@ public function setUp() { $this->responseMock = $this->getMock('Magento\Framework\App\Response\Http', [], [], '', false); $this->requestMock = $this->getMock('Magento\Framework\App\Request\Http', [], [], '', false); - $this->viewMock = $this->getMock('Magento\Backend\Model\View', ['getLayout'], [], '', false); + $this->viewMock = $this->getMock('Magento\Framework\App\View', ['getLayout'], [], '', false); $this->objectManagerMock = $this->getMock( 'Magento\Framework\ObjectManager\ObjectManager', [], diff --git a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/ChooserTest.php b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/ChooserTest.php index e8fbd0e489845..149dffbae263a 100644 --- a/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/ChooserTest.php +++ b/dev/tests/unit/testsuite/Magento/Catalog/Controller/Adminhtml/Category/Widget/ChooserTest.php @@ -27,7 +27,7 @@ class ChooserTest extends \PHPUnit_Framework_TestCase protected $requestMock; /** - * @var \Magento\Backend\Model\View|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\App\View|\PHPUnit_Framework_MockObject_MockObject */ protected $viewMock; @@ -55,7 +55,7 @@ public function setUp() { $this->responseMock = $this->getMock('Magento\Framework\App\Response\Http', [], [], '', false); $this->requestMock = $this->getMock('Magento\Framework\App\Request\Http', [], [], '', false); - $this->viewMock = $this->getMock('Magento\Backend\Model\View', ['getLayout'], [], '', false); + $this->viewMock = $this->getMock('Magento\Framework\App\View', ['getLayout'], [], '', false); $this->objectManagerMock = $this->getMock( 'Magento\Framework\ObjectManager\ObjectManager', [], diff --git a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/AddCommentTest.php b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/AddCommentTest.php index 112369e7e3ac8..a588543eb236b 100755 --- a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/AddCommentTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/AddCommentTest.php @@ -95,7 +95,7 @@ public function setUp() ->disableOriginalConstructor() ->setMethods([]) ->getMock(); - $this->viewMock = $this->getMockBuilder('Magento\Backend\Model\View') + $this->viewMock = $this->getMockBuilder('Magento\Framework\App\View') ->disableOriginalConstructor() ->setMethods([]) ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/NewActionTest.php b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/NewActionTest.php index 6d06bf0d76155..f49f0e66596e9 100755 --- a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/NewActionTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/NewActionTest.php @@ -93,7 +93,7 @@ public function setUp() ->disableOriginalConstructor() ->setMethods([]) ->getMock(); - $this->viewMock = $this->getMockBuilder('Magento\Backend\Model\View') + $this->viewMock = $this->getMockBuilder('Magento\Framework\App\View') ->disableOriginalConstructor() ->setMethods([]) ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/ViewTest.php b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/ViewTest.php index 90a60f27b8811..dddec168e6774 100755 --- a/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/Invoice/ViewTest.php @@ -100,7 +100,7 @@ public function setUp() ->disableOriginalConstructor() ->setMethods([]) ->getMock(); - $this->viewMock = $this->getMockBuilder('Magento\Backend\Model\View') + $this->viewMock = $this->getMockBuilder('Magento\Framework\App\View') ->disableOriginalConstructor() ->setMethods([]) ->getMock(); diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/GetShippingItemsGridTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/GetShippingItemsGridTest.php index 7c56165ae6a9b..4a3db1e687cb2 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/GetShippingItemsGridTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/GetShippingItemsGridTest.php @@ -26,7 +26,7 @@ class GetShippingItemsGridTest extends \PHPUnit_Framework_TestCase protected $responseMock; /** - * @var \Magento\Backend\Model\View|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\App\View|\PHPUnit_Framework_MockObject_MockObject */ protected $viewMock; @@ -52,7 +52,7 @@ protected function setUp() false ); $this->viewMock = $this->getMock( - 'Magento\Backend\Model\View', + 'Magento\Framework\App\View', ['getLayout', 'renderLayout', '__wakeup'], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/RemoveTrackTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/RemoveTrackTest.php index 274bf5a790d71..01fa676a9607f 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/RemoveTrackTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/RemoveTrackTest.php @@ -36,7 +36,7 @@ class RemoveTrackTest extends \PHPUnit_Framework_TestCase protected $shipmentMock; /** - * @var \Magento\Backend\Model\View|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\App\View|\PHPUnit_Framework_MockObject_MockObject */ protected $viewMock; @@ -84,7 +84,7 @@ protected function setUp() false ); $this->viewMock = $this->getMock( - 'Magento\Backend\Model\View', + 'Magento\Framework\App\View', ['loadLayout', 'getLayout', 'getPage'], [], '', diff --git a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php index d18f836bd35b2..3f88ae9d1e130 100644 --- a/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php +++ b/dev/tests/unit/testsuite/Magento/Shipping/Controller/Adminhtml/Order/Shipment/ViewTest.php @@ -27,7 +27,7 @@ class ViewTest extends \PHPUnit_Framework_TestCase protected $shipmentMock; /** - * @var \Magento\Backend\Model\View|\PHPUnit_Framework_MockObject_MockObject + * @var \Magento\Framework\App\View|\PHPUnit_Framework_MockObject_MockObject */ protected $viewMock; @@ -95,7 +95,7 @@ protected function setUp() false ); $this->viewMock = $this->getMock( - 'Magento\Backend\Model\View', + 'Magento\Framework\App\View', ['loadLayout', 'getLayout', 'renderLayout', 'getPage'], [], '', diff --git a/lib/internal/Magento/Framework/View/Layout.php b/lib/internal/Magento/Framework/View/Layout.php index 5d8ab95b50bed..0bac8f7c9f08e 100644 --- a/lib/internal/Magento/Framework/View/Layout.php +++ b/lib/internal/Magento/Framework/View/Layout.php @@ -71,11 +71,6 @@ class Layout extends \Magento\Framework\Simplexml\Config implements \Magento\Fra */ protected $structure; - /** - * @var \Magento\Framework\View\Layout\ScheduledStructure - */ - protected $scheduledStructure; - /** * Renderers registered for particular name * @@ -120,11 +115,6 @@ class Layout extends \Magento\Framework\Simplexml\Config implements \Magento\Fra */ protected $cacheable; - /** - * @var \Magento\Framework\View\Page\Config\Structure - */ - protected $pageConfigStructure; - /** * @var \Magento\Framework\View\Layout\GeneratorPool */ @@ -173,16 +163,14 @@ public function __construct( $this->_processorFactory = $processorFactory; $this->_eventManager = $eventManager; $this->structure = $structure; - $this->scheduledStructure = $scheduledStructure; $this->messageManager = $messageManager; $this->themeResolver = $themeResolver; - $this->pageConfigStructure = $pageConfigStructure; $this->readerPool = $readerPool; $this->generatorPool = $generatorPool; $this->cacheable = $cacheable; $this->cache = $cache; - $this->readerContext = new Layout\Reader\Context($this->scheduledStructure, $this->pageConfigStructure); + $this->readerContext = new Layout\Reader\Context($scheduledStructure, $pageConfigStructure); $this->generatorContext = new Layout\Generator\Context($this->structure, $this); } diff --git a/lib/internal/Magento/Framework/View/Layout/Generator/Block.php b/lib/internal/Magento/Framework/View/Layout/Generator/Block.php index 980c514431620..a68ce74cc7b4d 100644 --- a/lib/internal/Magento/Framework/View/Layout/Generator/Block.php +++ b/lib/internal/Magento/Framework/View/Layout/Generator/Block.php @@ -35,23 +35,37 @@ class Block implements Layout\GeneratorInterface protected $logger; /** - * Constructor - * + * @var \Magento\Framework\App\Config\ScopeConfigInterface + */ + protected $scopeConfig; + + /** + * @var \Magento\Framework\App\ScopeResolverInterface + */ + protected $scopeResolver; + + /** * @param \Magento\Framework\View\Element\BlockFactory $blockFactory * @param \Magento\Framework\Data\Argument\InterpreterInterface $argumentInterpreter * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Psr\Log\LoggerInterface $logger + * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig + * @param \Magento\Framework\App\ScopeResolverInterface $scopeResolver */ public function __construct( \Magento\Framework\View\Element\BlockFactory $blockFactory, \Magento\Framework\Data\Argument\InterpreterInterface $argumentInterpreter, \Magento\Framework\Event\ManagerInterface $eventManager, - \Psr\Log\LoggerInterface $logger + \Psr\Log\LoggerInterface $logger, + \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, + \Magento\Framework\App\ScopeResolverInterface $scopeResolver ) { $this->blockFactory = $blockFactory; $this->argumentInterpreter = $argumentInterpreter; $this->eventManager = $eventManager; $this->logger = $logger; + $this->scopeConfig = $scopeConfig; + $this->scopeResolver = $scopeResolver; } /** @@ -100,8 +114,12 @@ public function process(Layout\Reader\Context $readerContext, Layout\Generator\C // Run all actions after layout initialization foreach ($blockActions as $elementName => $actions) { foreach ($actions as $action) { - list($methodName, $actionArguments) = $action; - $this->generateAction($blocks[$elementName], $methodName, $actionArguments); + list($methodName, $actionArguments, $configPath, $scopeType) = $action; + if (empty($configPath) + || $this->scopeConfig->isSetFlag($configPath, $scopeType, $this->scopeResolver->getScope()) + ) { + $this->generateAction($blocks[$elementName], $methodName, $actionArguments); + } } } return $this; diff --git a/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php b/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php index bded927dbf2b7..e28b1dbb5605a 100644 --- a/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php +++ b/lib/internal/Magento/Framework/View/Layout/GeneratorPool.php @@ -22,16 +22,30 @@ class GeneratorPool protected $generators = []; /** - * Constructor - * + * @var \Magento\Framework\App\Config\ScopeConfigInterface + */ + protected $scopeConfig; + + /** + * @var \Magento\Framework\App\ScopeResolverInterface + */ + protected $scopeResolver; + + /** * @param ScheduledStructure\Helper $helper + * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig + * @param \Magento\Framework\App\ScopeResolverInterface $scopeResolver * @param array $generators */ public function __construct( ScheduledStructure\Helper $helper, + \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, + \Magento\Framework\App\ScopeResolverInterface $scopeResolver, array $generators = null ) { $this->helper = $helper; + $this->scopeConfig = $scopeConfig; + $this->scopeResolver = $scopeResolver; $this->addGenerators($generators); } @@ -99,6 +113,14 @@ protected function buildStructure(ScheduledStructure $scheduledStructure, Data\S foreach ($scheduledStructure->getListToRemove() as $elementToRemove) { $this->removeElement($scheduledStructure, $structure, $elementToRemove); } + foreach ($scheduledStructure->getIfconfigList() as $elementToCheckConfig) { + list($configPath, $scopeType) = $scheduledStructure->getIfconfigElement($elementToCheckConfig); + if (!empty($configPath) + && !$this->scopeConfig->isSetFlag($configPath, $scopeType, $this->scopeResolver->getScope()) + ) { + $this->removeIfConfigElement($scheduledStructure, $structure, $elementToCheckConfig); + } + } return $this; } @@ -129,6 +151,33 @@ protected function removeElement( return $this; } + /** + * Remove scheduled element if config isn't true + * + * @param ScheduledStructure $scheduledStructure + * @param Data\Structure $structure + * @param string $elementName + * @param bool $isChild + * @return $this + */ + protected function removeIfConfigElement( + ScheduledStructure $scheduledStructure, + Data\Structure $structure, + $elementName, + $isChild = false + ) { + $elementsToRemove = array_keys($structure->getChildren($elementName)); + $scheduledStructure->unsetElement($elementName); + foreach ($elementsToRemove as $element) { + $this->removeIfConfigElement($scheduledStructure, $structure, $element, true); + } + if (!$isChild) { + $structure->unsetElement($elementName); + $scheduledStructure->unsetElementFromIfconfigList($elementName); + } + return $this; + } + /** * Move element in scheduled structure * diff --git a/lib/internal/Magento/Framework/View/Layout/Reader/Block.php b/lib/internal/Magento/Framework/View/Layout/Reader/Block.php index 40bea712b9d27..49d8ec2d8463b 100644 --- a/lib/internal/Magento/Framework/View/Layout/Reader/Block.php +++ b/lib/internal/Magento/Framework/View/Layout/Reader/Block.php @@ -42,16 +42,6 @@ class Block implements Layout\ReaderInterface */ protected $argumentParser; - /** - * @var \Magento\Framework\App\Config\ScopeConfigInterface - */ - protected $scopeConfig; - - /** - * @var \Magento\Framework\App\ScopeResolverInterface - */ - protected $scopeResolver; - /** * @var \Magento\Framework\View\Layout\ReaderPool */ @@ -68,22 +58,16 @@ class Block implements Layout\ReaderInterface * @param Layout\ScheduledStructure\Helper $helper * @param Layout\Argument\Parser $argumentParser * @param Layout\ReaderPool $readerPool - * @param App\Config\ScopeConfigInterface $scopeConfig - * @param App\ScopeResolverInterface $scopeResolver * @param string|null $scopeType */ public function __construct( Layout\ScheduledStructure\Helper $helper, Layout\Argument\Parser $argumentParser, Layout\ReaderPool $readerPool, - App\Config\ScopeConfigInterface $scopeConfig, - App\ScopeResolverInterface $scopeResolver, $scopeType = null ) { $this->helper = $helper; $this->argumentParser = $argumentParser; - $this->scopeConfig = $scopeConfig; - $this->scopeResolver = $scopeResolver; $this->readerPool = $readerPool; $this->scopeType = $scopeType; } @@ -147,10 +131,8 @@ protected function scheduleBlock( $scheduledStructure->setStructureElementData($elementName, $data); $configPath = (string)$currentElement->getAttribute('ifconfig'); - if (!empty($configPath) - && !$this->scopeConfig->isSetFlag($configPath, $this->scopeType, $this->scopeResolver->getScope()) - ) { - $scheduledStructure->setElementToRemoveList($elementName); + if (!empty($configPath)) { + $scheduledStructure->setElementToIfconfigList($elementName, $configPath, $this->scopeType); } } @@ -218,14 +200,9 @@ protected function getActions(Layout\Element $blockElement) /** @var $actionElement Layout\Element */ foreach ($this->getElementsByType($blockElement, self::TYPE_ACTION) as $actionElement) { $configPath = $actionElement->getAttribute('ifconfig'); - if ($configPath - && !$this->scopeConfig->isSetFlag($configPath, $this->scopeType, $this->scopeResolver->getScope()) - ) { - continue; - } $methodName = $actionElement->getAttribute('method'); $actionArguments = $this->parseArguments($actionElement); - $actions[] = [$methodName, $actionArguments]; + $actions[] = [$methodName, $actionArguments, $configPath, $this->scopeType]; } return $actions; } diff --git a/lib/internal/Magento/Framework/View/Layout/Reader/UiComponent.php b/lib/internal/Magento/Framework/View/Layout/Reader/UiComponent.php index afa8bd9dae819..ae986912df95d 100644 --- a/lib/internal/Magento/Framework/View/Layout/Reader/UiComponent.php +++ b/lib/internal/Magento/Framework/View/Layout/Reader/UiComponent.php @@ -28,16 +28,6 @@ class UiComponent implements Layout\ReaderInterface */ protected $layoutHelper; - /** - * @var \Magento\Framework\App\Config\ScopeConfigInterface - */ - protected $scopeConfig; - - /** - * @var \Magento\Framework\App\ScopeResolverInterface - */ - protected $scopeResolver; - /** * @var string|null */ @@ -47,19 +37,13 @@ class UiComponent implements Layout\ReaderInterface * Constructor * * @param Layout\ScheduledStructure\Helper $helper - * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig - * @param \Magento\Framework\App\ScopeResolverInterface $scopeResolver * @param string|null $scopeType */ public function __construct( Layout\ScheduledStructure\Helper $helper, - App\Config\ScopeConfigInterface $scopeConfig, - App\ScopeResolverInterface $scopeResolver, $scopeType = null ) { $this->layoutHelper = $helper; - $this->scopeConfig = $scopeConfig; - $this->scopeResolver = $scopeResolver; $this->scopeType = $scopeType; } @@ -93,10 +77,8 @@ public function interpret(Context $readerContext, Layout\Element $currentElement 'attributes' => $this->getAttributes($currentElement) ]); $configPath = (string)$currentElement->getAttribute('ifconfig'); - if (!empty($configPath) - && !$this->scopeConfig->isSetFlag($configPath, $this->scopeType, $this->scopeResolver->getScope()) - ) { - $scheduledStructure->setElementToRemoveList($referenceName); + if (!empty($configPath)) { + $scheduledStructure->setElementToIfconfigList($referenceName, $configPath, $this->scopeType); } return $this; } diff --git a/lib/internal/Magento/Framework/View/Layout/ScheduledStructure.php b/lib/internal/Magento/Framework/View/Layout/ScheduledStructure.php index ed99b29d29909..dd24de1c4ac70 100644 --- a/lib/internal/Magento/Framework/View/Layout/ScheduledStructure.php +++ b/lib/internal/Magento/Framework/View/Layout/ScheduledStructure.php @@ -45,6 +45,13 @@ class ScheduledStructure */ protected $_scheduledRemoves; + /** + * Scheduled structure elements with ifconfig attribute + * + * @var array + */ + protected $_scheduledIfconfig; + /** * Materialized paths for overlapping workaround of scheduled structural elements * @@ -64,6 +71,7 @@ public function __construct(array $data = []) $this->_scheduledElements = isset($data['scheduledElements']) ? $data['scheduledElements'] : []; $this->_scheduledMoves = isset($data['scheduledMoves']) ? $data['scheduledMoves'] : []; $this->_scheduledRemoves = isset($data['scheduledRemoves']) ? $data['scheduledRemoves'] : []; + $this->_scheduledIfconfig = isset($data['scheduledIfconfig']) ? $data['scheduledIfconfig'] : []; $this->_scheduledPaths = isset($data['scheduledPaths']) ? $data['scheduledPaths'] : []; } @@ -87,6 +95,16 @@ public function getListToRemove() return array_keys(array_intersect_key($this->_scheduledElements, $this->_scheduledRemoves)); } + /** + * Get elements to check ifconfig attribute + * + * @return array + */ + public function getIfconfigList() + { + return array_keys(array_intersect_key($this->_scheduledElements, $this->_scheduledIfconfig)); + } + /** * Get scheduled elements list * @@ -165,6 +183,18 @@ public function getElementToMove($elementName, $default = null) return isset($this->_scheduledMoves[$elementName]) ? $this->_scheduledMoves[$elementName] : $default; } + /** + * Get element to check by name + * + * @param string $elementName + * @param mixed $default + * @return mixed + */ + public function getIfconfigElement($elementName, $default = null) + { + return isset($this->_scheduledIfconfig[$elementName]) ? $this->_scheduledIfconfig[$elementName] : $default; + } + /** * Add element to move list * @@ -199,6 +229,29 @@ public function setElementToRemoveList($elementName) $this->_scheduledRemoves[$elementName] = 1; } + /** + * Unset element by name removed by ifconfig attribute + * + * @param string $elementName + * @return void + */ + public function unsetElementFromIfconfigList($elementName) + { + unset($this->_scheduledIfconfig[$elementName]); + } + + /** + * Set element value to check ifconfig attribute + * + * @param string $elementName + * @param string $configPath + * @param string $scopeType + */ + public function setElementToIfconfigList($elementName, $configPath, $scopeType) + { + $this->_scheduledIfconfig[$elementName] = [$configPath, $scopeType]; + } + /** * Get scheduled structure * From 962ac7cf5b3bb1ade5ae2319c9dd321bd32e90d5 Mon Sep 17 00:00:00 2001 From: Sviatoslav Mankivskyi Date: Fri, 6 Feb 2015 18:08:25 +0200 Subject: [PATCH 23/60] MAGETWO-33068: [Dev] Layout Processing Improvement --- .../View/Layout/Generator/BlockTest.php | 14 ++++++++++- .../View/Layout/GeneratorPoolTest.php | 24 ++++++++++++++++++- .../View/Layout/Reader/UiComponentTest.php | 24 +------------------ 3 files changed, 37 insertions(+), 25 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Generator/BlockTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Generator/BlockTest.php index d6d6a3d70e929..de0c5ea777ff6 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Generator/BlockTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Generator/BlockTest.php @@ -50,6 +50,8 @@ public function testProcess( [ 'test_argument' => $argumentData ], + 'config_path', + 'scope', ], ] ], @@ -138,6 +140,14 @@ public function testProcess( $eventManager->expects($this->once())->method('dispatch') ->with('core_layout_block_create_after', [$literal => $blockInstance]); + $scopeConfigMock = $this->getMock('Magento\Framework\App\Config\ScopeConfigInterface', [], [], '', false); + $scopeConfigMock->expects($this->once())->method('isSetFlag') + ->with('config_path', 'scope', 'default')->willReturn(true); + + $scopeResolverMock = $this->getMock('Magento\Framework\App\ScopeResolverInterface', [], [], '', false); + $scopeResolverMock->expects($this->once())->method('getScope') + ->willReturn('default'); + /** @var \Magento\Framework\View\Layout\Generator\Block $block */ $block = (new \Magento\TestFramework\Helper\ObjectManager($this)) ->getObject( @@ -145,7 +155,9 @@ public function testProcess( [ 'argumentInterpreter' => $argumentInterpreter, 'blockFactory' => $blockFactory, - 'eventManager' => $eventManager + 'eventManager' => $eventManager, + 'scopeConfig' => $scopeConfigMock, + 'scopeResolver' => $scopeResolverMock, ] ); $block->process($readerContext, $generatorContext); diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/GeneratorPoolTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/GeneratorPoolTest.php index c3d920dcf59ba..1312898865bb0 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/GeneratorPoolTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/GeneratorPoolTest.php @@ -36,6 +36,16 @@ class GeneratorPoolTest extends \PHPUnit_Framework_TestCase */ protected $structureMock; + /** + * @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $scopeConfigMock; + + /** + * @var \Magento\Framework\App\ScopeResolverInterface|\PHPUnit_Framework_MockObject_MockObject + */ + protected $scopeResolverMock; + /** * @var GeneratorPool */ @@ -66,7 +76,19 @@ protected function setUp() ->disableOriginalConstructor() ->getMock(); - $this->model = new GeneratorPool($this->helperMock, $this->getGeneratorsMocks()); + $this->scopeConfigMock = $this->getMockBuilder('Magento\Framework\App\Config\ScopeConfigInterface') + ->disableOriginalConstructor() + ->getMock(); + $this->scopeResolverMock = $this->getMockBuilder('Magento\Framework\App\ScopeResolverInterface') + ->disableOriginalConstructor() + ->getMock(); + + $this->model = new GeneratorPool( + $this->helperMock, + $this->scopeConfigMock, + $this->scopeResolverMock, + $this->getGeneratorsMocks() + ); } /** diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/UiComponentTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/UiComponentTest.php index a5b295ecd5c7b..ad7e4dfc0cc97 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/UiComponentTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/UiComponentTest.php @@ -21,16 +21,6 @@ class UiComponentTest extends \PHPUnit_Framework_TestCase */ protected $helper; - /** - * @var \Magento\Framework\App\Config\ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $scopeConfig; - - /** - * @var \Magento\Framework\App\ScopeResolverInterface|\PHPUnit_Framework_MockObject_MockObject - */ - protected $scopeResolver; - /** * @var \Magento\Framework\View\Layout\Reader\Context|\PHPUnit_Framework_MockObject_MockObject */ @@ -42,18 +32,11 @@ public function setUp() ->setMethods(['scheduleStructure']) ->disableOriginalConstructor() ->getMock(); - $this->scopeConfig = $this->getMockBuilder('Magento\Framework\App\Config\ScopeConfigInterface')->getMock(); - $this->scopeResolver = $this->getMockForAbstractClass( - 'Magento\Framework\App\ScopeResolverInterface', - [], - '', - false - ); $this->context = $this->getMockBuilder('Magento\Framework\View\Layout\Reader\Context') ->setMethods(['getScheduledStructure']) ->disableOriginalConstructor() ->getMock(); - $this->model = new UiComponent($this->helper, $this->scopeConfig, $this->scopeResolver, null); + $this->model = new UiComponent($this->helper, null); } public function testGetSupportedNodes() @@ -70,11 +53,6 @@ public function testGetSupportedNodes() */ public function testInterpret($element) { - $scope = $this->getMock('Magento\Framework\App\ScopeInterface', [], [], '', false); - $this->scopeResolver->expects($this->any())->method('getScope')->will($this->returnValue($scope)); - $this->scopeConfig->expects($this->once())->method('isSetFlag') - ->with('test', null, $scope) - ->will($this->returnValue(false)); $scheduleStructure = $this->getMock('\Magento\Framework\View\Layout\ScheduledStructure', [], [], '', false); $this->context->expects($this->any())->method('getScheduledStructure')->will( $this->returnValue($scheduleStructure) From 8d596f2997db0292ddcf89fa67bf00e5bce6c6de Mon Sep 17 00:00:00 2001 From: Sviatoslav Mankivskyi Date: Fri, 6 Feb 2015 18:22:19 +0200 Subject: [PATCH 24/60] MAGETWO-33068: [Dev] Layout Processing Improvement --- .../View/Layout/Reader/BlockTest.php | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/BlockTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/BlockTest.php index 812277405dad2..f546ef8d922e6 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/BlockTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Reader/BlockTest.php @@ -92,46 +92,27 @@ public function setUp() /** * @param string $literal - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setElementToRemoveListCount - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $isSetFlagCount * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $scheduleStructureCount - * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $getScopeCount - * @covers Magento\Framework\View\Layout\Reader\Block::interpret() * @dataProvider processDataProvider */ public function testProcessBlock( $literal, - $setElementToRemoveListCount, - $isSetFlagCount, - $scheduleStructureCount, - $getScopeCount + $scheduleStructureCount ) { $this->context->expects($this->once())->method('getScheduledStructure') ->will($this->returnValue($this->scheduledStructure)); - $this->scheduledStructure->expects($setElementToRemoveListCount) - ->method('setElementToRemoveList')->with($literal); - $scope = $this->getMock('Magento\Framework\App\ScopeInterface', [], [], '', false); $testValue = 'some_value'; - $scopeConfig = $this->getMock('Magento\Framework\App\Config', [], [], '', false); - $scopeConfig->expects($isSetFlagCount)->method('isSetFlag') - ->with($testValue, null, $scope) - ->will($this->returnValue(false)); $helper = $this->getMock('Magento\Framework\View\Layout\ScheduledStructure\Helper', [], [], '', false); $helper->expects($scheduleStructureCount)->method('scheduleStructure')->will($this->returnValue($literal)); - $scopeResolver = $this->getMock('Magento\Framework\App\ScopeResolverInterface', [], [], '', false); - $scopeResolver->expects($getScopeCount)->method('getScope')->will($this->returnValue($scope)); - $this->prepareReaderPool('<' . $literal . ' ifconfig="' . $testValue . '"/>'); /** @var \Magento\Framework\View\Layout\Reader\Block $block */ $block = $this->getBlock( [ 'helper' => $helper, - 'scopeConfig' => $scopeConfig, - 'scopeResolver' => $scopeResolver, 'readerPool' => $this->readerPool, ] ); @@ -165,8 +146,8 @@ public function testProcessReference() public function processDataProvider() { return [ - ['block', $this->once(), $this->once(), $this->once(), $this->once()], - ['page', $this->never(), $this->never(), $this->never(), $this->never()] + ['block', $this->once()], + ['page', $this->never()] ]; } } From 4dc243e1ccc44dcfcb71e8ba868b70ddba553630 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Fri, 6 Feb 2015 18:21:53 +0200 Subject: [PATCH 25/60] MAGETWO-33398: HTML response minification --- lib/internal/Magento/Framework/View/Template/Html/Minifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php index 9b3e01f43dc59..9af26b5705f77 100644 --- a/lib/internal/Magento/Framework/View/Template/Html/Minifier.php +++ b/lib/internal/Magento/Framework/View/Template/Html/Minifier.php @@ -100,7 +100,7 @@ public function minify($file) { $file = $this->appDirectory->getRelativePath($file); $content = preg_replace( - '#(?inlineHtmlTags) . ')(? \<#', + '#(?inlineHtmlTags) . ')\> \<#', '><', preg_replace( '#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre|script)\b))*+)' From b6bdf48e916e2656dca6500a30f3c1937baee480 Mon Sep 17 00:00:00 2001 From: Andriy Nasinnyk Date: Fri, 6 Feb 2015 18:35:18 +0200 Subject: [PATCH 26/60] MAGETWO-31369: [South] Unit and Integration tests coverage --- .../Magento/Framework/View/Template/Html/MinifierTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php index 0c7c77e82ecdf..e194aa320e530 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Template/Html/MinifierTest.php @@ -114,7 +114,7 @@ public function testMinify() TEXT; $expectedContent = << Test titleText Link some textsomeMethod(); ?>
inline text + inline text TEXT; $this->appDirectory->expects($this->once()) From c0f5848e539ee19bb19c64e101da576800446d13 Mon Sep 17 00:00:00 2001 From: Sviatoslav Mankivskyi Date: Fri, 6 Feb 2015 19:30:31 +0200 Subject: [PATCH 27/60] MAGETWO-33068: [Dev] Layout Processing Improvement --- .../Magento/Framework/View/LayoutDirectivesTest.php | 10 ++++++++-- .../Magento/Test/Legacy/_files/obsolete_classes.php | 1 + .../Magento/Test/Legacy/_files/obsolete_methods.php | 3 +++ .../Magento/Test/Legacy/_files/obsolete_properties.php | 10 ++++++++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/LayoutDirectivesTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutDirectivesTest.php index 579c983afae91..8b7d5ba047c92 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/LayoutDirectivesTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutDirectivesTest.php @@ -21,10 +21,15 @@ class LayoutDirectivesTest extends \PHPUnit_Framework_TestCase */ protected $builderFactory; + /** + * @var \Magento\Framework\ObjectManagerInterface + */ + protected $objectManager; + protected function setUp() { - $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - $this->layoutFactory = $objectManager->get('Magento\Framework\View\LayoutFactory'); + $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); + $this->layoutFactory = $this->objectManager->get('Magento\Framework\View\LayoutFactory'); } /** @@ -35,6 +40,7 @@ protected function setUp() */ protected function _getLayoutModel($fixtureFile) { + $this->objectManager->get('Magento\Framework\App\Cache\Type\Layout')->clean(); $layout = $this->layoutFactory->create(); /** @var $xml \Magento\Framework\View\Layout\Element */ $xml = simplexml_load_file( diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php index 9f65be6b18f32..2c805171d6e7b 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_classes.php @@ -2908,4 +2908,5 @@ 'Magento\Core\Model\TemplateEngine\Plugin\DebugHints', 'Magento\Developer\Model\TemplateEngine\Plugin\DebugHints' ], + ['Magento\Backend\Model\View', 'Magento\Framework\App\View'], ]; diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php index 3efaaeaa5e577..4e16c567ea6f8 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_methods.php @@ -2046,4 +2046,7 @@ ['_initSendToFriendModel', 'Magento\Sendfriend\Controller\Product'], ['register', 'Magento\Sendfriend\Model\Sendfriend'], ['_getImageHelper', 'Magento\Catalog\Model\Product'], + ['beforeGenerateBlock', 'Magento\Backend\Model\View\Layout\Builder'], + ['beforeGenerateBlock', 'Magento\Backend\Model\View\Page\Builder'], + ['filterAclNodes', 'Magento\Backend\Model\View\Layout\Filter\Acl', 'Magento\Backend\Model\View\Layout\Filter\Acl::filterAclElements'], ]; diff --git a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php index 89dcd2f0e9bbb..c586b50e82f15 100644 --- a/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php +++ b/dev/tests/static/testsuite/Magento/Test/Legacy/_files/obsolete_properties.php @@ -368,4 +368,14 @@ ['_catalogData', 'Magento\Catalog\Block\Product\AbstractProduct'], ['_env', 'Magento\Rule\Model\Resource\Rule\Collection\AbstractCollection'], ['_catalogImage', 'Magento\Catalog\Model\Product'], + ['aclFilter', 'Magento\Backend\Model\View\Layout\Builder'], + ['aclFilter', 'Magento\Backend\Model\View\Page\Builder'], + ['_authorization', 'Magento\Backend\Model\View\Layout\Filter\Acl', 'Magento\Backend\Model\View\Layout\Filter\Acl::authorization'], + ['scheduledStructure', 'Magento\Framework\View\Layout'], + ['pageConfigStructure', 'Magento\Framework\View\Layout'], + ['scopeConfig', 'Magento\Framework\View\Layout\Reader\Block'], + ['scopeResolver', 'Magento\Framework\View\Layout\Reader\Block'], + ['scopeConfig', 'Magento\Framework\View\Layout\Reader\UiComponent'], + ['scopeResolver', 'Magento\Framework\View\Layout\Reader\UiComponent'], + ['handleAdded', 'Magento\Core\Model\Layout\Merge'], ]; From 36c43334ee1033f8dd6aa792ab72e5aa114b5b70 Mon Sep 17 00:00:00 2001 From: Maxim Medinskiy Date: Fri, 6 Feb 2015 20:36:59 +0200 Subject: [PATCH 28/60] MAGETWO-33094: [Dev] Investigate and implement possibility of caching interpreted arguments --- app/etc/di.xml | 44 ++++++++++++----- .../Argument/Interpreter/PassthroughTest.php | 28 +++++++++++ .../View/Layout/Generator/BlockTest.php | 49 ++++++++++++++++--- .../Argument/Interpreter/Passthrough.php | 24 +++++++++ .../Framework/View/Layout/Generator/Block.php | 4 ++ .../Framework/View/Layout/Reader/Block.php | 25 ++++++++++ 6 files changed, 153 insertions(+), 21 deletions(-) create mode 100644 dev/tests/unit/testsuite/Magento/Framework/View/Layout/Argument/Interpreter/PassthroughTest.php create mode 100644 lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/Passthrough.php diff --git a/app/etc/di.xml b/app/etc/di.xml index b0d77b6ff7369..98ed0558986bf 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -267,39 +267,55 @@ Magento\Framework\Session\Generic\Proxy - + - layoutObjectArgumentInterpreter Magento\Framework\View\Layout\Argument\Interpreter\Options - Magento\Framework\View\Layout\Argument\Interpreter\Url - layoutArrayArgumentInterpreterProxy + layoutArrayArgumentReaderInterpreterProxy Magento\Framework\Data\Argument\Interpreter\Boolean - Magento\Framework\View\Layout\Argument\Interpreter\HelperMethod Magento\Framework\Data\Argument\Interpreter\Number Magento\Framework\Data\Argument\Interpreter\String Magento\Framework\Data\Argument\Interpreter\NullType + Magento\Framework\View\Layout\Argument\Interpreter\Passthrough + Magento\Framework\View\Layout\Argument\Interpreter\Passthrough + Magento\Framework\View\Layout\Argument\Interpreter\Passthrough + + Magento\Core\Model\Layout\Merge::TYPE_ATTRIBUTE + + + + + + Magento\Framework\Data\Argument\Interpreter\String + layoutObjectArgumentInterpreter + Magento\Framework\View\Layout\Argument\Interpreter\Url + Magento\Framework\View\Layout\Argument\Interpreter\HelperMethod Magento\Core\Model\Layout\Merge::TYPE_ATTRIBUTE - + + + layoutArgumentGeneratorInterpreterInternal + + + - layoutArgumentInterpreterInternal + layoutArgumentReaderInterpreterInternal - + - layoutArgumentInterpreter + layoutArgumentReaderInterpreterInternal - + - layoutArrayArgumentInterpreter + layoutArrayArgumentReaderInterpreter @@ -341,11 +357,13 @@ blockRenderPool Magento\Framework\Store\ScopeInterface::SCOPE_STORE + layoutArgumentReaderInterpreter Magento\Framework\Store\ScopeInterface::SCOPE_STORE + layoutArgumentReaderInterpreter @@ -440,12 +458,12 @@ - layoutArgumentInterpreter + layoutArgumentGeneratorInterpreter - layoutArgumentInterpreter + layoutArgumentGeneratorInterpreter diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Argument/Interpreter/PassthroughTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Argument/Interpreter/PassthroughTest.php new file mode 100644 index 0000000000000..a7b5c0fbcfeac --- /dev/null +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Argument/Interpreter/PassthroughTest.php @@ -0,0 +1,28 @@ +_model = new Passthrough(); + } + + public function testEvaluate() + { + $input = ['data' => 'some/value']; + $expected = ['data' => 'some/value']; + + $actual = $this->_model->evaluate($input); + $this->assertSame($expected, $actual); + } +} diff --git a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Generator/BlockTest.php b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Generator/BlockTest.php index de0c5ea777ff6..aa4ab5f28b771 100644 --- a/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Generator/BlockTest.php +++ b/dev/tests/unit/testsuite/Magento/Framework/View/Layout/Generator/BlockTest.php @@ -16,6 +16,8 @@ class BlockTest extends \PHPUnit_Framework_TestCase * @param string $testGroup * @param string $testTemplate * @param string $testTtl + * @param array $testArgumentData + * @param bool $isNeedEvaluate * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $addToParentGroupCount * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setTemplateCount * @param \PHPUnit_Framework_MockObject_Matcher_InvokedCount $setTtlCount @@ -27,6 +29,8 @@ public function testProcess( $testGroup, $testTemplate, $testTtl, + $testArgumentData, + $isNeedEvaluate, $addToParentGroupCount, $setTemplateCount, $setTtlCount @@ -34,7 +38,7 @@ public function testProcess( $elementName = 'test_block'; $methodName = 'setTest'; $literal = 'block'; - $argumentData = ['argument_data']; + $argumentData = ['argument' => 'value']; $class = 'test_class'; $scheduleStructure = $this->getMock('Magento\Framework\View\Layout\ScheduledStructure', [], [], '', false); @@ -71,7 +75,7 @@ public function testProcess( 'ttl' => $testTtl, 'group' => $testGroup, ], - 'arguments' => ['data' => $argumentData] + 'arguments' => $testArgumentData ], ] ) @@ -100,11 +104,11 @@ public function testProcess( ); $blockInstance->expects($this->once())->method('setType')->with(get_class($blockInstance)); $blockInstance->expects($this->once())->method('setNameInLayout')->with($elementName); - $blockInstance->expects($this->once())->method('addData')->with(['data' => null]); + $blockInstance->expects($this->once())->method('addData')->with($argumentData); $blockInstance->expects($setTemplateCount)->method('setTemplate')->with($testTemplate); $blockInstance->expects($setTtlCount)->method('setTtl')->with(0); $blockInstance->expects($this->once())->method('setLayout')->with($layout); - $blockInstance->expects($this->once())->method($methodName)->with(null); + $blockInstance->expects($this->once())->method($methodName)->with($argumentData); $layout->expects($this->once())->method('setBlock')->with($elementName, $blockInstance); @@ -128,11 +132,22 @@ public function testProcess( '', false ); - $argumentInterpreter->expects($this->exactly(2))->method('evaluate')->with($argumentData); + if ($isNeedEvaluate) { + $argumentInterpreter + ->expects($this->any()) + ->method('evaluate') + ->with($testArgumentData['argument']) + ->willReturn($argumentData['argument']); + } else { + $argumentInterpreter->expects($this->never())->method('evaluate') + ; + } /** @var \Magento\Framework\View\Element\BlockFactory|\PHPUnit_Framework_MockObject_MockObject $blockFactory */ $blockFactory = $this->getMock('Magento\Framework\View\Element\BlockFactory', [], [], '', false); - $blockFactory->expects($this->once())->method('createBlock')->with($class, ['data' => ['data' => null]]) + $blockFactory->expects($this->any()) + ->method('createBlock') + ->with($class, ['data' => $argumentData]) ->will($this->returnValue($blockInstance)); /** @var \Magento\Framework\Event\ManagerInterface|\PHPUnit_Framework_MockObject_MockObject $eventManager */ @@ -169,8 +184,26 @@ public function testProcess( public function provider() { return [ - ['test_group', '', 'testTtl', $this->once(), $this->never(), $this->once()], - ['', 'test_template', '', $this->never(), $this->once(), $this->never()] + [ + 'test_group', + '', + 'testTtl', + ['argument' => ['name' => 'argument', 'xsi:type' => 'type', 'value' => 'value']], + true, + $this->once(), + $this->never(), + $this->once() + ], + [ + '', + 'test_template', + '', + ['argument' => 'value'], + false, + $this->never(), + $this->once(), + $this->never() + ] ]; } } diff --git a/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/Passthrough.php b/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/Passthrough.php new file mode 100644 index 0000000000000..f95d9fbfff04d --- /dev/null +++ b/lib/internal/Magento/Framework/View/Layout/Argument/Interpreter/Passthrough.php @@ -0,0 +1,24 @@ + $argumentData) { + if (!isset($argumentData[\Magento\Framework\ObjectManager\Config\Reader\Dom::TYPE_ATTRIBUTE])) { + $result[$argumentName] = $argumentData; + continue; + } $result[$argumentName] = $this->argumentInterpreter->evaluate($argumentData); } return $result; diff --git a/lib/internal/Magento/Framework/View/Layout/Reader/Block.php b/lib/internal/Magento/Framework/View/Layout/Reader/Block.php index 49d8ec2d8463b..e0594a27ec0fd 100644 --- a/lib/internal/Magento/Framework/View/Layout/Reader/Block.php +++ b/lib/internal/Magento/Framework/View/Layout/Reader/Block.php @@ -6,6 +6,7 @@ namespace Magento\Framework\View\Layout\Reader; use Magento\Framework\App; +use Magento\Framework\Data\Argument\InterpreterInterface; use Magento\Framework\View\Layout; /** @@ -52,24 +53,32 @@ class Block implements Layout\ReaderInterface */ protected $scopeType; + /** + * @var InterpreterInterface + */ + protected $argumentInterpreter; + /** * Constructor * * @param Layout\ScheduledStructure\Helper $helper * @param Layout\Argument\Parser $argumentParser * @param Layout\ReaderPool $readerPool + * @param InterpreterInterface $argumentInterpreter * @param string|null $scopeType */ public function __construct( Layout\ScheduledStructure\Helper $helper, Layout\Argument\Parser $argumentParser, Layout\ReaderPool $readerPool, + InterpreterInterface $argumentInterpreter, $scopeType = null ) { $this->helper = $helper; $this->argumentParser = $argumentParser; $this->readerPool = $readerPool; $this->scopeType = $scopeType; + $this->argumentInterpreter = $argumentInterpreter; } /** @@ -128,6 +137,7 @@ protected function scheduleBlock( $data = $scheduledStructure->getStructureElementData($elementName, []); $data['attributes'] = $this->getAttributes($currentElement); $this->updateScheduledData($currentElement, $data); + $this->evaluateArguments($currentElement, $data); $scheduledStructure->setStructureElementData($elementName, $data); $configPath = (string)$currentElement->getAttribute('ifconfig'); @@ -150,6 +160,7 @@ protected function scheduleReference( $elementName = $currentElement->getAttribute('name'); $data = $scheduledStructure->getStructureElementData($elementName, []); $this->updateScheduledData($currentElement, $data); + $this->evaluateArguments($currentElement, $data); $scheduledStructure->setStructureElementData($elementName, $data); } @@ -258,4 +269,18 @@ protected function parseArguments(Layout\Element $node) } return $result; } + + /** + * Compute argument values + * + * @param Layout\Element $blockElement + * @param array $data + */ + protected function evaluateArguments(Layout\Element $blockElement, array &$data) + { + $arguments = $this->getArguments($blockElement); + foreach ($arguments as $argumentName => $argumentData) { + $data['arguments'][$argumentName] = $this->argumentInterpreter->evaluate($argumentData); + } + } } From 8371dd7763f7d4a0d2d118f3c81b36d9ae13c931 Mon Sep 17 00:00:00 2001 From: Maxim Medinskiy Date: Sun, 8 Feb 2015 13:18:36 +0200 Subject: [PATCH 29/60] MAGETWO-33094: [Dev] Investigate and implement possibility of caching interpreted arguments - fixed tests --- app/code/Magento/Backend/Model/View/Layout/Reader/Block.php | 3 +++ .../Magento/Test/Integrity/Modular/LayoutFilesTest.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Backend/Model/View/Layout/Reader/Block.php b/app/code/Magento/Backend/Model/View/Layout/Reader/Block.php index 8da72955244ce..14884ed18a87a 100644 --- a/app/code/Magento/Backend/Model/View/Layout/Reader/Block.php +++ b/app/code/Magento/Backend/Model/View/Layout/Reader/Block.php @@ -6,6 +6,7 @@ namespace Magento\Backend\Model\View\Layout\Reader; use Magento\Framework\View\Layout; +use Magento\Framework\Data\Argument\InterpreterInterface; /** * Backend block structure reader with ACL support @@ -16,6 +17,7 @@ public function __construct( Layout\ScheduledStructure\Helper $helper, Layout\Argument\Parser $argumentParser, Layout\ReaderPool $readerPool, + InterpreterInterface $argumentInterpreter, $scopeType = null ) { $this->attributes[] = 'acl'; @@ -23,6 +25,7 @@ public function __construct( $helper, $argumentParser, $readerPool, + $argumentInterpreter, $scopeType ); } diff --git a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php index e86d024abf5ad..099d574314f5d 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Integrity/Modular/LayoutFilesTest.php @@ -21,7 +21,7 @@ protected function setUp() { $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); $this->_argParser = $objectManager->get('Magento\Framework\View\Layout\Argument\Parser'); - $this->_argInterpreter = $objectManager->get('layoutArgumentInterpreter'); + $this->_argInterpreter = $objectManager->get('layoutArgumentGeneratorInterpreter'); } /** From 2b3b9c38c395bf0af644141f1dd5a22a1809f84e Mon Sep 17 00:00:00 2001 From: Maxim Medinskiy Date: Sun, 8 Feb 2015 17:11:00 +0200 Subject: [PATCH 30/60] MAGETWO-33094: [Dev] Investigate and implement possibility of caching interpreted arguments --- app/etc/di.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/etc/di.xml b/app/etc/di.xml index 98ed0558986bf..c03f0a265516b 100644 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -286,7 +286,12 @@ + Magento\Framework\View\Layout\Argument\Interpreter\Options + layoutArrayArgumentGeneratorInterpreterProxy + Magento\Framework\Data\Argument\Interpreter\Boolean + Magento\Framework\Data\Argument\Interpreter\Number Magento\Framework\Data\Argument\Interpreter\String + Magento\Framework\Data\Argument\Interpreter\NullType layoutObjectArgumentInterpreter Magento\Framework\View\Layout\Argument\Interpreter\Url Magento\Framework\View\Layout\Argument\Interpreter\HelperMethod @@ -309,6 +314,11 @@ layoutArgumentReaderInterpreterInternal + + + layoutArgumentGeneratorInterpreterInternal + +