File tree 22 files changed +75
-94
lines changed
CatalogSearch/Model/Indexer/Fulltext
dev/tests/integration/testsuite/Magento/Indexer/Model/Config
lib/internal/Magento/Framework/Indexer 22 files changed +75
-94
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ class Full
162
162
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
163
163
* @param \Magento\CatalogSearch\Model\Resource\Fulltext $fulltextResource
164
164
* @param \Magento\Framework\Search\Request\DimensionFactory $dimensionFactory
165
- * @param \Magento\Indexer\Model \ConfigInterface $indexerConfig
165
+ * @param \Magento\Framework\Indexer \ConfigInterface $indexerConfig
166
166
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
167
167
*/
168
168
public function __construct (
@@ -182,7 +182,7 @@ public function __construct(
182
182
\Magento \Framework \Stdlib \DateTime \TimezoneInterface $ localeDate ,
183
183
\Magento \CatalogSearch \Model \Resource \Fulltext $ fulltextResource ,
184
184
\Magento \Framework \Search \Request \DimensionFactory $ dimensionFactory ,
185
- \Magento \Indexer \ Model \ConfigInterface $ indexerConfig
185
+ \Magento \Framework \ Indexer \ConfigInterface $ indexerConfig
186
186
) {
187
187
$ this ->resource = $ resource ;
188
188
$ this ->catalogProductType = $ catalogProductType ;
Original file line number Diff line number Diff line change 8
8
use Magento \CatalogSearch \Model \Indexer \Fulltext as FulltextIndexer ;
9
9
use Magento \CatalogSearch \Model \Indexer \IndexerHandlerFactory ;
10
10
use Magento \Framework \Search \Request \DimensionFactory ;
11
- use Magento \Indexer \ Model \ConfigInterface ;
11
+ use Magento \Framework \ Indexer \ConfigInterface ;
12
12
13
13
class Store
14
14
{
Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Indexer \Model ;
7
7
8
+ use Magento \Framework \Indexer \ConfigInterface ;
9
+
8
10
class Config implements ConfigInterface
9
11
{
10
12
/**
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ class Data extends \Magento\Framework\Config\Data
13
13
protected $ stateCollection ;
14
14
15
15
/**
16
- * @param \Magento\Indexer\Model \Config\Reader $reader
16
+ * @param \Magento\Framework\Indexer \Config\Reader $reader
17
17
* @param \Magento\Framework\Config\CacheInterface $cache
18
18
* @param \Magento\Indexer\Model\Resource\Indexer\State\Collection $stateCollection
19
19
* @param string $cacheId
20
20
*/
21
21
public function __construct (
22
- \Magento \Indexer \ Model \Config \Reader $ reader ,
22
+ \Magento \Framework \ Indexer \Config \Reader $ reader ,
23
23
\Magento \Framework \Config \CacheInterface $ cache ,
24
24
\Magento \Indexer \Model \Resource \Indexer \State \Collection $ stateCollection ,
25
25
$ cacheId = 'indexer_config '
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 7
7
8
8
use Magento \Framework \Indexer \ActionFactory ;
9
9
use Magento \Framework \Indexer \ActionInterface ;
10
+ use Magento \Framework \Indexer \ConfigInterface ;
10
11
use Magento \Framework \Indexer \IndexerInterface as IdxInterface ;
11
12
use Magento \Framework \Indexer \IndexStructureInterface ;
12
13
use Magento \Framework \Indexer \StateInterface ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class Collection extends \Magento\Framework\Data\Collection
15
15
protected $ _itemObjectClass = 'Magento\Framework\Indexer\IndexerInterface ' ;
16
16
17
17
/**
18
- * @var \Magento\Indexer\Model \ConfigInterface
18
+ * @var \Magento\Framework\Indexer \ConfigInterface
19
19
*/
20
20
protected $ config ;
21
21
@@ -26,12 +26,12 @@ class Collection extends \Magento\Framework\Data\Collection
26
26
27
27
/**
28
28
* @param \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory
29
- * @param \Magento\Indexer\Model \ConfigInterface $config
29
+ * @param \Magento\Framework\Indexer \ConfigInterface $config
30
30
* @param \Magento\Indexer\Model\Resource\Indexer\State\CollectionFactory $statesFactory
31
31
*/
32
32
public function __construct (
33
33
\Magento \Framework \Data \Collection \EntityFactoryInterface $ entityFactory ,
34
- \Magento \Indexer \ Model \ConfigInterface $ config ,
34
+ \Magento \Framework \ Indexer \ConfigInterface $ config ,
35
35
\Magento \Indexer \Model \Resource \Indexer \State \CollectionFactory $ statesFactory
36
36
) {
37
37
$ this ->config = $ config ;
Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \Indexer \Model ;
7
7
8
+ use Magento \Framework \Indexer \ConfigInterface ;
8
9
use Magento \Framework \Indexer \IndexerInterface ;
9
10
10
11
class Processor
Original file line number Diff line number Diff line change 11
11
use Magento \Framework \Json \EncoderInterface ;
12
12
use Magento \Framework \Setup \ModuleContextInterface ;
13
13
use Magento \Framework \Setup \ModuleDataSetupInterface ;
14
- use Magento \Indexer \ Model \ConfigInterface ;
14
+ use Magento \Framework \ Indexer \ConfigInterface ;
15
15
use Magento \Indexer \Model \Resource \Indexer \State \CollectionFactory ;
16
16
use Magento \Indexer \Model \Indexer \State ;
17
17
use Magento \Indexer \Model \Indexer \StateFactory ;
Original file line number Diff line number Diff line change 12
12
use Magento \Framework \Setup \InstallSchemaInterface ;
13
13
use Magento \Framework \Setup \ModuleContextInterface ;
14
14
use Magento \Framework \Setup \SchemaSetupInterface ;
15
- use Magento \Indexer \ Model \ConfigInterface ;
15
+ use Magento \Framework \ Indexer \ConfigInterface ;
16
16
use Magento \Indexer \Model \Indexer \State ;
17
17
use Magento \Indexer \Model \Indexer \StateFactory ;
18
18
use Magento \Indexer \Model \Resource \Indexer \State \CollectionFactory ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class DataTest extends \PHPUnit_Framework_TestCase
13
13
protected $ model ;
14
14
15
15
/**
16
- * @var \Magento\Indexer\Model \Config\Reader|\PHPUnit_Framework_MockObject_MockObject
16
+ * @var \Magento\Framework\Indexer \Config\Reader|\PHPUnit_Framework_MockObject_MockObject
17
17
*/
18
18
protected $ reader ;
19
19
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public function testLoadData()
18
18
['create ' ]
19
19
)->getMock ();
20
20
21
- $ config = $ this ->getMockBuilder ('Magento\Indexer\Model \ConfigInterface ' )->getMock ();
21
+ $ config = $ this ->getMockBuilder ('Magento\Framework\Indexer \ConfigInterface ' )->getMock ();
22
22
23
23
$ statesFactory = $ this ->getMockBuilder (
24
24
'Magento\Indexer\Model\Resource\Indexer\State\CollectionFactory '
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class IndexerTest extends \PHPUnit_Framework_TestCase
15
15
protected $ model ;
16
16
17
17
/**
18
- * @var \Magento\Indexer\Model \ConfigInterface|\PHPUnit_Framework_MockObject_MockObject
18
+ * @var \Magento\Framework\Indexer \ConfigInterface|\PHPUnit_Framework_MockObject_MockObject
19
19
*/
20
20
protected $ configMock ;
21
21
@@ -42,7 +42,7 @@ class IndexerTest extends \PHPUnit_Framework_TestCase
42
42
protected function setUp ()
43
43
{
44
44
$ this ->configMock = $ this ->getMockForAbstractClass (
45
- 'Magento\Indexer\Model \ConfigInterface ' ,
45
+ 'Magento\Framework\Indexer \ConfigInterface ' ,
46
46
[],
47
47
'' ,
48
48
false ,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class ProcessorTest extends \PHPUnit_Framework_TestCase
15
15
protected $ model ;
16
16
17
17
/**
18
- * @var \Magento\Indexer\Model \ConfigInterface|\PHPUnit_Framework_MockObject_MockObject
18
+ * @var \Magento\Framework\Indexer \ConfigInterface|\PHPUnit_Framework_MockObject_MockObject
19
19
*/
20
20
protected $ configMock ;
21
21
@@ -37,7 +37,7 @@ class ProcessorTest extends \PHPUnit_Framework_TestCase
37
37
protected function setUp ()
38
38
{
39
39
$ this ->configMock = $ this ->getMockForAbstractClass (
40
- 'Magento\Indexer\Model \ConfigInterface ' ,
40
+ 'Magento\Framework\Indexer \ConfigInterface ' ,
41
41
[],
42
42
'' ,
43
43
false ,
Original file line number Diff line number Diff line change 8
8
<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd" >
9
9
<preference for =" Magento\Framework\Mview\View\State\CollectionInterface" type =" Magento\Indexer\Model\Resource\Mview\View\State\Collection" />
10
10
<preference for =" Magento\Framework\Mview\View\StateInterface" type =" Magento\Indexer\Model\Mview\View\State" />
11
- <preference for =" Magento\Indexer\Model \ConfigInterface" type =" Magento\Indexer\Model\Config" />
11
+ <preference for =" Magento\Framework\Indexer \ConfigInterface" type =" Magento\Indexer\Model\Config" />
12
12
<preference for =" Magento\Framework\Indexer\IndexerInterface" type =" Magento\Indexer\Model\Indexer" />
13
13
<preference for =" Magento\Indexer\Model\Indexer\Table\StrategyInterface" type =" Magento\Indexer\Model\Indexer\Table\Strategy" />
14
14
<type name =" Magento\Indexer\Model\Indexer\Table\StrategyInterface" shared =" false" />
Original file line number Diff line number Diff line change 8
8
class ConverterTest extends \PHPUnit_Framework_TestCase
9
9
{
10
10
/**
11
- * @var \Magento\Indexer\Model \Config\Converter
11
+ * @var \Magento\Framework\Indexer \Config\Converter
12
12
*/
13
13
protected $ model ;
14
14
Original file line number Diff line number Diff line change 3
3
* Copyright © 2015 Magento. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
- namespace Magento \Indexer \ Model \Config ;
6
+ namespace Magento \Framework \ Indexer \Config ;
7
7
8
8
use Magento \Framework \Config \ConverterInterface ;
9
9
Original file line number Diff line number Diff line change 3
3
* Copyright © 2015 Magento. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
- namespace Magento \Indexer \ Model \Config ;
6
+ namespace Magento \Framework \ Indexer \Config ;
7
7
8
- /**
9
- * @codeCoverageIgnore
10
- */
11
8
class Reader extends \Magento \Framework \Config \Reader \Filesystem
12
9
{
13
10
/**
@@ -32,11 +29,13 @@ class Reader extends \Magento\Framework\Config\Reader\Filesystem
32
29
* @param array $idAttributes
33
30
* @param string $domDocumentClass
34
31
* @param string $defaultScope
32
+ *
33
+ * @codeCoverageIgnore
35
34
*/
36
35
public function __construct (
37
36
\Magento \Framework \Config \FileResolverInterface $ fileResolver ,
38
- \Magento \Indexer \ Model \Config \Converter $ converter ,
39
- \Magento \Indexer \ Model \Config \SchemaLocator $ schemaLocator ,
37
+ \Magento \Framework \ Indexer \Config \Converter $ converter ,
38
+ \Magento \Framework \ Indexer \Config \SchemaLocator $ schemaLocator ,
40
39
\Magento \Framework \Config \ValidationStateInterface $ validationState ,
41
40
$ fileName = 'indexer.xml ' ,
42
41
$ idAttributes = [],
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © 2015 Magento. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ namespace Magento \Framework \Indexer \Config ;
7
+
8
+ use Magento \Framework \Config \SchemaLocatorInterface ;
9
+
10
+ class SchemaLocator implements SchemaLocatorInterface
11
+ {
12
+ /**
13
+ * Get path to merged config schema
14
+ *
15
+ * @return string|null
16
+ */
17
+ public function getSchema ()
18
+ {
19
+ return realpath (__DIR__ . '/../etc/ ' ) . '/indexer_merged.xsd ' ;
20
+ }
21
+
22
+ /**
23
+ * Get path to pre file validation schema
24
+ *
25
+ * @return string|null
26
+ */
27
+ public function getPerFileSchema ()
28
+ {
29
+ return realpath (__DIR__ . '/../etc/ ' ) . '/indexer.xsd ' ;
30
+ }
31
+ }
Original file line number Diff line number Diff line change 3
3
* Copyright © 2015 Magento. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
- namespace Magento \Indexer \ Model ;
6
+ namespace Magento \Framework \ Indexer ;
7
7
8
8
interface ConfigInterface
9
9
{
Original file line number Diff line number Diff line change 3
3
* Copyright © 2015 Magento. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
- namespace Magento \Indexer \Test \Unit \ Model \Config ;
6
+ namespace Magento \Framework \ Indexer \Test \Unit \Config ;
7
7
8
8
class ConverterTest extends \PHPUnit_Framework_TestCase
9
9
{
10
10
/**
11
- * @var \Magento\Indexer\Model \Config\Converter|\PHPUnit_Framework_MockObject_MockObject
11
+ * @var \Magento\Framework\Indexer \Config\Converter|\PHPUnit_Framework_MockObject_MockObject
12
12
*/
13
13
protected $ _model ;
14
14
15
15
protected function setUp ()
16
16
{
17
- $ this ->_model = new \Magento \Indexer \ Model \Config \Converter ();
17
+ $ this ->_model = new \Magento \Framework \ Indexer \Config \Converter ();
18
18
}
19
19
20
20
public function testConvert ()
21
21
{
22
- $ data = include __DIR__ . '/../../ _files/indexer_config.php ' ;
22
+ $ data = include __DIR__ . '/../_files/indexer_config.php ' ;
23
23
$ dom = new \DOMDocument ();
24
24
$ dom ->loadXML ($ data ['inputXML ' ]);
25
25
You can’t perform that action at this time.
0 commit comments