12
12
use Magento \Framework \DB \Ddl \Table ;
13
13
use Magento \Framework \DB \Select ;
14
14
use Magento \Framework \Mview \Config ;
15
+ use Magento \Framework \Mview \View \AdditionalColumnsProcessor \ProcessorFactory ;
15
16
use Magento \Framework \Mview \View \Changelog ;
16
17
use Magento \Framework \Mview \View \ChangelogInterface ;
17
18
use PHPUnit \Framework \MockObject \MockObject ;
@@ -41,13 +42,19 @@ class ChangelogTest extends TestCase
41
42
*/
42
43
protected $ resourceMock ;
43
44
45
+ /**
46
+ * @var ProcessorFactory|MockObject
47
+ */
48
+ protected $ processorFactory ;
49
+
44
50
protected function setUp (): void
45
51
{
46
52
$ this ->connectionMock = $ this ->createMock (Mysql::class);
47
53
$ this ->resourceMock = $ this ->createMock (ResourceConnection::class);
48
54
$ this ->mockGetConnection ($ this ->connectionMock );
55
+ $ this ->processorFactory = $ this ->createMock (ProcessorFactory::class);
49
56
50
- $ this ->model = new Changelog ($ this ->resourceMock , $ this ->getMviewConfigMock ());
57
+ $ this ->model = new Changelog ($ this ->resourceMock , $ this ->getMviewConfigMock (), $ this -> processorFactory );
51
58
}
52
59
53
60
/**
@@ -69,7 +76,7 @@ public function testInstanceOf()
69
76
$ resourceMock =
70
77
$ this ->createMock (ResourceConnection::class);
71
78
$ resourceMock ->expects ($ this ->once ())->method ('getConnection ' )->willReturn (true );
72
- $ model = new Changelog ($ resourceMock , $ this ->getMviewConfigMock ());
79
+ $ model = new Changelog ($ resourceMock , $ this ->getMviewConfigMock (), $ this -> processorFactory );
73
80
$ this ->assertInstanceOf (ChangelogInterface::class, $ model );
74
81
}
75
82
@@ -80,7 +87,7 @@ public function testCheckConnectionException()
80
87
$ resourceMock =
81
88
$ this ->createMock (ResourceConnection::class);
82
89
$ resourceMock ->expects ($ this ->once ())->method ('getConnection ' )->willReturn (null );
83
- $ model = new Changelog ($ resourceMock , $ this ->getMviewConfigMock ());
90
+ $ model = new Changelog ($ resourceMock , $ this ->getMviewConfigMock (), $ this -> processorFactory );
84
91
$ model ->setViewId ('ViewIdTest ' );
85
92
$ this ->assertNull ($ model );
86
93
}
0 commit comments