Skip to content

Commit

Permalink
Merge pull request #943 from amacgregor/develop
Browse files Browse the repository at this point in the history
Fixed Failed Test due to Class not following the naming conventions (MAGETWO-32697)
  • Loading branch information
maksek committed Jan 14, 2015
2 parents 2748e60 + 3200820 commit 9685d9c
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
*
* @SuppressWarnings(PHPMD.LongVariable)
*/
class Groupprice extends \Magento\Catalog\Model\Product\Attribute\Backend\Groupprice\AbstractGroupprice
class GroupPrice extends \Magento\Catalog\Model\Product\Attribute\Backend\GroupPrice\AbstractGroupPrice
{
/**
* Catalog product attribute backend groupprice
*
* @var \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice
* @var \Magento\Catalog\Model\Resource\Product\Attribute\Backend\GroupPrice
*/
protected $_productAttributeBackendGroupprice;
protected $_productAttributeBackendGroupPrice;

/**
* @param \Magento\Directory\Model\CurrencyFactory $currencyFactory
Expand All @@ -25,7 +25,7 @@ class Groupprice extends \Magento\Catalog\Model\Product\Attribute\Backend\Groupp
* @param \Magento\Framework\App\Config\ScopeConfigInterface $config
* @param \Magento\Catalog\Model\Product\Type $catalogProductType
* @param \Magento\Customer\Api\GroupManagementInterface $groupManagement
* @param \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice $productAttributeBackendGroupprice
* @param \Magento\Catalog\Model\Resource\Product\Attribute\Backend\GroupPrice $productAttributeBackendGroupPrice
*/
public function __construct(
\Magento\Directory\Model\CurrencyFactory $currencyFactory,
Expand All @@ -34,9 +34,9 @@ public function __construct(
\Magento\Framework\App\Config\ScopeConfigInterface $config,
\Magento\Catalog\Model\Product\Type $catalogProductType,
\Magento\Customer\Api\GroupManagementInterface $groupManagement,
\Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice $productAttributeBackendGroupprice
\Magento\Catalog\Model\Resource\Product\Attribute\Backend\GroupPrice $productAttributeBackendGroupPrice
) {
$this->_productAttributeBackendGroupprice = $productAttributeBackendGroupprice;
$this->_productAttributeBackendGroupPrice = $productAttributeBackendGroupPrice;
parent::__construct(
$currencyFactory,
$storeManager,
Expand All @@ -50,11 +50,11 @@ public function __construct(
/**
* Retrieve resource instance
*
* @return \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice
* @return \Magento\Catalog\Model\Resource\Product\Attribute\Backend\GroupPrice
*/
protected function _getResource()
{
return $this->_productAttributeBackendGroupprice;
return $this->_productAttributeBackendGroupPrice;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
/**
* @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
*/
namespace Magento\Catalog\Model\Product\Attribute\Backend\Groupprice;
namespace Magento\Catalog\Model\Product\Attribute\Backend\GroupPrice;

use Magento\Catalog\Model\Product\Attribute\Backend\Price;
use Magento\Customer\Api\GroupManagementInterface;

/**
* Catalog product abstract group price backend attribute model
*/
abstract class AbstractGroupprice extends Price
abstract class AbstractGroupPrice extends Price
{
/**
* Website currency codes and rates
Expand Down Expand Up @@ -99,7 +99,7 @@ protected function _getWebsiteCurrencyRates()
/**
* Retrieve resource instance
*
* @return \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice
* @return \Magento\Catalog\Model\Resource\Product\Attribute\Backend\GroupPrice
*/
abstract protected function _getResource();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
namespace Magento\Catalog\Model\Product\Attribute\Backend;

class Tierprice extends \Magento\Catalog\Model\Product\Attribute\Backend\Groupprice\AbstractGroupprice
class Tierprice extends \Magento\Catalog\Model\Product\Attribute\Backend\GroupPrice\AbstractGroupPrice
{
/**
* Catalog product attribute backend tierprice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
*/
namespace Magento\Catalog\Model\Resource\Product\Attribute\Backend;

use Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice\AbstractGroupprice;
use Magento\Catalog\Model\Resource\Product\Attribute\Backend\GroupPrice\AbstractGroupPrice;

/**
* Catalog product group price backend attribute model
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Groupprice extends AbstractGroupprice
class GroupPrice extends AbstractGroupPrice
{
/**
* Initialize connection and define main table
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice;
namespace Magento\Catalog\Model\Resource\Product\Attribute\Backend\GroupPrice;

abstract class AbstractGroupprice extends \Magento\Framework\Model\Resource\Db\AbstractDb
abstract class AbstractGroupPrice extends \Magento\Framework\Model\Resource\Db\AbstractDb
{
/**
* Load Tier Prices for product
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
*/
namespace Magento\Catalog\Model\Resource\Product\Attribute\Backend;

use Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice\AbstractGroupprice;
use Magento\Catalog\Model\Resource\Product\Attribute\Backend\GroupPrice\AbstractGroupPrice;

/**
* Catalog product tier price backend attribute model
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class Tierprice extends AbstractGroupprice
class Tierprice extends AbstractGroupPrice
{
/**
* Initialize connection and define main table
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Model/Resource/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ public function getDefaultEntities()
'type' => 'decimal',
'label' => 'Group Price',
'input' => 'text',
'backend' => 'Magento\Catalog\Model\Product\Attribute\Backend\Groupprice',
'backend' => 'Magento\Catalog\Model\Product\Attribute\Backend\GroupPrice',
'required' => false,
'sort_order' => 2,
'global' => \Magento\Catalog\Model\Resource\Eav\Attribute::SCOPE_WEBSITE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class GroupPriceTest extends \PHPUnit_Framework_TestCase
protected $attributeMock;

/**
* @var \Magento\Catalog\Model\Product\Attribute\Backend\Groupprice|\PHPUnit_Framework_MockObject_MockObject
* @var \Magento\Catalog\Model\Product\Attribute\Backend\GroupPrice|\PHPUnit_Framework_MockObject_MockObject
*/
protected $backendMock;

Expand Down Expand Up @@ -109,7 +109,7 @@ public function setUp()
false
);
$this->backendMock = $this->getMock(
'Magento\Catalog\Model\Product\Attribute\Backend\Groupprice',
'Magento\Catalog\Model\Product\Attribute\Backend\GroupPrice',
[],
[],
'',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
/**
* @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
*/
namespace Magento\Catalog\Model\Product\Attribute\Backend\Groupprice;
namespace Magento\Catalog\Model\Product\Attribute\Backend\GroupPrice;

class AbstractTest extends \PHPUnit_Framework_TestCase
{
/**
* @var \Magento\Catalog\Model\Resource\Product\Attribute\Backend\Groupprice\AbstractGroupprice
* @var \Magento\Catalog\Model\Resource\Product\Attribute\Backend\GroupPrice\AbstractGroupPrice
*/
protected $_model;

Expand All @@ -30,7 +30,7 @@ protected function setUp()
$groupManagement = $this->getMock('Magento\Customer\Api\GroupManagementInterface', [], [], '', false);

$this->_model = $this->getMockForAbstractClass(
'Magento\Catalog\Model\Product\Attribute\Backend\Groupprice\AbstractGroupprice',
'Magento\Catalog\Model\Product\Attribute\Backend\GroupPrice\AbstractGroupPrice',
[
'currencyFactory' => $currencyFactoryMock,
'storeManager' => $storeManagerMock,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class GroupPriceTest extends \PHPUnit_Framework_TestCase
protected $attributeMock;

/**
* @var \Magento\Catalog\Model\Product\Attribute\Backend\Groupprice|\PHPUnit_Framework_MockObject_MockObject
* @var \Magento\Catalog\Model\Product\Attribute\Backend\GroupPrice|\PHPUnit_Framework_MockObject_MockObject
*/
protected $backendMock;

Expand Down Expand Up @@ -103,7 +103,7 @@ public function setUp()
false
);
$this->backendMock = $this->getMock(
'Magento\Catalog\Model\Product\Attribute\Backend\Groupprice',
'Magento\Catalog\Model\Product\Attribute\Backend\GroupPrice',
[],
[],
'',
Expand Down

0 comments on commit 9685d9c

Please sign in to comment.