diff --git a/dev/tests/integration/testsuite/Magento/Customer/Model/SessionTest.php b/dev/tests/integration/testsuite/Magento/Customer/Model/SessionTest.php index dfa0f22136dac..40955bf60524b 100644 --- a/dev/tests/integration/testsuite/Magento/Customer/Model/SessionTest.php +++ b/dev/tests/integration/testsuite/Magento/Customer/Model/SessionTest.php @@ -21,7 +21,7 @@ class SessionTest extends \PHPUnit\Framework\TestCase /** * Session ID in query param */ - const SESSION_ID_QUERY_PARAM = 'SID'; + private const SESSION_ID_QUERY_PARAM = 'SID'; /** * @var \Magento\Customer\Model\Session diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php index fdc1b2c9c4518..bc4434205883b 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Element/AbstractBlockTest.php @@ -18,7 +18,7 @@ class AbstractBlockTest extends \PHPUnit\Framework\TestCase /** * Session ID in query param */ - const SESSION_ID_QUERY_PARAM = 'SID'; + private const SESSION_ID_QUERY_PARAM = 'SID'; /** * @var AbstractBlock diff --git a/dev/tests/integration/testsuite/Magento/Store/Controller/Store/RedirectTest.php b/dev/tests/integration/testsuite/Magento/Store/Controller/Store/RedirectTest.php index 8b333cda5c232..237a62aefc915 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Controller/Store/RedirectTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Controller/Store/RedirectTest.php @@ -25,7 +25,7 @@ class RedirectTest extends AbstractController /** * Session ID in query param */ - const SESSION_ID_QUERY_PARAM = 'SID'; + private const SESSION_ID_QUERY_PARAM = 'SID'; /** * @var RedirectDataPreprocessorInterface diff --git a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php index c0eb35b3779e8..433c70d2cdbf0 100644 --- a/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php +++ b/dev/tests/integration/testsuite/Magento/Store/Model/StoreTest.php @@ -22,9 +22,9 @@ class StoreTest extends \PHPUnit\Framework\TestCase { /** - * Session ID in query param + * Test ID in query param */ - const SESSION_ID_QUERY_PARAM = 'SID'; + private const TEST_ID_QUERY_PARAM = 'TID'; /** * @var array @@ -308,11 +308,11 @@ public function testGetCurrentUrl() $this->model ->expects($this->any())->method('getUrl') - ->willReturn('http://localhost/index.php?' . self::SESSION_ID_QUERY_PARAM . '=12345'); - $this->request->setParams([self::SESSION_ID_QUERY_PARAM, '12345']); - $this->request->setQueryValue(self::SESSION_ID_QUERY_PARAM, '12345'); + ->willReturn('http://localhost/index.php?' . self::TEST_ID_QUERY_PARAM . '=12345'); + $this->request->setParams([self::TEST_ID_QUERY_PARAM, '12345']); + $this->request->setQueryValue(self::TEST_ID_QUERY_PARAM, '12345'); $this->assertStringContainsString( - self::SESSION_ID_QUERY_PARAM . '=12345', + self::TEST_ID_QUERY_PARAM . '=12345', $this->model->getCurrentUrl() ); @@ -330,11 +330,11 @@ public function testGetCurrentUrl() $url ); $this->assertEquals( - $secondStore->getBaseUrl() . '?SID=12345&___from_store=default', + $secondStore->getBaseUrl() . '?' . self::TEST_ID_QUERY_PARAM . '=12345&___from_store=default', $secondStore->getCurrentUrl() ); $this->assertEquals( - $secondStore->getBaseUrl() . '?SID=12345', + $secondStore->getBaseUrl() . '?' . self::TEST_ID_QUERY_PARAM . '=12345', $secondStore->getCurrentUrl(false) ); } diff --git a/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php b/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php index 9abde2b96087a..9a81d2b8e3950 100644 --- a/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php +++ b/lib/internal/Magento/Framework/View/Element/UiComponentFactory.php @@ -31,12 +31,12 @@ class UiComponentFactory extends DataObject /** * The key arguments in the data component */ - const COMPONENT_ARGUMENTS_KEY = 'arguments'; + private const COMPONENT_ARGUMENTS_KEY = 'arguments'; /** * The key attributes in the data component */ - const COMPONENT_ATTRIBUTES_KEY = 'attributes'; + private const COMPONENT_ATTRIBUTES_KEY = 'attributes'; /** * Object manager diff --git a/lib/internal/Magento/Framework/View/Test/Unit/UiComponent/Factory/HtmlContentFactoryTest.php b/lib/internal/Magento/Framework/View/Test/Unit/UiComponent/Factory/HtmlContentFactoryTest.php index 9f89dd4116424..f236d5dee96bc 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/UiComponent/Factory/HtmlContentFactoryTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/UiComponent/Factory/HtmlContentFactoryTest.php @@ -10,13 +10,17 @@ use Magento\Framework\View\Element\AbstractBlock; use Magento\Framework\View\Element\UiComponent\ContextInterface; use Magento\Framework\View\Element\UiComponent\Factory\HtmlContentFactory; -use Magento\Framework\View\Element\UiComponentFactory; use Magento\Framework\View\Layout; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; class HtmlContentFactoryTest extends TestCase { + /** + * The key arguments in the data component + */ + private const COMPONENT_ARGUMENTS_KEY = 'arguments'; + /** * @var Layout|MockObject */ @@ -55,7 +59,7 @@ protected function setUp(): void public function testCreate() { $blockName = 'blockName'; - $bundleComponents[UiComponentFactory::COMPONENT_ARGUMENTS_KEY]['block']['name'] = $blockName; + $bundleComponents[self::COMPONENT_ARGUMENTS_KEY]['block']['name'] = $blockName; $this->layout->expects($this->once()) ->method('getBlock') ->with($blockName) @@ -71,6 +75,6 @@ public function testCreate() ] ) ); - $this->assertEquals($this->block, $bundleComponents[UiComponentFactory::COMPONENT_ARGUMENTS_KEY]['block']); + $this->assertEquals($this->block, $bundleComponents[self::COMPONENT_ARGUMENTS_KEY]['block']); } }