Update TestNodeHierarchy to include a fuller FTN setup for testing. Update testing.

This commit is contained in:
2024-11-25 13:46:16 +11:00
parent 810e620526
commit 9c828d65e6
9 changed files with 548 additions and 373 deletions

View File

@@ -22,24 +22,28 @@ class File extends FileBase implements \Iterator
{
parent::__construct($path,$checkPath);
switch($x=$this->guessExtension()) {
case 'zip':
$this->canHandle = TRUE;
$this->isArchive = TRUE;
$this->z = new \ZipArchive;
$this->z->open($this->getRealPath());
break;
if ($this->getExtension() === 'pkt')
$this->canHandle = TRUE;
case NULL:
case 'bin':
if ($this->isPacket() || ($path instanceof UploadedFile && (strcasecmp($path->getClientOriginalExtension(),'pkt') === 0))) {
else
switch ($x=$this->guessExtension()) {
case 'zip':
$this->canHandle = TRUE;
$this->isArchive = TRUE;
$this->z = new \ZipArchive;
$this->z->open($this->getRealPath());
break;
}
default:
Log::alert(sprintf('%s:? Unknown file received: %s (%s) [%s]',self::LOGKEY,$x,$this->getExtension(),$path instanceof UploadedFile ? $path->getClientOriginalExtension() : '-'));
}
case NULL:
case 'bin':
if ($this->isPacket() || ($path instanceof UploadedFile && (strcasecmp($path->getClientOriginalExtension(),'pkt') === 0))) {
$this->canHandle = TRUE;
break;
}
default:
Log::alert(sprintf('%s:? Unknown file received: %s (%s) [%s]',self::LOGKEY,$x,$this->getExtension(),$path instanceof UploadedFile ? $path->getClientOriginalExtension() : '-'));
}
}
/* ITERATOR */