Skip to content

Commit 71a9169

Browse files
Merge remote-tracking branch 'origin/AC-15108-NegotiableQuote' into Arrows-AC-14808-v1
2 parents ce13ee8 + 2fed0f3 commit 71a9169

File tree

6 files changed

+244
-18
lines changed

6 files changed

+244
-18
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
/**
3+
* Copyright 2016 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Backend\Test\Unit\Helper;
9+
10+
use Magento\Backend\Model\Session\Quote;
11+
12+
/**
13+
* Test helper for Session\Quote
14+
*
15+
* This helper extends the concrete Session\Quote class to provide
16+
* test-specific functionality without dependency injection issues.
17+
*/
18+
class SessionQuoteTestHelper extends Quote
19+
{
20+
/**
21+
* Constructor that skips parent initialization
22+
*/
23+
public function __construct()
24+
{
25+
// Skip parent constructor to avoid dependency injection issues
26+
}
27+
28+
/**
29+
* Get store ID
30+
*
31+
* @return int
32+
*/
33+
public function getStoreId()
34+
{
35+
return 1;
36+
}
37+
}
38+

app/code/Magento/Backend/Test/Unit/Helper/SessionTestHelper.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
namespace Magento\Backend\Test\Unit\Helper;
99

10-
use Magento\Backend\Model\Auth\Session;
10+
use Magento\Backend\Model\Session;
1111
use Magento\Framework\DataObject;
1212
use Magento\Framework\Session\Test\Unit\Helper\StorageTestHelper;
1313
use Magento\User\Model\User;
@@ -165,4 +165,15 @@ public function setIsLoggedIn($value)
165165
$this->isLoggedIn = $value;
166166
return $this;
167167
}
168+
169+
/**
170+
* Set URL notice flag
171+
*
172+
* @param bool $flag
173+
* @return $this
174+
*/
175+
public function setIsUrlNotice($flag)
176+
{
177+
return $this;
178+
}
168179
}

app/code/Magento/Quote/Test/Unit/Helper/CartExtensionTestHelper.php

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77

88
namespace Magento\Quote\Test\Unit\Helper;
99

10-
use Magento\Quote\Api\Data\CartExtensionInterface;
10+
use Magento\Quote\Api\Data\CartExtension;
11+
use Magento\NegotiableQuote\Api\Data\NegotiableQuoteInterface;
1112

