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 @@ -268,7 +268,7 @@ public function testGetWithNonExistingProduct()

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

/**
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
* @expectedMessage This product doesn't have tier price
* @expectedExceptionMessage Product hasn't group price with such data: customerGroupId = '1', website = 1, qty = 3
*/
public function testRemoveWhenTierPricesNotExists()
{
Expand All @@ -72,7 +72,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 @@ -83,7 +83,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 @@ -188,7 +188,7 @@ public function testSuccessDeleteTierPrice()

/**
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
* @message Such product doesn't exist
* @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 @@ -94,7 +94,7 @@ public function testCheckQuoteItem()

/**
* @expectedException \Magento\Framework\Exception\LocalizedException
* @exceptedExceptionMessage We can't find the quote item.
* @expectedExceptionMessage We can't find the quote item.
*/
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 Could not add gift message to order:Test message
* @expectedExceptionMessage Could not add gift message to order: "Test message"
*/
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 Could not add gift message to order:Test message
* @expectedExceptionMessage Could not add gift message to order's item: "Test message"
*/
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 Cannot assign customer to the given cart. You don't have permission for this operation.
* @expectedExceptionMessage Cannot assign customer to the given cart. You don't have permission for this operation.
*/
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 @@ -100,7 +100,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 @@ -53,9 +53,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 @@ -41,7 +41,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