Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.2-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - #13698: [Travis Test Fix] Add MagentoStyle as Console Input/output (by @magento-engcom-team)
 - #13663: Refactoring: remove unuseful temporary variable (by @real34)
  • Loading branch information
magento-engcom-team authored Feb 16, 2018
2 parents 3cf5c24 + a1f36b5 commit 9d9a6c3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ public function execute()
return $resultRedirect->setPath('catalog/*/', ['_current' => true, 'id' => null]);
}

$data['general'] = $this->getRequest()->getPostValue();
$categoryPostData = $data['general'];
$categoryPostData = $this->getRequest()->getPostValue();

$isNewCategory = !isset($categoryPostData['entity_id']);
$categoryPostData = $this->stringToBoolConverting($categoryPostData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ public function testBlockStyle()
);
// @codingStandardsIgnoreStart
$expected = PHP_EOL . PHP_EOL . PHP_EOL .
'<testBlockStyle>testBlockPrefix[testBlockType] test first message '
. PHP_EOL . '<testBlockStyle>testBlockPrefix '
. PHP_EOL . '<testBlockStyle>testBlockPrefix test second message '
'\<testBlockStyle\>testBlockPrefix\[testBlockType\] test first message\s+'
. PHP_EOL . '\<testBlockStyle\>testBlockPrefix\s+'
. PHP_EOL . '\<testBlockStyle\>testBlockPrefix \s+ test second message\s+'
. PHP_EOL . PHP_EOL;
// @codingStandardsIgnoreEnd
$this->assertEquals($expected, $this->testOutput->output, 'Block does not match output');
$this->assertRegExp('/' . $expected . '/', $this->testOutput->output, 'Block does not match output');
}

/**
Expand All @@ -79,7 +79,6 @@ public function testTitleStyle()
{
$this->magentoStyle->title('My Title');
$expected = PHP_EOL . PHP_EOL . PHP_EOL . ' My Title' . PHP_EOL . ' ========' . PHP_EOL . PHP_EOL;

$this->assertEquals($expected, $this->testOutput->output, 'Title does not match output');
}

Expand All @@ -92,7 +91,6 @@ public function testSectionStyle()
{
$this->magentoStyle->section('My Section');
$expected = PHP_EOL . PHP_EOL . PHP_EOL . ' My Section' . PHP_EOL . ' ----------' . PHP_EOL . PHP_EOL;

$this->assertEquals($expected, $this->testOutput->output, 'Section does not match output');
}

Expand All @@ -105,7 +103,6 @@ public function testListingStyle()
{
$this->magentoStyle->listing(['test first element', 'test second element']);
$expected = PHP_EOL . ' * test first element' . PHP_EOL . ' * test second element' . PHP_EOL . PHP_EOL;

$this->assertEquals($expected, $this->testOutput->output, 'Listing does not match output');
}

Expand All @@ -130,13 +127,8 @@ public function testTextStyle()
public function testCommentStyle()
{
$this->magentoStyle->comment('test comment');
// @codingStandardsIgnoreStart
$expected = PHP_EOL . PHP_EOL . PHP_EOL .
' test comment '
. PHP_EOL . PHP_EOL;
// @codingStandardsIgnoreEnd

$this->assertEquals($expected, $this->testOutput->output, 'Comment does not match output');
$expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+test comment\s+' . PHP_EOL . PHP_EOL;
$this->assertRegExp('/' . $expected . '/', $this->testOutput->output, 'Comment does not match output');
}

/**
Expand All @@ -147,13 +139,8 @@ public function testCommentStyle()
public function testSuccessStyle()
{
$this->magentoStyle->success('test success message');
// @codingStandardsIgnoreStart
$expected = PHP_EOL . PHP_EOL . PHP_EOL .
' [SUCCESS] test success message '
. PHP_EOL . PHP_EOL;
// @codingStandardsIgnoreEnd

$this->assertEquals($expected, $this->testOutput->output, 'Success message does not match output');
$expected = PHP_EOL . PHP_EOL . PHP_EOL . ' \[SUCCESS\] test success message\s+' . PHP_EOL . PHP_EOL;
$this->assertRegExp('/' . $expected . '/', $this->testOutput->output, 'Success message does not match output');
}

/**
Expand All @@ -164,13 +151,8 @@ public function testSuccessStyle()
public function testErrorStyle()
{
$this->magentoStyle->error('test error message');
// @codingStandardsIgnoreStart
$expected = PHP_EOL . PHP_EOL . PHP_EOL .
' [ERROR] test error message '
. PHP_EOL . PHP_EOL;
// @codingStandardsIgnoreEnd

$this->assertEquals($expected, $this->testOutput->output, 'Error message does not match output');
$expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+\[ERROR\] test error message\s+' . PHP_EOL . PHP_EOL;
$this->assertRegExp('/' . $expected . '/', $this->testOutput->output, 'Error message does not match output');
}

/**
Expand All @@ -181,13 +163,8 @@ public function testErrorStyle()
public function testWarningStyle()
{
$this->magentoStyle->warning('test warning message');
// @codingStandardsIgnoreStart
$expected = PHP_EOL . PHP_EOL . PHP_EOL .
' [WARNING] test warning message '
. PHP_EOL . PHP_EOL;
// @codingStandardsIgnoreEnd

$this->assertEquals($expected, $this->testOutput->output, 'Warning message does not match output');
$expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+\[WARNING\] test warning message\s+' . PHP_EOL . PHP_EOL;
$this->assertRegExp('/' . $expected . '/', $this->testOutput->output, 'Warning message does not match output');
}

/**
Expand All @@ -198,13 +175,8 @@ public function testWarningStyle()
public function testNoteStyle()
{
$this->magentoStyle->note('test note message');
// @codingStandardsIgnoreStart
$expected = PHP_EOL . PHP_EOL . PHP_EOL .
' [NOTE] test note message '
. PHP_EOL . PHP_EOL;
// @codingStandardsIgnoreEnd

$this->assertEquals($expected, $this->testOutput->output, 'Note message does not match output');
$expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+\[NOTE\] test note message\s+' . PHP_EOL . PHP_EOL;
$this->assertRegExp('/' . $expected . '/', $this->testOutput->output, 'Note message does not match output');
}

/**
Expand All @@ -215,13 +187,8 @@ public function testNoteStyle()
public function testCautionStyle()
{
$this->magentoStyle->caution('test caution message');
// @codingStandardsIgnoreStart
$expected = PHP_EOL . PHP_EOL . PHP_EOL .
' ! [CAUTION] test caution message '
. PHP_EOL . PHP_EOL;
// @codingStandardsIgnoreEnd

$this->assertEquals($expected, $this->testOutput->output, 'Caution message does not match output');
$expected = PHP_EOL . PHP_EOL . PHP_EOL . '\s+! \[CAUTION\] test caution message\s+' . PHP_EOL . PHP_EOL;
$this->assertRegExp('/' . $expected . '/', $this->testOutput->output, 'Caution message does not match output');
}

/**
Expand Down

0 comments on commit 9d9a6c3

Please sign in to comment.