<commit_before><?php

namespace SnowIO\Test\Integration\Plugin;
use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Catalog\Model\Product\Attribute\Source\Status;
use Magento\Catalog\Model\Product\Type;
use Magento\Catalog\Model\Product\Visibility;
use Magento\Framework\Api\ExtensionAttributesFactory;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\ObjectManagerInterface;
use SnowIO\AttributeSetCode\Api\CodedAttributeSetRepositoryInterface;
use SnowIO\AttributeSetCode\Model\AttributeSetCodeRepository;

class ProductRepositoryPluginTest extends \PHPUnit_Framework_TestCase
{
    const ATTRIBUTE_SET_CODE = 'test-attribute-set';

    /** @var  ObjectManagerInterface */
    private $objectManager;
    /** @var ExtensionAttributesFactory extensionAttributeRepositoryFactory */
    private $extensionAttributeRepositoryFactory;
    /** @var  AttributeSetCodeRepository */
    private $attributeSetCodeRepository;
    /** @var ProductRepositoryInterface */
    private $productRepository;
    private $attributeSetId;

    public function setUp()
    {
        $this->objectManager = ObjectManager::getInstance();
        $this->attributeSetCodeRepository = $this->objectManager->get(AttributeSetCodeRepository::class);
        $this->extensionAttributeRepositoryFactory = $this->objectManager->get(ExtensionAttributesFactory::class);
        $this->productRepository = ObjectManager::getInstance()->get(ProductRepositoryInterface::class);
        $this->saveProductAttributeSet(self::ATTRIBUTE_SET_CODE);
        $this->attributeSetId = $this->getProductAttributeSetId(self::ATTRIBUTE_SET_CODE);
    }
<commit_msg>Make Plugin test extend TestCase (PHPUnit v4 and v6 compatibility)<commit_after><?php

namespace SnowIO\Test\Integration\Plugin;
use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Catalog\Model\Product\Attribute\Source\Status;
use Magento\Catalog\Model\Product\Type;
use Magento\Catalog\Model\Product\Visibility;
use Magento\Framework\Api\ExtensionAttributesFactory;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\ObjectManagerInterface;
use SnowIO\AttributeSetCode\Api\CodedAttributeSetRepositoryInterface;
use SnowIO\AttributeSetCode\Model\AttributeSetCodeRepository;
use SnowIO\AttributeSetCode\Test\TestCase;

class ProductRepositoryPluginTest extends TestCase
{
    const ATTRIBUTE_SET_CODE = 'test-attribute-set';

    /** @var  ObjectManagerInterface */
    private $objectManager;
    /** @var ExtensionAttributesFactory extensionAttributeRepositoryFactory */
    private $extensionAttributeRepositoryFactory;
    /** @var  AttributeSetCodeRepository */
    private $attributeSetCodeRepository;
    /** @var ProductRepositoryInterface */
    private $productRepository;
    private $attributeSetId;

    public function setUp()
    {
        $this->objectManager = ObjectManager::getInstance();
        $this->attributeSetCodeRepository = $this->objectManager->get(AttributeSetCodeRepository::class);
        $this->extensionAttributeRepositoryFactory = $this->objectManager->get(ExtensionAttributesFactory::class);
        $this->productRepository = ObjectManager::getInstance()->get(ProductRepositoryInterface::class);
        $this->saveProductAttributeSet(self::ATTRIBUTE_SET_CODE);
        $this->attributeSetId = $this->getProductAttributeSetId(self::ATTRIBUTE_SET_CODE);
    }

{'fraction_non_alphanumeric': 0.10019646365422397, 'fraction_numerical': 0.000561324726354196, 'mean_word_length': 5.88030888030888, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1787331', 'n_tokens_mistral': 903, 'n_tokens_neox': 912, 'n_words': 141}