4
4
* See COPYING.txt for license details.
5
5
*/
6
6
7
- namespace testsuite \ Magento \GroupedProduct \Pricing \Price ;
7
+ namespace Magento \GroupedProduct \Pricing \Price ;
8
8
9
9
use Magento \Catalog \Api \Data \ProductTierPriceInterface ;
10
- use Magento \GroupedProduct \Pricing \Price \FinalPrice ;
11
10
use Magento \TestFramework \Helper \Bootstrap ;
12
11
13
12
class FinalPriceTest extends \PHPUnit_Framework_TestCase
@@ -40,15 +39,13 @@ public function testFinalPriceWithTearPrice()
40
39
$ tierPrice ->setCustomerGroupId (\Magento \Customer \Model \GroupManagement::CUST_GROUP_ALL );
41
40
$ tierPrice ->setValue (5 );
42
41
43
-
44
42
/** @var $simpleProduct \Magento\Catalog\Api\Data\ProductInterface */
45
43
$ simpleProduct = $ productRepository ->get ('simple ' );
46
44
$ simpleProduct ->setTierPrices ([
47
45
$ tierPrice
48
46
]);
49
47
$ productRepository ->save ($ simpleProduct );
50
48
51
-
52
49
/** @var $product \Magento\Catalog\Model\Product */
53
50
$ product = $ productRepository ->get ('grouped-product ' );
54
51
$ this ->assertEquals (5 , $ product ->getPriceInfo ()->getPrice (FinalPrice::PRICE_CODE )->getValue ());
@@ -63,14 +60,11 @@ public function testFinalPriceWithSpecialPrice()
63
60
$ productRepository = Bootstrap::getObjectManager ()
64
61
->get ('\Magento\Catalog\Api\ProductRepositoryInterface ' );
65
62
66
-
67
-
68
63
/** @var $simpleProduct \Magento\Catalog\Api\Data\ProductInterface */
69
64
$ simpleProduct = $ productRepository ->get ('simple ' );
70
65
$ simpleProduct ->setCustomAttribute ('special_price ' , 6 );
71
66
$ productRepository ->save ($ simpleProduct );
72
67
73
-
74
68
/** @var $product \Magento\Catalog\Model\Product */
75
69
$ product = $ productRepository ->get ('grouped-product ' );
76
70
$ this ->assertEquals (6 , $ product ->getPriceInfo ()->getPrice (FinalPrice::PRICE_CODE )->getValue ());
0 commit comments