Utility-Files.php
<?php
namespace Liaison\Test;
require_once(__DIR__.'/../../autoload.php');
class Files extends \Taeluf\Tester {
public function testRofEncodeDecode(){
$this->disable();
return false;
$src = [
'blm' => "Black Lives Matter",
"save.the.planet" => "We gotta stop global warming",
"ranked-choice.voting" => "Might help with the broken two-party system"
];
$actual = \Lia\Utility\Files::rofEncode($src);
$target = \Lia\Utility\Files::rofDecode($actual);
sort($src);
sort($target);
return true
&& $this->compare($src, $target)
;
}
public function testRofDecode(){
$this->disable();
return false;
$src =
<<<ROF
blm: Black Lives Matter
save.the.planet: We gotta stop global warming
ranked-choice.voting:
Might help with the broken two-party system
ROF;
$target = [
'blm' => "Black Lives Matter",
"ranked-choice.voting" => "Might help with the broken two-party system",
"save.the.planet" => "We gotta stop global warming",
];
$actual = \Lia\Utility\Files::rofDecode($src);
ksort($target);
ksort($actual);
return true
&& $this->compare($target,$actual)
;
}
public function testRecursiveFilesList(){
$this->disable();
}
}
Files::runAll();
// Files::runAllToFile(__FILE__.'.html');
// Files::xdotoolRefreshFirefox();