Skip to content

Commit

Permalink
Converted line ending of some files in order to avoid warnings from g…
Browse files Browse the repository at this point in the history
…it (#3368)
  • Loading branch information
fballiano committed Jul 10, 2023
1 parent 5ac1c17 commit d8bd81b
Show file tree
Hide file tree
Showing 159 changed files with 89,128 additions and 89,128 deletions.
104 changes: 52 additions & 52 deletions dev/tests/unit/Base/XmlFileLoadingTest.php
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
<?php
declare(strict_types=1);

namespace OpenMage\Tests\Unit\Base;

use PHPUnit\Framework\TestCase;

class XmlFileLoadingTest extends TestCase
{

public function provideXmlFiles(): array
{
$root = realpath(__DIR__ . '/../../../../') . '/';

$result = [];
$result[] = [
$root . 'vendor/shardj/zf1-future/library/Zend/Locale/Data/es_419.xml'
];

return $result;
}

/**
*
* @dataProvider provideXmlFiles
* @param $filepath
* @return void
*/
public function testFileLoading($filepath): void
{
//$simplexml = new \SimpleXMLElement(file_get_contents($filepath));
$simplexml = simplexml_load_file(
$filepath,
null,
LIBXML_PEDANTIC //not needed by OpenMage, but good to test more strictly
);
$this->assertNotEmpty($simplexml->asXML());
}

/**
*
* @dataProvider provideXmlFiles
* @param $filepath
* @return void
*/
public function testXmlReaderIsValid($filepath): void
{
$xml = \XMLReader::open($filepath);
$xml->setParserProperty(\XMLReader::VALIDATE, true);
$this->assertTrue($xml->isValid());
}
}
<?php
declare(strict_types=1);

namespace OpenMage\Tests\Unit\Base;

use PHPUnit\Framework\TestCase;

class XmlFileLoadingTest extends TestCase
{

public function provideXmlFiles(): array
{
$root = realpath(__DIR__ . '/../../../../') . '/';

$result = [];
$result[] = [
$root . 'vendor/shardj/zf1-future/library/Zend/Locale/Data/es_419.xml'
];

return $result;
}

/**
*
* @dataProvider provideXmlFiles
* @param $filepath
* @return void
*/
public function testFileLoading($filepath): void
{
//$simplexml = new \SimpleXMLElement(file_get_contents($filepath));
$simplexml = simplexml_load_file(
$filepath,
null,
LIBXML_PEDANTIC //not needed by OpenMage, but good to test more strictly
);
$this->assertNotEmpty($simplexml->asXML());
}

/**
*
* @dataProvider provideXmlFiles
* @param $filepath
* @return void
*/
public function testXmlReaderIsValid($filepath): void
{
$xml = \XMLReader::open($filepath);
$xml->setParserProperty(\XMLReader::VALIDATE, true);
$this->assertTrue($xml->isValid());
}
}
Loading

0 comments on commit d8bd81b

Please sign in to comment.