PropertyGroupTest.php 840 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\View\Test\Unit\Asset;
  7. class PropertyGroupTest extends \PHPUnit\Framework\TestCase
  8. {
  9. /**
  10. * @var \Magento\Framework\View\Asset\PropertyGroup
  11. */
  12. protected $_object;
  13. protected function setUp()
  14. {
  15. $this->_object = new \Magento\Framework\View\Asset\PropertyGroup(['test_property' => 'test_value']);
  16. }
  17. public function testGetProperties()
  18. {
  19. $this->assertEquals(['test_property' => 'test_value'], $this->_object->getProperties());
  20. }
  21. public function testGetProperty()
  22. {
  23. $this->assertEquals('test_value', $this->_object->getProperty('test_property'));
  24. $this->assertNull($this->_object->getProperty('non_existing_property'));
  25. }
  26. }