File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
dev/tests/integration/testsuite/Magento/Ui/Model/Resource Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 10
10
use Magento \Ui \Api \BookmarkRepositoryInterface ;
11
11
use Magento \Ui \Api \Data \BookmarkInterface ;
12
12
13
+ /**
14
+ * @magentoDataFixture Magento/Customer/_files/customer.php
15
+ */
13
16
class BookmarkRepositoryTest extends \PHPUnit_Framework_TestCase
14
17
{
15
18
/**
@@ -27,15 +30,16 @@ class BookmarkRepositoryTest extends \PHPUnit_Framework_TestCase
27
30
*/
28
31
protected $ bookmark ;
29
32
30
- /**
31
- * @magentoDataFixture Magento/Customer/_files/customer.php
32
- */
33
33
protected function setUp ()
34
34
{
35
35
$ this ->bookmarkRepository = Bootstrap::getObjectManager ()
36
36
->create ('Magento\Ui\Model\Resource\BookmarkRepository ' );
37
37
$ 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 ' );
39
43
$ this ->bookmark = $ this ->bookmarkRepository ->save ($ this ->bookmark );
40
44
}
41
45
You can’t perform that action at this time.
0 commit comments