1212use Magento \Framework \DB \Ddl \Table ;
1313use Magento \Framework \DB \Select ;
1414use Magento \Framework \Mview \Config ;
15+ use Magento \Framework \Mview \View \AdditionalColumnsProcessor \ProcessorFactory ;
1516use Magento \Framework \Mview \View \Changelog ;
1617use Magento \Framework \Mview \View \ChangelogInterface ;
1718use PHPUnit \Framework \MockObject \MockObject ;
@@ -41,13 +42,19 @@ class ChangelogTest extends TestCase
4142 */
4243 protected $ resourceMock ;
4344
45+ /**
46+ * @var ProcessorFactory|MockObject
47+ */
48+ protected $ processorFactory ;
49+
4450 protected function setUp (): void
4551 {
4652 $ this ->connectionMock = $ this ->createMock (Mysql::class);
4753 $ this ->resourceMock = $ this ->createMock (ResourceConnection::class);
4854 $ this ->mockGetConnection ($ this ->connectionMock );
55+ $ this ->processorFactory = $ this ->createMock (ProcessorFactory::class);
4956
50- $ this ->model = new Changelog ($ this ->resourceMock , $ this ->getMviewConfigMock ());
57+ $ this ->model = new Changelog ($ this ->resourceMock , $ this ->getMviewConfigMock (), $ this -> processorFactory );
5158 }
5259
5360 /**
@@ -69,7 +76,7 @@ public function testInstanceOf()
6976 $ resourceMock =
7077 $ this ->createMock (ResourceConnection::class);
7178 $ resourceMock ->expects ($ this ->once ())->method ('getConnection ' )->willReturn (true );
72- $ model = new Changelog ($ resourceMock , $ this ->getMviewConfigMock ());
79+ $ model = new Changelog ($ resourceMock , $ this ->getMviewConfigMock (), $ this -> processorFactory );
7380 $ this ->assertInstanceOf (ChangelogInterface::class, $ model );
7481 }
7582
@@ -80,7 +87,7 @@ public function testCheckConnectionException()
8087 $ resourceMock =
8188 $ this ->createMock (ResourceConnection::class);
8289 $ resourceMock ->expects ($ this ->once ())->method ('getConnection ' )->willReturn (null );
83- $ model = new Changelog ($ resourceMock , $ this ->getMviewConfigMock ());
90+ $ model = new Changelog ($ resourceMock , $ this ->getMviewConfigMock (), $ this -> processorFactory );
8491 $ model ->setViewId ('ViewIdTest ' );
8592 $ this ->assertNull ($ model );
8693 }
0 commit comments