Skip to content

Commit

Permalink
Merge pull request magento#3561 from magento-engcom/MAGETWO-96760
Browse files Browse the repository at this point in the history
Fixed issues:
- ENGCOM-3395 Allure Unit Tests Integration
- MAGETWO-96760 Jenkins Builds Result Unification. Part 1
- MAGETWO-96882 Jenkins Builds Result Unification. Part 2
- MAGETWO-97250 Revert Allure Adapters workarounds
  • Loading branch information
slavvka authored Dec 23, 2018
2 parents 93df863 + 57e8b7f commit c4fb1ee
Show file tree
Hide file tree
Showing 21 changed files with 850 additions and 210 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@
use Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface;
use Magento\ConfigurableProduct\Model\Product\Type\Collection\SalableProcessor;
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
use Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute;
use Magento\ConfigurableProduct\Model\Product\Type\Configurable\AttributeFactory;
use Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Attribute\Collection;
use Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Attribute\CollectionFactory;
use Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Product\Collection as ProductCollection;
use Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Product\CollectionFactory
as ProductCollectionFactory;
use Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\ConfigurableFactory;
use Magento\Customer\Model\Session;
use Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend;
Expand All @@ -27,7 +30,6 @@
* @SuppressWarnings(PHPMD.LongVariable)
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
* @SuppressWarnings(PHPMD.TooManyFields)
* @codingStandardsIgnoreFile
*/
class ConfigurableTest extends \PHPUnit\Framework\TestCase
{
Expand Down Expand Up @@ -154,8 +156,7 @@ protected function setUp()
->disableOriginalConstructor()
->setMethods(['create'])
->getMock();
$this->productCollectionFactory = $this->getMockBuilder(
\Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Product\CollectionFactory::class)
$this->productCollectionFactory = $this->getMockBuilder(ProductCollectionFactory::class)
->disableOriginalConstructor()
->setMethods(['create'])
->getMock();
Expand Down Expand Up @@ -281,8 +282,7 @@ public function testSave()
$product->expects($this->atLeastOnce())
->method('getData')
->willReturnMap($dataMap);
$attribute = $this->getMockBuilder(
\Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute::class)
$attribute = $this->getMockBuilder(Attribute::class)
->disableOriginalConstructor()
->setMethods(['addData', 'setStoreId', 'setProductId', 'save', '__wakeup', '__sleep'])
->getMock();
Expand Down Expand Up @@ -464,8 +464,7 @@ public function testGetConfigurableAttributesAsArray($productStore)
$eavAttribute->expects($this->once())->method('getSource')->willReturn($attributeSource);
$eavAttribute->expects($this->atLeastOnce())->method('getStoreLabel')->willReturn('Store Label');

$attribute = $this->getMockBuilder(
\Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute::class)
$attribute = $this->getMockBuilder(Attribute::class)
->disableOriginalConstructor()
->setMethods(['getProductAttribute', '__wakeup', '__sleep'])
->getMock();
Expand Down Expand Up @@ -524,7 +523,7 @@ public function testGetConfigurableAttributesNewProduct()
$this->assertEquals([], $this->model->getConfigurableAttributes($product));
}

public function testGetConfigurableAttributes()
public function testGetConfigurableAttributes()
{
$configurableAttributes = '_cache_instance_configurable_attributes';

Expand Down Expand Up @@ -591,8 +590,7 @@ public function testHasOptionsConfigurableAttribute()
->setMethods(['__wakeup', 'getAttributeCode', 'getOptions', 'hasData', 'getData'])
->disableOriginalConstructor()
->getMock();
$attributeMock = $this->getMockBuilder(
\Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute::class)
$attributeMock = $this->getMockBuilder(Attribute::class)
->disableOriginalConstructor()
->getMock();

Expand Down Expand Up @@ -698,7 +696,7 @@ function ($value) {
->disableOriginalConstructor()
->getMock();
$usedAttributeMock = $this->getMockBuilder(
\Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute::class
Attribute::class
)
->setMethods(['getProductAttribute'])
->disableOriginalConstructor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function testSalesOrderBeforeSaveSetForced()
* The method should check that the payment is available, as this is not always the case.
*
* @expectedException \Magento\Framework\Exception\LocalizedException
* @exceptedExceptionMessage Please provide payment for the order.
* @expectedExceptionMessage Please provide payment for the order.
*/
public function testDoesNothingWhenNoPaymentIsAvailable()
{
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.13.0",
"lusitanian/oauth": "~0.8.10",
"magento/magento2-functional-testing-framework": "2.3.11",
"magento/magento2-functional-testing-framework": "~2.3.12",
"pdepend/pdepend": "2.5.2",
"phpmd/phpmd": "@stable",
"phpunit/phpunit": "~6.5.0",
"sebastian/phpcpd": "~3.0.0",
"squizlabs/php_codesniffer": "3.3.1"
"squizlabs/php_codesniffer": "3.3.1",
"allure-framework/allure-phpunit": "~1.2.0"
},
"suggest": {
"ext-pcntl": "Need for run processes in parallel mode"
Expand Down
Loading

0 comments on commit c4fb1ee

Please sign in to comment.