Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -266,7 +266,7 @@ public function testGetWithNonExistingProduct()

/**
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
* @expectedExceptionText The image doesn't exist. Verify and try again.
* @expectedExceptionMessage The image doesn't exist. Verify and try again.
*/
public function testGetWithNonExistingImage()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected function setUp()

/**
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
* @expectedMessage Tier price is unavailable for this product.
* @expectedExceptionMessage Product hasn't group price with such data: customerGroupId = '1', website = 1, qty = 3
*/
public function testRemoveWhenTierPricesNotExists()
{
Expand All @@ -70,7 +70,7 @@ public function testRemoveWhenTierPricesNotExists()

/**
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
* @expectedMessage For current customerGroupId = '10' with 'qty' = 15 any tier price exist'.
* @expectedExceptionMessage Product hasn't group price with such data: customerGroupId = '10', website = 1, qty = 5
*/
public function testRemoveTierPriceForNonExistingCustomerGroup()
{
Expand All @@ -81,7 +81,7 @@ public function testRemoveTierPriceForNonExistingCustomerGroup()
->will($this->returnValue($this->prices));
$this->productMock->expects($this->never())->method('setData');
$this->productRepositoryMock->expects($this->never())->method('save');
$this->priceModifier->removeTierPrice($this->productMock, 10, 15, 1);
$this->priceModifier->removeTierPrice($this->productMock, 10, 5, 1);
}

public function testSuccessfullyRemoveTierPriceSpecifiedForAllGroups()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function testSuccessDeleteTierPrice()

/**
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
* @message The product doesn't exist. Verify and try again.
* @expectedExceptionMessage No such entity.
*/
public function testDeleteTierPriceFromNonExistingProduct()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Checkout/Test/Unit/Model/SidebarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function testCheckQuoteItem()

/**
* @expectedException \Magento\Framework\Exception\LocalizedException
* @exceptedExceptionMessage The quote item isn't found. Verify the item and try again.
* @expectedExceptionMessage The quote item isn't found. Verify the item and try again.
*/
public function testCheckQuoteItemWithException()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function testSetResourceInvalidPath()

/**
* @expectedException \Magento\Framework\Exception\LocalizedException
* @exectedExceptionMessage Please set resource file and link type.
* @expectedExceptionMessage Please set resource file and link type.
*/
public function testGetFileSizeNoResource()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function testAfterSaveGiftMessages()

/**
* @expectedException \Magento\Framework\Exception\CouldNotSaveException
* @expectedMessage The gift message couldn't be added to the "Test message" order.
* @expectedExceptionMessage The gift message couldn't be added to the "Test message" order.
*/
public function testAfterSaveIfGiftMessagesNotExist()
{
Expand All @@ -146,7 +146,7 @@ public function testAfterSaveIfGiftMessagesNotExist()
$this->giftMessageOrderRepositoryMock
->expects($this->once())
->method('save')
->willThrowException(new \Exception('TestMessage'));
->willThrowException(new \Exception('Test message'));

// save Gift Messages on item level
$this->orderMock->expects($this->never())->method('getItems');
Expand All @@ -155,7 +155,7 @@ public function testAfterSaveIfGiftMessagesNotExist()

/**
* @expectedException \Magento\Framework\Exception\CouldNotSaveException
* @expectedMessage The gift message couldn't be added to the "Test message" order.
* @expectedExceptionMessage The gift message couldn't be added to the "Test message" order item.
*/
public function testAfterSaveIfItemGiftMessagesNotExist()
{
Expand Down Expand Up @@ -185,7 +185,7 @@ public function testAfterSaveIfItemGiftMessagesNotExist()
$this->giftMessageOrderItemRepositoryMock
->expects($this->once())->method('save')
->with($orderId, $orderItemId, $this->giftMessageMock)
->willThrowException(new \Exception('TestMessage'));
->willThrowException(new \Exception('Test message'));
$this->plugin->afterSave($this->orderRepositoryMock, $this->orderMock);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function setUp()

/**
* @expectedException \Magento\Framework\Exception\StateException
* @expectedMessage You don't have the correct permissions to assign the customer to the cart.
* @expectedExceptionMessage You don't have the correct permissions to assign the customer to the cart.
*/
public function testBeforeAssignCustomer()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function setUp()

/**
* @expectedException \InvalidArgumentException
* @ExceptedExceptionMessage The qty value is required to update quote item.
* @expectedExceptionMessage The qty value is required to update quote item.
*/
public function testUpdateNoQty()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected function setUp()

/**
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
* @expected ExceptionMessage error345
* @expectedExceptionMessage error345
*/
public function testSetAddressValidationFailed()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function testSaveCreate()

/**
* @expectedException \Magento\Search\Model\Synonym\MergeConflictException
* @expecteExceptionMessage (c,d,e)
* @expectedExceptionMessage Merge conflict with existing synonym group(s): (a,b,c)
*/
public function testSaveCreateMergeConflict()
{
Expand Down Expand Up @@ -138,7 +138,7 @@ public function testSaveUpdate()

/**
* @expectedException \Magento\Search\Model\Synonym\MergeConflictException
* @expecteExceptionMessage (d,h,i)
* @expectedExceptionMessage (d,h,i)
*/
public function testSaveUpdateMergeConflict()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
class ThemeTest extends \PHPUnit\Framework\TestCase
{
/**
* @true
* @return void
* @covers \Magento\Theme\Model\Theme\Source\Theme::__construct
* @covers \Magento\Theme\Model\Theme\Source\Theme::getAllOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public function testNotApplyFilterModifier()

/**
* @return void
* @assertException \Magento\Framework\Exception\LocalizedException
* @expectedException \Magento\Framework\Exception\LocalizedException
* @expectedExceptionMessage Condition type "not_allowed" is not allowed
*/
public function testApplyFilterModifierWithNotAllowedCondition()
{
Expand All @@ -78,7 +79,7 @@ public function testApplyFilterModifierWithNotAllowedCondition()
]
]);
$this->dataProvider->expects($this->never())->method('addFilter');
$this->unit->applyFilterModifier($this->dataProvider, 'test');
$this->unit->applyFilterModifier($this->dataProvider, 'filter');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public function testHandlerException($errorNo, $errorPhrase)
$errorFile = 'test_file';
$errorLine = 'test_error_line';

$exceptedExceptionMessage = sprintf('%s: %s in %s on line %s', $errorPhrase, $errorStr, $errorFile, $errorLine);
$expectedExceptionMessage = sprintf('%s: %s in %s on line %s', $errorPhrase, $errorStr, $errorFile, $errorLine);
$this->expectException('Exception');
$this->expectExceptionMessage($exceptedExceptionMessage);
$this->expectExceptionMessage($expectedExceptionMessage);

$this->object->handler($errorNo, $errorStr, $errorFile, $errorLine);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function testCreateIfContentDoesntHaveRequiredKeys()

/**
* @expectedException \Exception
* @exceptedExceptionMessage File not found
* @expectedExceptionMessage File not found
*/
public function testCreateIfFileNotExist()
{
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/App/Test/Unit/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function testGetLayout()

/**
* @expectedException \RuntimeException
* @exceptedExceptionMessage 'Layout must be loaded only once.'
* @expectedExceptionMessage Layout must be loaded only once.
*/
public function testLoadLayoutWhenLayoutAlreadyLoaded()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public function fetchDataProvider()

/**
* @expectedException \InvalidArgumentException
* @expectedMessage Timer "foo" doesn't exist.
* @expectedExceptionMessage Timer "foo" doesn't exist.
*/
public function testFetchInvalidTimer()
{
Expand All @@ -404,7 +404,7 @@ public function testFetchInvalidTimer()

/**
* @expectedException \InvalidArgumentException
* @expectedMessage Timer "foo" doesn't have value for "bar".
* @expectedExceptionMessage Timer "foo" doesn't have value for "bar".
*/
public function testFetchInvalidKey()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected function setUp()
* @param array $jsFiles
* @param array $phpMap
* @param array $jsMap
* @paran array $phraseFactoryMap
* @param array $phraseFactoryMap
* @param array $expectedResult
* @dataProvider addPhraseDataProvider
*/
Expand Down