Skip to content

Commit abda8a5

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-50846-Unit-Test-Fix' into PR_Branch
2 parents 89e16e7 + 28d65f0 commit abda8a5

File tree

8 files changed

+19
-44
lines changed

8 files changed

+19
-44
lines changed

app/code/Magento/CatalogUrlRewrite/Test/Unit/Observer/AfterImportDataObserverTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ protected function setUp()
299299
* Test for afterImportData()
300300
* Covers afterImportData() + protected methods used inside
301301
*
302-
* @covers \Magento\CatalogUrlRewrite\Observer\AfterImportDataObserver::afterImportData
303302
* @covers \Magento\CatalogUrlRewrite\Observer\AfterImportDataObserver::_populateForUrlGeneration
304303
* @covers \Magento\CatalogUrlRewrite\Observer\AfterImportDataObserver::isGlobalScope
305304
* @covers \Magento\CatalogUrlRewrite\Observer\AfterImportDataObserver::populateGlobalProduct

app/code/Magento/ConfigurableProduct/Test/Unit/Controller/Adminhtml/Product/Initialization/Helper/Plugin/ConfigurableTest.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,27 @@
2121
class ConfigurableTest extends \PHPUnit_Framework_TestCase
2222
{
2323
/**
24-
* @var VariationHandler|MockObject
24+
* @var Magento\ConfigurableProduct\Model\Product\VariationHandler|MockObject
2525
*/
2626
private $variationHandler;
2727

2828
/**
29-
* @var Http|MockObject
29+
* @var Magento\Framework\App\Request\Http|MockObject
3030
*/
3131
private $request;
3232

3333
/**
34-
* @var Factory|MockObject
34+
* @var Magento\ConfigurableProduct\Helper\Product\Options\Factory|MockObject
3535
*/
3636
private $optionFactory;
3737

3838
/**
39-
* @var Product|MockObject
39+
* @var Magento\Catalog\Model\Product|MockObject
4040
*/
4141
private $product;
4242

4343
/**
44-
* @var Helper|MockObject
44+
* @var Magento\Catalog\Controller\Adminhtml\Product\Initialization\Helper|MockObject
4545
*/
4646
private $subject;
4747

@@ -203,9 +203,6 @@ public function testAfterInitializeWithAttributesAndVariations()
203203
$this->plugin->afterInitialize($this->subject, $this->product);
204204
}
205205

