mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-24 16:29:18 +00:00
Update tests to work with PHPUnit 10
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Helper;
|
||||
|
||||
// Check interface exists to fix "Fatal error: Interface 'JsonSerializable' not found in ../tests/PHPCurlClass/User.php
|
||||
// on line X".
|
||||
if (interface_exists('JsonSerializable')) {
|
||||
class User implements \JsonSerializable
|
||||
{
|
||||
private $name;
|
||||
private $email;
|
||||
|
||||
public function __construct($name = null, $email = null)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->email = $email;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return [
|
||||
'name' => $this->name,
|
||||
'email' => $this->email,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user