Page MenuHomeDevCentral

D87.id204.diff
No OneTemporary

D87.id204.diff

diff --git a/tests/coreTest.php b/tests/coreTest.php
--- a/tests/coreTest.php
+++ b/tests/coreTest.php
@@ -10,6 +10,9 @@
/// Strings
///
+ /**
+ * @covers ::mb_str_pad
+ */
function test_mb_str_pad () {
// Tests from http://3v4l.org/UnXTF
// http://web.archive.org/web/20150711100913/http://3v4l.org/UnXTF
@@ -42,6 +45,9 @@
$this->assertEquals('FOOBAR', mb_str_pad("FOOBAR", -10, "àèò", STR_PAD_RIGHT, "UTF-8"));
}
+ /**
+ * @covers ::is_ip
+ */
function test_is_ip () {
$this->assertTrue(is_ip("0.0.0.0"));
$this->assertFalse(is_ip(""));
@@ -52,6 +58,9 @@
$this->assertTrue(is_ip("fe80:0000:0000:0000:0204:61ff:fe9d:f156"));
}
+ /**
+ * @covers ::is_ipv4
+ */
function test_is_ipv4 () {
$this->assertTrue(is_ipv4("0.0.0.0"));
$this->assertFalse(is_ipv4(""));
@@ -63,6 +72,9 @@
$this->assertFalse(is_ipv4("fe80:0000:0000:0000:0204:61ff:fe9d:f156"));
}
+ /**
+ * @covers ::is_ipv6
+ */
function test_is_ipv6 () {
$this->assertFalse(is_ipv6("0.0.0.0"));
$this->assertFalse(is_ipv6(""));
@@ -86,6 +98,9 @@
/// Identifiers
///
+ /**
+ * @covers ::uuid
+ */
function test_uuid () {
$uuid = uuid();
$this->assertEquals(36, strlen($uuid));
@@ -103,6 +118,9 @@
/// Client information
///
+ /**
+ * @covers ::extract_client_ip_from_header
+ */
function test_extract_client_ip_from_header () {
$values = [
//Each value should return 10.0.0.3
@@ -123,6 +141,9 @@
);
}
+ /**
+ * @covers ::get_remote_addr
+ */
function test_get_remote_addr () {
$this->assertEmpty(get_remote_addr());

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 07:29 (22 h, 1 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2264062
Default Alt Text
D87.id204.diff (1 KB)

Event Timeline