File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
dev/tests/integration/testsuite/Magento/Widget/Controller/Adminhtml/Widget/Instance Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 10
10
use Magento \Framework \App \Request \Http ;
11
11
use Magento \Framework \Message \MessageInterface ;
12
12
use Magento \TestFramework \TestCase \AbstractBackendController ;
13
+ use Magento \Widget \Model \ResourceModel \Widget \Instance \Collection ;
13
14
use Magento \Widget \Model \ResourceModel \Widget \Instance \CollectionFactory ;
14
15
15
16
/**
21
22
*/
22
23
class DeleteTest extends AbstractBackendController
23
24
{
24
- /** @var CollectionFactory */
25
- private $ collectionFactory ;
25
+ /** @var Collection */
26
+ private $ widgetCollection ;
26
27
27
28
/**
28
29
* @inheritdoc
@@ -31,7 +32,7 @@ protected function setUp(): void
31
32
{
32
33
parent ::setUp ();
33
34
34
- $ this ->collectionFactory = $ this ->_objectManager ->get (CollectionFactory::class);
35
+ $ this ->widgetCollection = $ this ->_objectManager ->get (CollectionFactory::class)-> create ( );
35
36
}
36
37
37
38
/**
@@ -41,8 +42,7 @@ protected function setUp(): void
41
42
*/
42
43
public function testDeleteWidget (): void
43
44
{
44
- $ widget = $ this ->collectionFactory ->create ()
45
- ->addFieldToFilter ('title ' , 'New Sample widget title ' )->getFirstItem ();
45
+ $ widget = $ this ->widgetCollection ->addFieldToFilter ('title ' , 'New Sample widget title ' )->getFirstItem ();
46
46
$ this ->assertNotNull ($ widget ->getInstanceId ());
47
47
$ this ->getRequest ()->setMethod (Http::METHOD_POST );
48
48
$ this ->getRequest ()->setParams (['instance_id ' => $ widget ->getInstanceId ()]);
You can’t perform that action at this time.
0 commit comments