Skip to content

Commit db41ca8

Browse files
committed
MAGETWO-38686: Merge and Fix Builds
1 parent 669b584 commit db41ca8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

dev/tests/integration/testsuite/Magento/Ui/Model/Resource/BookmarkRepositoryTest.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
use Magento\Ui\Api\BookmarkRepositoryInterface;
1111
use Magento\Ui\Api\Data\BookmarkInterface;
1212

13+
/**
14+
* @magentoDataFixture Magento/Customer/_files/customer.php
15+
*/
1316
class BookmarkRepositoryTest extends \PHPUnit_Framework_TestCase
1417
{
1518
/**
@@ -27,15 +30,16 @@ class BookmarkRepositoryTest extends \PHPUnit_Framework_TestCase
2730
*/
2831
protected $bookmark;
2932

30-
/**
31-
* @magentoDataFixture Magento/Customer/_files/customer.php
32-
*/
3333
protected function setUp()
3434
{
3535
$this->bookmarkRepository = Bootstrap::getObjectManager()
3636
->create('Magento\Ui\Model\Resource\BookmarkRepository');
3737
$this->bookmarkFactory = Bootstrap::getObjectManager()->create('Magento\Ui\Model\BookmarkFactory');
38-
$this->bookmark = $this->bookmarkFactory->create()->setUserId(1)->setTitle('test');
38+
/** @var $customerRepository \Magento\Customer\Api\CustomerRepositoryInterface */
39+
$customerRepository = Bootstrap::getObjectManager()
40+
->create('Magento\Customer\Api\CustomerRepositoryInterface');
41+
$customerId = $customerRepository->get('customer@example.com')->getId();
42+
$this->bookmark = $this->bookmarkFactory->create()->setUserId($customerId)->setTitle('test');
3943
$this->bookmark = $this->bookmarkRepository->save($this->bookmark);
4044
}
4145

0 commit comments

Comments
 (0)