Skip to content

Commit 73d4d88

Browse files
author
Mohan Ahuja
committed
ACP2E-726: Unable to query bulk operations by search criteria using REST Api
- Removed old unit test and added new unit test
1 parent 4385c43 commit 73d4d88

File tree

3 files changed

+30
-180
lines changed

3 files changed

+30
-180
lines changed

app/code/Magento/AsynchronousOperations/Model/ResourceModel/Operation/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Magento\AsynchronousOperations\Model\ResourceModel\Operation as OperationResourceModel;
1111

1212
/**
13-
* Class Collection
13+
* Class Collection for Magento Operation table
1414
* @codeCoverageIgnore
1515
*/
1616
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection

app/code/Magento/AsynchronousOperations/Test/Unit/Model/OperationRepositoryTest.php

Lines changed: 0 additions & 179 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
namespace Magento\AsynchronousOperations\Test\Unit\Model\ResourceModel\Operation;
4+
5+
use Magento\AsynchronousOperations\Model\ResourceModel\Operation as OperationResourceModel;
6+
use Magento\TestFramework\Helper\Bootstrap;
7+
use PHPUnit\Framework\TestCase;
8+
use Magento\AsynchronousOperations\Model\ResourceModel\Operation\CollectionFactory as OperationCollectionFactory;
9+
10+
class CollectionTest extends TestCase
11+
{
12+
/**
13+
* @return void
14+
*/
15+
public function testSetIdFieldNameValue(): void
16+
{
17+
$objectManager = Bootstrap::getObjectManager();
18+
$classObject = $objectManager->create(
19+
OperationCollectionFactory::class,
20+
[
21+
Bootstrap::getObjectManager()
22+
]
23+
);
24+
$this->assertNotNull($classObject);
25+
$collection = $classObject->create();
26+
$this->assertNotNull($collection);
27+
$this->assertEquals(OperationResourceModel::TABLE_PRIMARY_KEY, $collection->getIdFieldName());
28+
}
29+
}

0 commit comments

Comments
 (0)