-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'mainline/develop' into MAGETWO-35406
- Loading branch information
Showing
93 changed files
with
1,926 additions
and
1,667 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\Contact\Block; | ||
|
||
use Magento\Framework\View\Element\Template; | ||
|
||
/** | ||
* Main contact form block | ||
*/ | ||
class ContactForm extends Template | ||
{ | ||
/** | ||
* @param Template\Context $context | ||
* @param array $data | ||
*/ | ||
public function __construct(Template\Context $context, array $data = []) | ||
{ | ||
parent::__construct($context, $data); | ||
$this->_isScopePrivate = true; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
app/code/Magento/Contact/Test/Unit/Block/ContactFormTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* Copyright © 2015 Magento. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
namespace Magento\Contact\Test\Unit\Block; | ||
|
||
use Magento\Contact\Block\ContactForm; | ||
|
||
class ContactFormTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @var \Magento\Contact\Block\ContactForm | ||
*/ | ||
protected $contactForm; | ||
|
||
/** | ||
* @var \Magento\Framework\View\Element\Template\Context|\PHPUnit_Framework_MockObject_MockObject | ||
*/ | ||
protected $contextMock; | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
protected function setUp() | ||
{ | ||
$this->contextMock = $this->getMockBuilder('Magento\Framework\View\Element\Template\Context') | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
$this->contactForm = new ContactForm( | ||
$this->contextMock | ||
); | ||
} | ||
|
||
/** | ||
* @return void | ||
*/ | ||
public function testScope() | ||
{ | ||
$this->assertTrue($this->contactForm->isScopePrivate()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.