Skip to content

Fix a misspelled parameter name in TaxTest #13189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Jan 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
04b14cb
Fix a typo in method name
akiojalehto Jan 15, 2018
842c64d
Keep misspelled method and deprecate it to ensure backwards compatibi…
akiojalehto Jan 15, 2018
d80aedd
Fix a typo in variable name
akiojalehto Jan 15, 2018
56ac93b
Fix a typo in variable name
akiojalehto Jan 15, 2018
7c6c776
Fix a typo in method name
akiojalehto Jan 15, 2018
bc6ca38
Fix a typo in property name
akiojalehto Jan 15, 2018
3e74de2
Fix a typo in constant name
akiojalehto Jan 15, 2018
3b774df
Keep misspelled constant and deprecate it to ensure compatibility
akiojalehto Jan 15, 2018
5aeaeef
Fix a typo in method name
akiojalehto Jan 16, 2018
d8a6e32
Fix a typo in parameter name
akiojalehto Jan 15, 2018
3636039
Fix a typo in variable name
akiojalehto Jan 15, 2018
1d1a1b6
Fix a typo in method name
akiojalehto Jan 15, 2018
5a8c1c5
Fix a typo in variable name
akiojalehto Jan 16, 2018
a8d7f37
Fix a typo in method name
akiojalehto Jan 16, 2018
cde6f18
Fix a typo in variable name
akiojalehto Jan 16, 2018
1684f07
Fix a typo in variable name
akiojalehto Jan 16, 2018
e1055d0
Add correct method name to @see instead of description of @deprecated
akiojalehto Jan 16, 2018
3d5d541
Fix a typo in variable name
akiojalehto Jan 16, 2018
43f157e
Merge pull reqeust https://github.com/magento/magento2/pull/13190 int…
Jan 17, 2018
48dc796
Merge pull reqeust https://github.com/magento/magento2/pull/13192 int…
Jan 17, 2018
2ab7855
Merge pull reqeust https://github.com/magento/magento2/pull/13193 int…
Jan 17, 2018
dec7cb7
Merge pull reqeust https://github.com/magento/magento2/pull/13194 int…
Jan 17, 2018
eee06c2
Merge pull reqeust https://github.com/magento/magento2/pull/13195 int…
Jan 17, 2018
756a314
Merge pull reqeust https://github.com/magento/magento2/pull/13196 int…
Jan 17, 2018
15d5679
Merge pull request https://github.com/magento/magento2/pull/13197 int…
Jan 17, 2018
993500a
Merge pull request https://github.com/magento/magento2/pull/13198 int…
Jan 17, 2018
d037d0d
Merge pull request https://github.com/magento/magento2/pull/13199 int…
Jan 17, 2018
d96b1a3
Merge pull request https://github.com/magento/magento2/pull/13200 int…
Jan 17, 2018
43b4e52
Merge pull request https://github.com/magento/magento2/pull/13202 int…
Jan 17, 2018
44c0e9b
Merge pull request https://github.com/magento/magento2/pull/13201 int…
Jan 17, 2018
07a188d
Merge pull request https://github.com/magento/magento2/pull/13203 int…
Jan 17, 2018
1b569cb
Merge pull request https://github.com/magento/magento2/pull/13204 int…
Jan 17, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function testGetMenuWithCachedObjectReturnsUnserializedObject()
$this->assertEquals($this->menuMock, $this->model->getMenu());
}