206-
/**
207-
* @covers Configurable::afterInitialize
208-
*/
209206
public function testAfterInitializeWithAttributesAndWithoutVariations()
210207
{
211208
$attributes = [
@@ -268,9 +265,6 @@ public function testAfterInitializeWithAttributesAndWithoutVariations()
268265
$this->plugin->afterInitialize($this->subject, $this->product);
269266
}
270267

271-
/**
272-
* @covers Configurable::afterInitialize
273-
*/
274268
public function testAfterInitializeIfAttributesEmpty()
275269
{
276270
$this->product->expects(static::once())
@@ -291,9 +285,6 @@ public function testAfterInitializeIfAttributesEmpty()
291285
$this->plugin->afterInitialize($this->subject, $this->product);
292286
}
293287

294-
/**
295-
* @covers Configurable::afterInitialize
296-
*/
297288
public function testAfterInitializeForNotConfigurableProduct()
298289
{
299290
$this->product->expects(static::once())

app/code/Magento/Marketplace/Test/Unit/Helper/CacheTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected function setUp()
1919
}
2020

2121
/**
22-
* @covers \Magento\Marketplace\Helper::loadPartnersFromCache
22+
* @covers \Magento\Marketplace\Helper\Cache::loadPartnersFromCache
2323
*/
2424
public function testLoadPartnersFromCache()
2525
{
@@ -36,7 +36,7 @@ public function testLoadPartnersFromCache()
3636
}
3737

3838
/**
39-
* @covers \Magento\Marketplace\Helper::savePartnersToCache
39+
* @covers \Magento\Marketplace\Helper\Cache::savePartnersToCache
4040
*/
4141
public function testSavePartnersToCache()
4242
{

dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,13 @@ public function testCoversAnnotation()
598598
{
599599
$files = Files::init();
600600
$errors = [];
601-
foreach ($files->getFiles([BP . '/dev/tests/{integration,unit}'], '*') as $file) {
601+
$filesToTest = $files->getPhpFiles(Files::INCLUDE_TESTS);
602+
603+
if (($key = array_search(__FILE__, $filesToTest)) !== false) {
604+
unset($filesToTest[$key]);
605+
}
606+
607+
foreach ($filesToTest as $file) {
602608
$code = file_get_contents($file);
603609
if (preg_match('/@covers(DefaultClass)?\s+([\w\\\\]+)(::([\w\\\\]+))?/', $code, $matches)) {
604610
if ($this->isNonexistentEntityCovered($matches)) {

lib/internal/Magento/Framework/Setup/Test/Unit/FilePermissionsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ public function getApplicationCurrentNonWritableDirectoriesDataProvider()
133133
}
134134

135135
/**
136-
* @covers \Magento\Framework\FilePermissions::getMissingWritableDirectoriesForInstallation
137-
* @covers \Magento\Framework\FilePermissions::getMissingWritablePathsForInstallation
136+
* @covers \Magento\Framework\Setup\FilePermissions::getMissingWritableDirectoriesForInstallation
137+
* @covers \Magento\Framework\Setup\FilePermissions::getMissingWritablePathsForInstallation
138138
*/
139139
public function testGetMissingWritableDirectoriesAndPathsForInstallation()
140140
{

lib/internal/Magento/Framework/Setup/Test/Unit/SampleData/StateTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function testClearState()
6161
}
6262

6363
/**
64-
* @covers setError()
64+
* @covers \Magento\Framework\Setup\SampleData\State::setError
6565
*/
6666
public function testHasError()
6767
{

setup/src/Magento/Setup/Test/Unit/Controller/MarketplaceTest.php

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ public function setUp()
3535
$this->controller = new Marketplace($this->composerInformation, $this->marketplaceManager);
3636
}
3737

38-
/**
39-
* @covers \Magento\Setup\Controller\Marketplace::saveAuthJsonAction
40-
*/
4138
public function testSaveAuthJsonAction()
4239
{
4340
$this->marketplaceManager
@@ -55,9 +52,6 @@ public function testSaveAuthJsonAction()
5552
$this->assertTrue($variables['success']);
5653
}
5754

58-
/**
59-
* @covers \Magento\Setup\Controller\Marketplace::saveAuthJsonAction
60-
*/
6155
public function testSaveAuthJsonActionWithError()
6256
{
6357
$this->marketplaceManager
@@ -75,9 +69,6 @@ public function testSaveAuthJsonActionWithError()
7569
$this->assertFalse($variables['success']);
7670
}
7771

78-
/**
79-
* @covers \Magento\Setup\Controller\Marketplace::checkAuthAction
80-
*/
8172
public function testCheckAuthAction()
8273
{
8374
$this->marketplaceManager
@@ -95,9 +86,6 @@ public function testCheckAuthAction()
9586
$this->assertTrue($variables['success']);
9687
}
9788

98-
/**
99-
* @covers \Magento\Setup\Controller\Marketplace::checkAuthAction
100-
*/
10189
public function testCheckAuthActionWithError()
10290
{
10391
$this->marketplaceManager
@@ -112,10 +100,7 @@ public function testCheckAuthActionWithError()
112100
$this->assertFalse($variables['success']);
113101
}
114102

115-
/**
116-
* @covers \Magento\Setup\Controller\Marketplace::removeAuthAction
117-
*/
118-
public function testRemoveCredetinalsAction()
103+
public function testRemoveCredentialsAction()
119104
{
120105
$this->marketplaceManager
121106
->expects($this->once())
@@ -129,9 +114,6 @@ public function testRemoveCredetinalsAction()
129114
$this->assertTrue($variables['success']);
130115
}
131116

132-
/**
133-
* @covers \Magento\Setup\Controller\Marketplace::removeAuthAction
134-
*/
135117
public function testRemoveCredentialsWithError()
136118
{
137119
$this->marketplaceManager
@@ -146,9 +128,6 @@ public function testRemoveCredentialsWithError()
146128
$this->assertFalse($variables['success']);
147129
}
148130

149-
/**
150-
* @covers \Magento\Setup\Controller\Marketplace::popupAuthAction
151-
*/
152131
public function testPopupAuthAction()
153132
{
154133
$viewModel = $this->controller->popupAuthAction();

setup/src/Magento/Setup/Test/Unit/Controller/SessionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function setUp()
3535
}
3636

3737
/**
38-
* @covers \Magento\Setup\Controller\Session::testUnloginAction
38+
* @covers \Magento\Setup\Controller\Session::unloginAction
3939
*/
4040
public function testUnloginAction()
4141
{

0 commit comments

Comments
 (0)