1213
/**
13-
* Test helper that implements CartExtensionInterface
14+
* Test helper for CartExtension
1415
*
15-
* Provides stub implementations for all extension attribute methods
16+
* This helper extends the concrete CartExtension class to provide
17+
* test-specific functionality without dependency injection issues.
1618
*/
17-
class CartExtensionTestHelper implements CartExtensionInterface
19+
class CartExtensionTestHelper extends CartExtension
1820
{
1921
/**
20-
* @var \Magento\NegotiableQuote\Api\Data\NegotiableQuoteInterface|null
22+
* @var NegotiableQuoteInterface
2123
*/
2224
private $negotiableQuote;
2325

@@ -26,16 +28,6 @@ class CartExtensionTestHelper implements CartExtensionInterface
2628
*/
2729
private $couponCodes;
2830

29-
/**
30-
* @var array
31-
*/
32-
private $shippingAssignments = [];
33-
34-
/**
35-
* @var int|null
36-
*/
37-
private $companyId;
38-
3931
/**
4032
* @var mixed
4133
*/
@@ -54,7 +46,7 @@ public function __construct($negotiableQuote = null)
5446
/**
5547
* Get negotiable quote
5648
*
57-
* @return \Magento\NegotiableQuote\Api\Data\NegotiableQuoteInterface|null
49+
* @return NegotiableQuoteInterface|null
5850
*/
5951
public function getNegotiableQuote()
6052
{
@@ -64,7 +56,7 @@ public function getNegotiableQuote()
6456
/**
6557
* Set negotiable quote
6658
*
67-
* @param \Magento\NegotiableQuote\Api\Data\NegotiableQuoteInterface|null $negotiableQuote
59+
* @param NegotiableQuoteInterface $negotiableQuote
6860
* @return $this
6961
*/
7062
public function setNegotiableQuote($negotiableQuote)
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?php
2+
/**
3+
* Copyright 2016 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Quote\Test\Unit\Helper;
9+
10+
use Magento\Quote\Model\Quote;
11+
12+
/**
13+
* Test helper for Quote
14+
*
15+
* This helper extends the concrete Quote class to provide
16+
* test-specific functionality without dependency injection issues.
17+
*/
18+
class QuoteTestHelper extends Quote
19+
{
20+
/**
21+
* @var array
22+
*/
23+
private $visibleItems = [];
24+
25+
/**
26+
* Constructor that skips parent initialization
27+
*/
28+
public function __construct()
29+
{
30+
// Skip parent constructor to avoid dependency injection issues
31+
}
32+
33+
/**
34+
* Set super mode
35+
*
36+
* @param mixed $value
37+
* @return $this
38+
*/
39+
public function setIsSuperMode($value)
40+
{
41+
return $this;
42+
}
43+
44+
/**
45+
* Get all visible items
46+
*
47+
* @return array
48+
*/
49+
public function getAllVisibleItems()
50+
{
51+
return $this->visibleItems;
52+
}
53+
54+
/**
55+
* Set visible items
56+
*
57+
* @param array $items
58+
* @return $this
59+
*/
60+
public function setVisibleItems($items)
61+
{
62+
$this->visibleItems = $items;
63+
return $this;
64+
}
65+
}
66+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?php
2+
/**
3+
* Copyright 2016 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Framework\Test\Unit\Helper;
9+
10+
use Magento\Framework\View\Result\Page;
11+
use Magento\Framework\View\Page\Config;
12+
13+
/**
14+
* Test helper for Page
15+
*
16+
* This helper extends the concrete Page class to provide
17+
* test-specific functionality without dependency injection issues.
18+
*/
19+
class PageTestHelper extends Page
20+
{
21+
/**
22+
* @var Config
23+
*/
24+
private $config;
25+
26+
/**
27+
* Constructor that accepts config
28+
*
29+
* @param Config $config
30+
*/
31+
public function __construct($config)
32+
{
33+
$this->config = $config;
34+
}
35+
36+
/**
37+
* Set active menu
38+
*
39+
* @param string $menuId
40+
* @return $this
41+
*/
42+
public function setActiveMenu($menuId)
43+
{
44+
return $this;
45+
}
46+
47+
/**
48+
* Add breadcrumb
49+
*
50+
* @param string $label
51+
* @param string $title
52+
* @param string|null $link
53+
* @return $this
54+
*/
55+
public function addBreadcrumb($label, $title, $link = null)
56+
{
57+
return $this;
58+
}
59+
60+
/**
61+
* Get config
62+
*
63+
* @return Config
64+
*/
65+
public function getConfig()
66+
{
67+
return $this->config;
68+
}
69+
}
70+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php
2+
/**
3+
* Copyright 2015 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Framework\Test\Unit\Helper;
9+
10+
use Magento\Framework\View\Element\Template;
11+
12+
/**
13+
* Test helper for Template
14+
*
15+
* This helper extends the concrete Template class to provide
16+
* test-specific functionality without dependency injection issues.
17+
*/
18+
class TemplateTestHelper extends Template
19+
{
20+
/**
21+
* Constructor that skips parent initialization
22+
*/
23+
public function __construct()
24+
{
25+
// Skip parent constructor to avoid dependency injection issues
26+
}
27+
28+
/**
29+
* Set item
30+
*
31+
* @param mixed $item
32+
* @return $this
33+
*/
34+
public function setItem($item)
35+
{
36+
return $this;
37+
}
38+
39+
/**
40+
* Render HTML
41+
*
42+
* @return string
43+
*/
44+
public function toHtml()
45+
{
46+
return 'rendered';
47+
}
48+
}
49+

0 commit comments

Comments
 (0)