7
7
8
8
namespace Magento \GraphQl \Catalog ;
9
9
10
- use Magento \Catalog \Model \Indexer \Category \Product ;
11
- use Magento \Catalog \Model \Indexer \Product \Category ;
12
- use Magento \CatalogSearch \Model \Indexer \Fulltext as IndexerSearch ;
13
- use Magento \Indexer \Model \Indexer ;
14
10
use Magento \Indexer \Test \Fixture \Indexer as IndexerFixture ;
15
11
use Magento \TestFramework \Fixture \Config ;
16
12
use Magento \TestFramework \Helper \Bootstrap ;
@@ -74,13 +70,15 @@ public function testProductWithCanonicalLinksMetaTagSettingsEnabled()
74
70
$ this ->assertEquals ($ productSku , $ response ['products ' ]['items ' ][0 ]['sku ' ]);
75
71
}
76
72
77
- /**
78
- * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php
79
- * @magentoConfigFixture default_store catalog/seo/product_canonical_tag 0
80
- */
73
+ #[
74
+ Config('catalog/seo/product_canonical_tag ' , 0 ),
75
+ DataFixture(ProductFixture::class, as: 'product ' ),
76
+ DataFixture(IndexerFixture::class)
77
+ ]
81
78
public function testProductWithCanonicalLinksMetaTagSettingsDisabled ()
82
79
{
83
- $ productSku = 'simple ' ;
80
+ $ product = DataFixtureStorageManager::getStorage ()->get ('product ' );
81
+ $ productSku = $ product ->getSku ();
84
82
$ query
85
83
= <<<QUERY
86
84
{
@@ -98,6 +96,6 @@ public function testProductWithCanonicalLinksMetaTagSettingsDisabled()
98
96
$ this ->assertNull (
99
97
$ response ['products ' ]['items ' ][0 ]['canonical_url ' ]
100
98
);
101
- $ this ->assertEquals (' simple ' , $ response ['products ' ]['items ' ][0 ]['sku ' ]);
99
+ $ this ->assertEquals ($ productSku , $ response ['products ' ]['items ' ][0 ]['sku ' ]);
102
100
}
103
- }
101
+ }
0 commit comments