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


PHP PHPUnit_Util_XML::loadFile方法代码示例

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


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

示例1: testGenerateClover

 /**
  * @dataProvider getReporterProvider
  *
  * @param string[] $coverageFiles
  */
 public function testGenerateClover(array $coverageFiles)
 {
     $filename1 = $this->copyCoverageFile($coverageFiles[0], $this->targetDir);
     $filename2 = $this->copyCoverageFile($coverageFiles[1], $this->targetDir);
     $coverageMerger = new CoverageMerger();
     $coverageMerger->addCoverageFromFile($filename1);
     $coverageMerger->addCoverageFromFile($filename2);
     $target = $this->targetDir . '/coverage.xml';
     static::assertFileNotExists($target);
     $coverageMerger->getReporter()->clover($target);
     static::assertFileExists($target);
     $reportXml = \PHPUnit_Util_XML::loadFile($target);
     static::assertInstanceOf('DomDocument', $reportXml, 'Incorrect clover report xml was generated');
 }
开发者ID:brianium,项目名称:paratest,代码行数:19,代码来源:CoverageReporterTest.php

示例2: __construct

 /**
  * Loads a PHPUnit configuration file.
  *
  * @param  string $filename
  */
 protected function __construct($filename)
 {
     $this->filename = $filename;
     $this->document = PHPUnit_Util_XML::loadFile($filename);
     $this->xpath    = new DOMXPath($this->document);
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:11,代码来源:Configuration.php

示例3: runSelenese

 /**
  * Runs a test from a Selenese (HTML) specification.
  *
  * @param string $filename
  */
 public function runSelenese($filename)
 {
     $document = PHPUnit_Util_XML::loadFile($filename, TRUE);
     $xpath = new DOMXPath($document);
     $rows = $xpath->query('body/table/tbody/tr');
     foreach ($rows as $row) {
         $action = NULL;
         $arguments = array();
         $columns = $xpath->query('td', $row);
         foreach ($columns as $column) {
             if ($action === NULL) {
                 $action = PHPUnit_Util_XML::nodeToText($column);
             } else {
                 $arguments[] = PHPUnit_Util_XML::nodeToText($column);
             }
         }
         if (method_exists($this, $action)) {
             call_user_func_array(array($this, $action), $arguments);
         } else {
             $this->__call($action, $arguments);
         }
     }
 }
开发者ID:ninodafonte,项目名称:SIFO,代码行数:28,代码来源:SeleniumTestCase.php

示例4: assertXmlStringNotEqualsXmlFile

 /**
  * Asserts that two XML documents are not equal.
  *
  * @param string $expectedFile
  * @param string $actualXml
  * @param string $message
  *
  * @since  Method available since Release 3.3.0
  */
 public static function assertXmlStringNotEqualsXmlFile($expectedFile, $actualXml, $message = '')
 {
     $expected = PHPUnit_Util_XML::loadFile($expectedFile);
     $actual = PHPUnit_Util_XML::load($actualXml);
     self::assertNotEquals($expected, $actual, $message);
 }
开发者ID:CHRISTOPHERVANDOMME,项目名称:zf2complet,代码行数:15,代码来源:Assert.php

示例5: loadFile

 /**
  * @param $filename
  * @param bool|false $isHtml
  * @param bool|false $xinclude
  * @param bool|false $strict
  *
  * @return \DOMDocument
  */
 public function loadFile($filename, $isHtml = false, $xinclude = false, $strict = false)
 {
     return \PHPUnit_Util_XML::loadFile($filename, $isHtml, $xinclude, $strict);
 }
开发者ID:facile-it,项目名称:paraunit,代码行数:12,代码来源:PHPUnitUtilXMLProxy.php

示例6: getStubbedXMLConf

 /**
  * @param string $fileName
  *
  * @return string
  *
  * @throws \Exception
  */
 private function getStubbedXMLConf($fileName)
 {
     $filePath = realpath($fileName);
     if (!file_exists($filePath)) {
         throw new \Exception('Stub XML config file missing: ' . $fileName);
     }
     return \PHPUnit_Util_XML::loadFile($filePath, false, true, true);
 }
开发者ID:Algatux,项目名称:paraunit,代码行数:15,代码来源:FilterTest.php


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