Skip to content

Commit 0810380

Browse files
author
Alexander Paliarush
committed
MAGETWO-38686: Merge and Fix Builds
1 parent 7abb63e commit 0810380

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

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

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,39 +31,24 @@ class BookmarkRepositoryTest extends \PHPUnit_Framework_TestCase
3131
*/
3232
protected $bookmark;
3333

34-
/**
35-
* @var \Magento\Customer\Api\CustomerRepositoryInterface
36-
*/
37-
protected $customerRepository;
38-
3934
protected function setUp()
4035
{
4136
$this->bookmarkRepository = Bootstrap::getObjectManager()
4237
->create('Magento\Ui\Model\Resource\BookmarkRepository');
4338
$this->bookmarkFactory = Bootstrap::getObjectManager()->create('Magento\Ui\Model\BookmarkFactory');
4439

45-
/** @var $customerRepository \Magento\Customer\Api\CustomerRepositoryInterface */
46-
$this->customerRepository = Bootstrap::getObjectManager()
47-
->create('Magento\Customer\Api\CustomerRepositoryInterface');
48-
$newCustomerEntity = Bootstrap::getObjectManager()
49-
->create('Magento\Customer\Api\Data\CustomerInterfaceFactory')
50-
->create()
51-
->setStoreId(1)
52-
->setWebsiteId(1)
53-
->setEmail('bookmark_user@example.com')
54-
->setFirstname('TestFn')
55-
->setLastname('TestLn')
56-
->setGroupId(1);
57-
$newCustomerEntity = $this->customerRepository->save($newCustomerEntity);
40+
/** @var $adminUser \Magento\User\Model\User */
41+
$adminUser = Bootstrap::getObjectManager()->create('Magento\User\Model\User');
42+
$defaultAdminUserName = 'user';
43+
$adminUser->load($defaultAdminUserName, 'username');
5844

59-
$this->bookmark = $this->bookmarkFactory->create()->setUserId($newCustomerEntity->getId())->setTitle('test');
45+
$this->bookmark = $this->bookmarkFactory->create()->setUserId($adminUser->getId())->setTitle('test');
6046
$this->bookmark = $this->bookmarkRepository->save($this->bookmark);
6147
}
6248

6349
protected function tearDown()
6450
{
6551
$this->bookmarkRepository->delete($this->bookmark);
66-
$this->customerRepository->delete($this->customerRepository->get('bookmark_user@example.com'));
6752
}
6853

6954
public function testGetList()

0 commit comments

Comments
 (0)