public function testGetMenuWithNotCachedObjectBuidlsObject()
public function testGetMenuWithNotCachedObjectBuildsObject()
{
$this->cacheInstanceMock->expects(
$this->at(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function testHandleNotOrderPayment()
static::assertFalse($voidHandler->handle($subject));
}

public function testHandleSomeAmoutWasPaid()
public function testHandleSomeAmountWasPaid()
{
$paymentDO = $this->createMock(PaymentDataObjectInterface::class);
$subject = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@ public function testGetItemsEmptyCollection()
*/
public function testGetItemsWithLimit()
{
$transations = range(1, TransactionsCollection::TRANSACTION_MAXIMUM_COUNT + 10);
$transactions = range(1, TransactionsCollection::TRANSACTION_MAXIMUM_COUNT + 10);

$this->filterMapperMock->expects($this->once())
->method('getFilter')
->willReturn(new BraintreeSearchNodeStub());

$this->braintreeAdapterMock->expects($this->once())
->method('search')
->willReturn($transations);
->willReturn($transactions);

$this->entityFactoryMock->expects($this->exactly(TransactionsCollection::TRANSACTION_MAXIMUM_COUNT))
->method('create')
Expand All @@ -157,15 +157,15 @@ public function testGetItemsWithLimit()
*/
public function testGetItemsWithNullLimit()
{
$transations = range(1, TransactionsCollection::TRANSACTION_MAXIMUM_COUNT + 10);
$transactions = range(1, TransactionsCollection::TRANSACTION_MAXIMUM_COUNT + 10);

$this->filterMapperMock->expects($this->once())
->method('getFilter')
->willReturn(new BraintreeSearchNodeStub());

$this->braintreeAdapterMock->expects($this->once())
->method('search')
->willReturn($transations);
->willReturn($transactions);

$this->entityFactoryMock->expects($this->exactly(TransactionsCollection::TRANSACTION_MAXIMUM_COUNT))
->method('create')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ public function testPrepareForCartAdvancedParentClassReturnString()
/**
* @return void
*/
public function testPrepareForCartAdvancedAllrequiredOption()
public function testPrepareForCartAdvancedAllRequiredOption()
{
/** @var \PHPUnit_Framework_MockObject_MockObject|DefaultType $group */
$group = $this->getMockBuilder(\Magento\Catalog\Model\Product\Option\Type\DefaultType::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public function execute($entityType, $entity)
$linkedProduct = $this->productRepository->get($entity->getLinkedProductSku());
$product = $this->productRepository->get($entity->getSku());
$linkTypesToId = $this->linkTypeProvider->getLinkTypes();
$prodyctHydrator = $this->metadataPool->getHydrator(ProductInterface::class);
$productData = $prodyctHydrator->extract($product);
$productHydrator = $this->metadataPool->getHydrator(ProductInterface::class);
$productData = $productHydrator->extract($product);
$linkId = $this->linkResource->getProductLinkId(
$productData[$this->metadataPool->getMetadata(ProductInterface::class)->getLinkField()],
$linkedProduct->getId(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ public function execute($entityType, $entity)

try {
$linkTypesToId = $this->linkTypeProvider->getLinkTypes();
$prodyctHydrator = $this->metadataPool->getHydrator(ProductInterface::class);
$productData = $prodyctHydrator->extract($product);
$productHydrator = $this->metadataPool->getHydrator(ProductInterface::class);
$productData = $productHydrator->extract($product);
$this->linkResource->saveProductLinks(
$productData[$this->metadataPool->getMetadata(ProductInterface::class)->getLinkField()],
$links,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ protected function tearDown()
public function testGetIdentities()
{
$categoryTag = ['catalog_category_1'];
$currentCatogoryMock = $this->createMock(\Magento\Catalog\Model\Category::class);
$currentCatogoryMock->expects($this->once())->method('getIdentities')->will($this->returnValue($categoryTag));
$this->block->setCurrentCategory($currentCatogoryMock);
$currentCategoryMock = $this->createMock(\Magento\Catalog\Model\Category::class);
$currentCategoryMock->expects($this->once())->method('getIdentities')->will($this->returnValue($categoryTag));
$this->block->setCurrentCategory($currentCategoryMock);
$this->assertEquals($categoryTag, $this->block->getIdentities());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function testExecuteWithGenericException()
$layoutMock->expects($this->once())
->method('getMessagesBlock')
->willReturn($messageBlock);
$wysiwigConfig = $this->getMockBuilder(\Magento\Cms\Model\Wysiwyg\Config::class)
$wysiwygConfig = $this->getMockBuilder(\Magento\Cms\Model\Wysiwyg\Config::class)
->disableOriginalConstructor()
->getMock();
$registry = $this->getMockBuilder(Registry::class)
Expand All @@ -135,7 +135,7 @@ public function testExecuteWithGenericException()
$this->objectManager->expects($this->any())
->method('get')
->withConsecutive([Registry::class], [Registry::class], [\Magento\Cms\Model\Wysiwyg\Config::class])
->willReturnMap([[Registry::class, $registry], [\Magento\Cms\Model\Wysiwyg\Config::class, $wysiwigConfig]]);
->willReturnMap([[Registry::class, $registry], [\Magento\Cms\Model\Wysiwyg\Config::class, $wysiwygConfig]]);
$categoryMock->expects($this->once())
->method('move')
->willThrowException(new \Exception(
Expand Down Expand Up @@ -189,7 +189,7 @@ public function testExecuteWithLocaliedException()
$layoutMock->expects($this->once())
->method('getMessagesBlock')
->willReturn($messageBlock);
$wysiwigConfig = $this->getMockBuilder(\Magento\Cms\Model\Wysiwyg\Config::class)
$wysiwygConfig = $this->getMockBuilder(\Magento\Cms\Model\Wysiwyg\Config::class)
->disableOriginalConstructor()
->getMock();
$registry = $this->getMockBuilder(Registry::class)
Expand All @@ -209,7 +209,7 @@ public function testExecuteWithLocaliedException()
$this->objectManager->expects($this->any())
->method('get')
->withConsecutive([Registry::class], [Registry::class], [\Magento\Cms\Model\Wysiwyg\Config::class])
->willReturnMap([[Registry::class, $registry], [\Magento\Cms\Model\Wysiwyg\Config::class, $wysiwigConfig]]);
->willReturnMap([[Registry::class, $registry], [\Magento\Cms\Model\Wysiwyg\Config::class, $wysiwygConfig]]);
$this->messageManager->expects($this->once())
->method('addExceptionMessage');
$this->messageManager->expects($this->once())
Expand Down Expand Up @@ -261,7 +261,7 @@ public function testSuccessfullCategorySave()
$layoutMock->expects($this->once())
->method('getMessagesBlock')
->willReturn($messageBlock);
$wysiwigConfig = $this->getMockBuilder(\Magento\Cms\Model\Wysiwyg\Config::class)
$wysiwygConfig = $this->getMockBuilder(\Magento\Cms\Model\Wysiwyg\Config::class)
->disableOriginalConstructor()
->getMock();
$registry = $this->getMockBuilder(Registry::class)
Expand All @@ -281,7 +281,7 @@ public function testSuccessfullCategorySave()
$this->objectManager->expects($this->any())
->method('get')
->withConsecutive([Registry::class], [Registry::class], [\Magento\Cms\Model\Wysiwyg\Config::class])
->willReturnMap([[Registry::class, $registry], [\Magento\Cms\Model\Wysiwyg\Config::class, $wysiwigConfig]]);
->willReturnMap([[Registry::class, $registry], [\Magento\Cms\Model\Wysiwyg\Config::class, $wysiwygConfig]]);
$this->messageManager->expects($this->once())
->method('getMessages')
->with(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,18 @@ public function testGetSectionData()
->expects($this->once())
->method('create')
->willReturn($filterMock);
$searchCritera = $this->createMock(SearchCriteria::class);
$searchCriteria = $this->createMock(SearchCriteria::class);
$this->searchCriteriaBuilderMock
->expects($this->once())
->method('addFilters')
->with([$filterMock])
->willReturnSelf();
$this->searchCriteriaBuilderMock->expects($this->once())
->method('create')
->willReturn($searchCritera);
->willReturn($searchCriteria);
$this->productRenderRepositoryMock->expects($this->once())
->method('getList')
->with($searchCritera, 3, 'UAH')
->with($searchCriteria, 3, 'UAH')
->willReturn($searchResult);
$searchResult->expects($this->any())
->method('getItems')
Expand Down
4 changes: 4 additions & 0 deletions app/code/Magento/Config/Model/Config/Backend/Admin/Custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ class Custom extends \Magento\Framework\App\Config\Value
const XML_PATH_ADMIN_SECURITY_USEFORMKEY = 'admin/security/use_form_key';
const XML_PATH_MAINTENANCE_MODE = 'maintenance_mode';
const XML_PATH_WEB_COOKIE_COOKIE_LIFETIME = 'web/cookie/cookie_lifetime';
/**
* @deprecated Misspelled constant - use XML_PATH_WEB_COOKIE_COOKIE_PATH instead
*/
const XML_PATH_WEB_COOKIE_COOKE_PATH = 'web/cookie/cookie_path';
const XML_PATH_WEB_COOKIE_COOKIE_PATH = 'web/cookie/cookie_path';
const XML_PATH_WEB_COOKIE_COOKIE_DOMAIN = 'web/cookie/cookie_domain';
const XML_PATH_WEB_COOKIE_HTTPONLY = 'web/cookie/cookie_httponly';
const XML_PATH_WEB_COOKIE_RESTRICTION = 'web/cookie/cookie_restriction';
Expand Down
11 changes: 10 additions & 1 deletion app/code/Magento/GiftMessage/Block/Message/Inline.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,22 @@ public function countItems()
return count($this->getItems());
}

/**
* @deprecated Misspelled method
* @see getItemsHasMessages
*/
public function getItemsHasMesssages()
{
return $this->getItemsHasMessages();
}

/**
* Check if items has messages
*
* @return bool
* @SuppressWarnings(PHPMD.BooleanGetMethodName)
*/
public function getItemsHasMesssages()
public function getItemsHasMessages()
{
foreach ($this->getItems() as $item) {
if ($item->getGiftMessageId()) {
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Weee/Test/Unit/Model/TaxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,17 +251,17 @@ public function testGetProductWeeeAttributes($weeeTaxCalculationsByEntity, $expe
* Test getWeeeAmountExclTax method
*
* @param string $productTypeId
* @param string $prodcuctPriceType
* @param string $productPriceType
* @dataProvider getWeeeAmountExclTaxDataProvider
*/
public function testGetWeeeAmountExclTax($productTypeId, $prodcuctPriceType)
public function testGetWeeeAmountExclTax($productTypeId, $productPriceType)
{
$product = $this->getMockBuilder(\Magento\Catalog\Model\Product::class)
->disableOriginalConstructor()
->setMethods(['getTypeId', 'getPriceType'])
->getMock();
$product->expects($this->any())->method('getTypeId')->willReturn($productTypeId);
$product->expects($this->any())->method('getPriceType')->willReturn($prodcuctPriceType);
$product->expects($this->any())->method('getPriceType')->willReturn($productPriceType);
$weeeDataHelper = $this->getMockBuilder(\Magento\Framework\DataObject::class)
->disableOriginalConstructor()
->setMethods(['getAmountExclTax'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(
CookieMetadataFactory $cookieMetadataFactory
) {
$this->cookieManager = $cookieManager;
$this->cookieMetadataFacory = $cookieMetadataFactory;
$this->cookieMetadataFactory = $cookieMetadataFactory;
$this->_response = $context->getResponse();
$this->request = $context->getRequest();
}
Expand All @@ -52,7 +52,7 @@ public function __construct(
*/
protected function getCookieMetadataFactory()
{
return $this->cookieMetadataFacory;
return $this->cookieMetadataFactory;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/internal/Magento/Framework/App/Response/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ public function sendVary()
{
$varyString = $this->context->getVaryString();
if ($varyString) {
$sensitiveCookMetadata = $this->cookieMetadataFactory->createSensitiveCookieMetadata()->setPath('/');
$this->cookieManager->setSensitiveCookie(self::COOKIE_VARY_STRING, $varyString, $sensitiveCookMetadata);
$sensitiveCookieMetadata = $this->cookieMetadataFactory->createSensitiveCookieMetadata()->setPath('/');
$this->cookieManager->setSensitiveCookie(self::COOKIE_VARY_STRING, $varyString, $sensitiveCookieMetadata);
} elseif ($this->request->get(self::COOKIE_VARY_STRING)) {
$cookieMetadata = $this->cookieMetadataFactory->createSensitiveCookieMetadata()->setPath('/');
$this->cookieManager->deleteCookie(self::COOKIE_VARY_STRING, $cookieMetadata);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function testExecuteDevelopernMode()
->method('getModeObject')
->will($this->returnValue($modeObjectMock));

$statusObject = $this->getStatucObjectMock(['add']);
$statusObject = $this->getStatusObjectMock(['add']);
$statusObject
->expects($this->exactly(3))
->method('add');
Expand Down Expand Up @@ -124,7 +124,7 @@ public function testExecuteWithException()
->method('getModeObject')
->will($this->returnValue($modeObjectMock));

$statusObject = $this->getStatucObjectMock(['toggleUpdateError']);
$statusObject = $this->getStatusObjectMock(['toggleUpdateError']);
$statusObject
->expects($this->once())
->method('toggleUpdateError');
Expand Down Expand Up @@ -161,7 +161,7 @@ protected function getFilesystemObjectMock($methods = null)
*
* @return \PHPUnit_Framework_MockObject_MockObject|\Magento\Setup\Model\Cron\Status
*/
protected function getStatucObjectMock($methods = null)
protected function getStatusObjectMock($methods = null)
{
return $this->createPartialMock(\Magento\Setup\Model\Cron\Status::class, $methods);
}
Expand Down