ValidatorFactoryTest.php 929 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Integration test for Magento\Framework\ValidatorFactory
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework;
  9. class ValidatorFactoryTest extends \PHPUnit\Framework\TestCase
  10. {
  11. /** @var \Magento\Framework\ValidatorFactory */
  12. private $model;
  13. public function setUp()
  14. {
  15. $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
  16. $this->model = $objectManager->create(\Magento\Framework\ValidatorFactory::class);
  17. }
  18. public function testCreateWithInstanceName()
  19. {
  20. $setName = \Magento\Framework\DataObject::class;
  21. $this->assertInstanceOf($setName, $this->model->create([], $setName));
  22. }
  23. public function testCreateDefault()
  24. {
  25. $default = \Magento\Framework\Validator::class;
  26. $this->assertInstanceOf($default, $this->model->create());
  27. }
  28. }