|
21 | 21 | use Magento\CatalogInventory\Api\StockItemRepositoryInterface;
|
22 | 22 | use Magento\CatalogInventory\Model\Stock\Item;
|
23 | 23 | use Magento\Directory\Helper\Data as DirectoryData;
|
| 24 | +use Magento\Framework\App\Area; |
24 | 25 | use Magento\Framework\App\Config\ReinitableConfigInterface;
|
25 | 26 | use Magento\Framework\App\Config\ScopeConfigInterface;
|
26 | 27 | use Magento\Framework\Exception\NoSuchEntityException;
|
@@ -998,4 +999,22 @@ public function testExportProductWithDateAndDatetimeAttributes(): void
|
998 | 999 | $this->assertMatchesRegularExpression('#datetime_attr=7/19/15,\p{Zs}3:30\p{Zs}AM#u', $csv);
|
999 | 1000 | $this->assertMatchesRegularExpression('#date_attr=2/7/17("|(,\w+=))#', $csv);
|
1000 | 1001 | }
|
| 1002 | + |
| 1003 | + #[ |
| 1004 | + AppArea(Area::AREA_ADMINHTML), |
| 1005 | + DataFixture( |
| 1006 | + AttributeFixture::class, |
| 1007 | + ['frontend_input' => 'boolean', 'backend_type' => 'int', 'attribute_code' => 'yesno_attr'] |
| 1008 | + ), |
| 1009 | + DataFixture(ProductFixture::class, ['sku' => 'prod1']), |
| 1010 | + DataFixture(ProductFixture::class, ['sku' => 'prod2', 'yesno_attr' => '0']), |
| 1011 | + DataFixture(ProductFixture::class, ['sku' => 'prod3', 'yesno_attr' => '1']), |
| 1012 | + ] |
| 1013 | + public function testExportProductWithYesNoAttribute(): void |
| 1014 | + { |
| 1015 | + $csv = $this->doExport(['yesno_attr' => '0']); |
| 1016 | + self::assertStringContainsString('prod2', $csv); |
| 1017 | + self::assertStringNotContainsString('prod1', $csv); |
| 1018 | + self::assertStringNotContainsString('prod3', $csv); |
| 1019 | + } |
1001 | 1020 | }
|
0 commit comments