Skip to content

Commit ac08bb3

Browse files
committed
Test has been added.
1 parent 9cb53cd commit ac08bb3

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\User\Model\ResourceModel\User;
7+
8+
/**
9+
* User collection test
10+
* @magentoAppArea adminhtml
11+
*/
12+
class CollectionTest extends \PHPUnit\Framework\TestCase
13+
{
14+
/**
15+
* @var \Magento\User\Model\ResourceModel\User\Collection
16+
*/
17+
protected $_collection;
18+
19+
protected function setUp(): void
20+
{
21+
$this->_collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
22+
\Magento\User\Model\ResourceModel\User\Collection::class
23+
);
24+
}
25+
26+
public function testFilteringCollectionByUserId()
27+
{
28+
$this->assertEquals(1, $this->_collection->addFieldToFilter('user_id', 1)->count());
29+
}
30+
}

0 commit comments

Comments
 (0)