当前位置: 首页>>代码示例>>PHP>>正文


PHP UrnResolver::expects方法代码示例

本文整理汇总了PHP中Magento\Framework\Config\Dom\UrnResolver::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP UrnResolver::expects方法的具体用法?PHP UrnResolver::expects怎么用?PHP UrnResolver::expects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Framework\Config\Dom\UrnResolver的用法示例。


在下文中一共展示了UrnResolver::expects方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testGetSchemaFile

 public function testGetSchemaFile()
 {
     $config = new \Magento\Framework\Config\Theme($this->urnResolverMock, null);
     $this->urnResolverMock->expects($this->exactly(2))->method('getRealPath')->with('urn:magento:framework:Config/etc/theme.xsd')->willReturn($this->urnResolver->getRealPath('urn:magento:framework:Config/etc/theme.xsd'));
     $this->assertEquals($this->urnResolver->getRealPath('urn:magento:framework:Config/etc/theme.xsd'), $config->getSchemaFile());
     $this->assertFileExists($config->getSchemaFile());
 }
开发者ID:tingyeeh,项目名称:magento2,代码行数:7,代码来源:ThemeTest.php

示例2: setUp

 public function setUp()
 {
     $this->urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
     $this->urnResolverMock = $this->getMock('Magento\\Framework\\Config\\Dom\\UrnResolver', [], [], '', false);
     $this->urnResolverMock->expects($this->any())->method('getRealPath')->with('urn:magento:framework:App/Language/package.xsd')->willReturn($this->urnResolver->getRealPath('urn:magento:framework:App/Language/package.xsd'));
     $this->config = new Config(file_get_contents(__DIR__ . '/_files/language.xml'), $this->urnResolverMock);
 }
开发者ID:whoople,项目名称:magento2-testing,代码行数:7,代码来源:ConfigTest.php

示例3: setUp

 protected function setUp()
 {
     $this->urnResolver = new \Magento\Framework\Config\Dom\UrnResolver();
     $this->urnResolverMock = $this->getMock('Magento\\Framework\\Config\\Dom\\UrnResolver', [], [], '', false);
     $this->urnResolverMock->expects($this->any())->method('getRealPath')->with('urn:magento:framework:App/Language/package.xsd')->willReturn($this->urnResolver->getRealPath('urn:magento:framework:App/Language/package.xsd'));
     $validationStateMock = $this->getMock('\\Magento\\Framework\\Config\\ValidationStateInterface', [], [], '', false);
     $validationStateMock->method('isValidationRequired')->willReturn(true);
     $domFactoryMock = $this->getMock('Magento\\Framework\\Config\\DomFactory', [], [], '', false);
     $domFactoryMock->expects($this->once())->method('createDom')->willReturnCallback(function ($arguments) use($validationStateMock) {
         return new \Magento\Framework\Config\Dom($arguments['xml'], $validationStateMock, [], null, $arguments['schemaFile']);
     });
     $this->config = new Config(file_get_contents(__DIR__ . '/_files/language.xml'), $this->urnResolverMock, $domFactoryMock);
 }
开发者ID:Doability,项目名称:magento2dev,代码行数:13,代码来源:ConfigTest.php

示例4: testGetPerFileSchema

 public function testGetPerFileSchema()
 {
     $this->urnResolverMock->expects($this->once())->method('getRealPath')->with('urn:magento:framework:Search/etc/search_request.xsd')->willReturn($this->urnResolver->getRealPath('urn:magento:framework:Search/etc/search_request.xsd'));
     $this->assertEquals($this->urnResolver->getRealPath('urn:magento:framework:Search/etc/search_request.xsd'), $this->schemaLocator->getPerFileSchema());
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:5,代码来源:SchemaLocatorTest.php

示例5: testGetPerFileSchema

 public function testGetPerFileSchema()
 {
     $this->urnResolverMock->expects($this->once())->method('getRealPath')->with('urn:magento:framework:Indexer/etc/indexer.xsd')->willReturn($this->urnResolver->getRealPath('urn:magento:framework:Indexer/etc/indexer.xsd'));
     $this->assertEquals($this->urnResolver->getRealPath('urn:magento:framework:Indexer/etc/indexer.xsd'), $this->model->getPerFileSchema());
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:5,代码来源:SchemaLocatorTest.php

示例6: testGetPerFileSchema

 public function testGetPerFileSchema()
 {
     $this->urnResolverMock->expects($this->once())->method('getRealPath')->with('urn:magento:framework:App/etc/routes.xsd')->willReturn($this->urnResolver->getRealPath('urn:magento:framework:App/etc/routes.xsd'));
     $this->assertContains($this->urnResolver->getRealPath('urn:magento:framework:App/etc/routes.xsd'), $this->config->getPerFileSchema());
 }
开发者ID:pradeep-wagento,项目名称:magento2,代码行数:5,代码来源:SchemaLocatorTest.php

示例7: testGetSchema

 public function testGetSchema()
 {
     $this->urnResolverMock->expects($this->once())->method('getRealPath')->with('urn:magento:framework:ObjectManager/etc/config.xsd')->willReturn($this->urnResolver->getRealPath('urn:magento:framework:ObjectManager/etc/config.xsd'));
     $this->assertEquals($this->urnResolver->getRealPath('urn:magento:framework:ObjectManager/etc/config.xsd'), $this->model->getSchema());
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:5,代码来源:SchemaLocatorTest.php


注:本文中的Magento\Framework\Config\Dom\UrnResolver::expects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。