Skip to content

Commit

Permalink
rename const with prefix "stub" move Object Manager to separate
Browse files Browse the repository at this point in the history
variable
  • Loading branch information
Nazar65 committed Jan 10, 2020
1 parent 74a244f commit 1748633
Showing 1 changed file with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,9 @@
*/
class UpdateTest extends TestCase
{
/**
* Wishlist item id
*
* @var int
*/
private const ITEM_ID = 1;
private const STUB_ITEM_ID = 1;

/**
* Product qty for wishlist
*
* @var int
*/
private const WISHLIST_PRODUCT_QTY = 21;
private const STUB_WISHLIST_PRODUCT_QTY = 21;

/**
* @var MockObject|Validator $formKeyValidatorMock
Expand Down Expand Up @@ -126,7 +116,9 @@ protected function setUp()
->method('getMessageManager')
->willReturn($this->messageManagerMock);

$this->updateController = (new ObjectManagerHelper($this))->getObject(
$objectManager = new ObjectManagerHelper($this);

$this->updateController = $objectManager->getObject(
Update::class,
[
'context' => $this->contextMock,
Expand Down Expand Up @@ -286,11 +278,11 @@ public function getWishlistDataProvider(): array
[
[
[
'id' => self::ITEM_ID
'id' => self::STUB_ITEM_ID
],
[
'qty' => [self::ITEM_ID => self::WISHLIST_PRODUCT_QTY],
'description' => [self::ITEM_ID => 'Description for item_id 1']
'qty' => [self::STUB_ITEM_ID => self::STUB_WISHLIST_PRODUCT_QTY],
'description' => [self::STUB_ITEM_ID => 'Description for item_id 1']
]
]
];
Expand Down

0 comments on commit 1748633

Please sign in to comment.