Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3749775
D2485.id6264.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D2485.id6264.diff
View Options
diff --git a/composer.json b/composer.json
--- a/composer.json
+++ b/composer.json
@@ -20,8 +20,8 @@
},
"require-dev": {
"nasqueron/codestyle": "^0.0.1",
- "phan/phan": "^2.4",
- "phpunit/phpunit": "^7.5",
- "squizlabs/php_codesniffer": "^3.5"
+ "phan/phan": "^5.3.1",
+ "phpunit/phpunit": "^9.5",
+ "squizlabs/php_codesniffer": "^3.6"
}
}
diff --git a/phpunit.xml b/phpunit.xml
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<phpunit bootstrap="vendor/autoload.php"
+<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
+ bootstrap="vendor/autoload.php"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
@@ -14,9 +16,9 @@
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
- <filter>
- <whitelist processUncoveredFilesFromWhitelist="true">
+ <coverage processUncoveredFiles="true">
+ <include>
<directory suffix=".php">src/</directory>
- </whitelist>
- </filter>
+ </include>
+ </coverage>
</phpunit>
diff --git a/tests/Identifiers/RandomTest.php b/tests/Identifiers/RandomTest.php
--- a/tests/Identifiers/RandomTest.php
+++ b/tests/Identifiers/RandomTest.php
@@ -20,7 +20,7 @@
"$hash size must be 32 characters"
);
- $this->assertRegExp("/[0-9a-f]{32}/", $hash);
+ $this->assertMatchesRegularExpression("/[0-9a-f]{32}/", $hash);
}
public function testHexadecimalHashesAreUnique() : void {
@@ -37,14 +37,14 @@
$string = Random::generateString($format);
$this->assertEquals($len, strlen($format));
- $this->assertRegExp($re, $string);
+ $this->assertMatchesRegularExpression($re, $string);
}
public function testGenerateIdentifier() : void {
$identifier = Random::generateIdentifier(20);
$this->assertEquals(27, strlen($identifier));
- $this->assertRegExp("/^[A-Z0-9\-_]*$/i", $identifier);
+ $this->assertMatchesRegularExpression("/^[A-Z0-9\-_]*$/i", $identifier);
}
///
diff --git a/tests/Identifiers/UUIDTest.php b/tests/Identifiers/UUIDTest.php
--- a/tests/Identifiers/UUIDTest.php
+++ b/tests/Identifiers/UUIDTest.php
@@ -17,7 +17,7 @@
);
$re = "/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/";
- $this->assertRegExp($re, $uuid);
+ $this->assertMatchesRegularExpression($re, $uuid);
}
public function testUUIDv4WithoutHyphens () : void {
@@ -29,7 +29,7 @@
);
$re = "/[0-9a-f]/";
- $this->assertRegExp($re, $uuid);
+ $this->assertMatchesRegularExpression($re, $uuid);
}
public function testUUIDv4AreUnique () : void {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 17, 17:46 (21 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2249567
Default Alt Text
D2485.id6264.diff (2 KB)
Attached To
Mode
D2485: Bump phpunit, phan and phpcs versions
Attached
Detach File
Event Timeline
Log In to Comment