mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -04:00
Add Safe PHP functions
This commit is contained in:
parent
04a956886a
commit
58cc098058
260 changed files with 49458 additions and 45 deletions
28
vendor/thecodingmachine/safe/generator/tests/DocPageTest.php
vendored
Normal file
28
vendor/thecodingmachine/safe/generator/tests/DocPageTest.php
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class DocPageTest extends TestCase
|
||||
{
|
||||
public function testDetectFalsyFunction() {
|
||||
$pregMatch = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/pcre/functions/preg-match.xml');
|
||||
$implode = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/strings/functions/implode.xml');
|
||||
$getCwd = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/dir/functions/getcwd.xml');
|
||||
$setTime = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/datetime/datetime/settime.xml');
|
||||
$filesize = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/filesystem/functions/filesize.xml');
|
||||
$sessionRegister = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/session/functions/session-register.xml');
|
||||
$mcryptDecrypt = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/mcrypt/functions/mcrypt-decrypt.xml');
|
||||
$fsockopen = new DocPage(__DIR__ . '/../doc/doc-en/en/reference/network/functions/fsockopen.xml');
|
||||
|
||||
$this->assertTrue($pregMatch->detectFalsyFunction());
|
||||
$this->assertFalse($implode->detectFalsyFunction());
|
||||
$this->assertTrue($getCwd->detectFalsyFunction());
|
||||
$this->assertTrue($setTime->detectFalsyFunction());
|
||||
$this->assertTrue($filesize->detectFalsyFunction());
|
||||
$this->assertFalse($sessionRegister->detectFalsyFunction());
|
||||
$this->assertTrue($mcryptDecrypt->detectFalsyFunction());
|
||||
$this->assertTrue($fsockopen->detectFalsyFunction());
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue