Skip to content

Commit a17fb2f

Browse files
committed
Merge remote-tracking branch 'origin/MC-33071-CE-9' into MC-33071
2 parents 282cd22 + 2d8cd73 commit a17fb2f

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryWithDescriptionDirectivesTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function testHtmlDirectivesRendered()
6262
QUERY;
6363
$response = $this->graphQlQuery($query);
6464

65-
self::assertNotContains('media url', $response['category']['description']);
66-
self::assertContains($storeBaseUrl, $response['category']['description']);
65+
self::assertStringNotContainsString('media url', $response['category']['description']);
66+
self::assertStringContainsString($storeBaseUrl, $response['category']['description']);
6767
}
6868
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/MediaGalleryTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testProductSmallImageUrlWithExistingImage()
3434
$response = $this->graphQlQuery($query);
3535

3636
self::assertArrayHasKey('url', $response['products']['items'][0]['small_image']);
37-
self::assertContains('magento_image.jpg', $response['products']['items'][0]['small_image']['url']);
37+
self::assertStringContainsString('magento_image.jpg', $response['products']['items'][0]['small_image']['url']);
3838
self::assertTrue($this->checkImageExists($response['products']['items'][0]['small_image']['url']));
3939
}
4040

@@ -61,7 +61,7 @@ public function testProductSmallImageUrlPlaceholder()
6161
$responseImage = $response['products']['items'][0]['small_image'];
6262

6363
self::assertArrayHasKey('url', $responseImage);
64-
self::assertContains('placeholder/small_image.jpg', $responseImage['url']);
64+
self::assertStringContainsString('placeholder/small_image.jpg', $responseImage['url']);
6565
self::assertTrue($this->checkImageExists($responseImage['url']));
6666
}
6767

@@ -91,11 +91,11 @@ public function testMediaGalleryTypesAreCorrect()
9191
$this->assertCount(2, $mediaGallery);
9292
$this->assertEquals('Image Alt Text', $mediaGallery[0]['label']);
9393
$this->assertEquals('image', $mediaGallery[0]['media_type']);
94-
$this->assertContains('magento_image', $mediaGallery[0]['file']);
94+
$this->assertStringContainsString('magento_image', $mediaGallery[0]['file']);
9595
$this->assertEquals(['image', 'small_image'], $mediaGallery[0]['types']);
9696
$this->assertEquals('Thumbnail Image', $mediaGallery[1]['label']);
9797
$this->assertEquals('image', $mediaGallery[1]['media_type']);
98-
$this->assertContains('magento_thumbnail', $mediaGallery[1]['file']);
98+
$this->assertStringContainsString('magento_thumbnail', $mediaGallery[1]['file']);
9999
$this->assertEquals(['thumbnail', 'swatch_image'], $mediaGallery[1]['types']);
100100
}
101101

@@ -205,7 +205,7 @@ public function testProductMediaGalleryEntries()
205205
$response = $this->graphQlQuery($query);
206206

207207
self::assertArrayHasKey('file', $response['products']['items'][0]['media_gallery_entries'][0]);
208-
self::assertContains(
208+
self::assertStringContainsString(
209209
'magento_image.jpg',
210210
$response['products']['items'][0]['media_gallery_entries'][0]['file']
211211
);

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductImageTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ public function testProductWithBaseImage()
3636
label
3737
}
3838
}
39-
}
39+
}
4040
}
4141
QUERY;
4242
$response = $this->graphQlQuery($query);
4343

44-
self::assertContains('magento_image.jpg', $response['products']['items'][0]['image']['url']);
44+
self::assertStringContainsString('magento_image.jpg', $response['products']['items'][0]['image']['url']);
4545
self::assertTrue($this->checkImageExists($response['products']['items'][0]['image']['url']));
4646
self::assertEquals('Image Alt Text', $response['products']['items'][0]['image']['label']);
4747
}
@@ -65,7 +65,7 @@ public function testProductWithoutBaseImage()
6565
label
6666
}
6767
}
68-
}
68+
}
6969
}
7070
QUERY;
7171
$response = $this->graphQlQuery($query);
@@ -96,12 +96,12 @@ public function testProductWithSmallImage()
9696
label
9797
}
9898
}
99-
}
99+
}
100100
}
101101
QUERY;
102102
$response = $this->graphQlQuery($query);
103103

104-
self::assertContains('magento_image.jpg', $response['products']['items'][0]['small_image']['url']);
104+
self::assertStringContainsString('magento_image.jpg', $response['products']['items'][0]['small_image']['url']);
105105
self::assertTrue($this->checkImageExists($response['products']['items'][0]['small_image']['url']));
106106
self::assertEquals('Image Alt Text', $response['products']['items'][0]['small_image']['label']);
107107
}
@@ -121,12 +121,12 @@ public function testProductWithThumbnail()
121121
label
122122
}
123123
}
124-
}
124+
}
125125
}
126126
QUERY;
127127
$response = $this->graphQlQuery($query);
128128

129-
self::assertContains('magento_image.jpg', $response['products']['items'][0]['thumbnail']['url']);
129+
self::assertStringContainsString('magento_image.jpg', $response['products']['items'][0]['thumbnail']['url']);
130130
self::assertTrue($this->checkImageExists($response['products']['items'][0]['thumbnail']['url']));
131131
self::assertEquals('Image Alt Text', $response['products']['items'][0]['thumbnail']['label']);
132132
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductSearchAggregationsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ function ($a) {
5959
$booleanAggregation = reset($booleanAggregation);
6060
$this->assertEquals('Boolean Attribute', $booleanAggregation['label']);
6161
$this->assertEquals('boolean_attribute', $booleanAggregation['attribute_code']);
62-
$this->assertContains(['label' => '1', 'value'=> '1', 'count' => '3'], $booleanAggregation['options']);
62+
$this->assertContainsEquals(['label' => '1', 'value'=> '1', 'count' => '3'], $booleanAggregation['options']);
6363

6464
$this->markTestIncomplete('MC-22184: Elasticsearch returns incorrect aggregation options for booleans');
6565
$this->assertEquals(2, $booleanAggregation['count']);
6666
$this->assertCount(2, $booleanAggregation['options']);
67-
$this->assertContains(['label' => '0', 'value'=> '0', 'count' => '2'], $booleanAggregation['options']);
67+
$this->assertContainsEquals(['label' => '0', 'value'=> '0', 'count' => '2'], $booleanAggregation['options']);
6868
}
6969

7070
/**

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductTextAttributesTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ public function testHtmlDirectivesRendering()
134134
QUERY;
135135
$response = $this->graphQlQuery($query);
136136

137-
self::assertContains($assertionCmsBlockText, $response['products']['items'][0]['description']['html']);
138-
self::assertNotContains('{{block id', $response['products']['items'][0]['description']['html']);
139-
self::assertContains($assertionCmsBlockText, $response['products']['items'][0]['short_description']['html']);
140-
self::assertNotContains('{{block id', $response['products']['items'][0]['short_description']['html']);
137+
self::assertStringContainsString($assertionCmsBlockText, $response['products']['items'][0]['description']['html']);
138+
self::assertStringNotContainsString('{{block id', $response['products']['items'][0]['description']['html']);
139+
self::assertStringContainsString($assertionCmsBlockText, $response['products']['items'][0]['short_description']['html']);
140+
self::assertStringNotContainsString('{{block id', $response['products']['items'][0]['short_description']['html']);
141141
}
142142
}

0 commit comments

Comments
 (0)