mirror of
https://github.com/PGYER/codefever.git
synced 2026-05-10 15:46:21 +08:00
22 lines
672 B
PHP
Executable File
22 lines
672 B
PHP
Executable File
<?php
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use service\Utility\Helper;
|
|
|
|
class ToJSONTest extends TestCase {
|
|
public function testToJSON()
|
|
{
|
|
$expected = '{sha:%H,log:%s,body:%b,email:%ae,time:%at}';
|
|
$actual = [
|
|
'sha' => '%H',
|
|
'log' => '%s',
|
|
'body' => '%b',
|
|
'email' => '%ae',
|
|
'time' => '%at'
|
|
];
|
|
|
|
$actual = Helper::toJSON($actual, '');
|
|
$this->assertSame($expected, $actual);
|
|
}
|
|
}
|