mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
test fixes
This commit is contained in:
parent
45f64a09aa
commit
f3124aafdf
|
|
@ -29,7 +29,9 @@ class CronJob extends TaskAbstract
|
|||
*/
|
||||
public function __toString() : string
|
||||
{
|
||||
return $this->command . ' # name="' . $this->id . '" ' . $this->comment;
|
||||
return $this->id === '' || $this->command === ''
|
||||
? ''
|
||||
: $this->interval . ' ' . $this->command . ' # name="' . $this->id . '" ' . $this->comment;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -70,9 +70,9 @@ final class ArgumentTest extends \PHPUnit\Framework\TestCase
|
|||
$obj = new Argument(':modules/admin/test/path.php ?para1=abc ?para2=2 #frag');
|
||||
|
||||
self::assertEquals(':modules/admin/test/path.php', $obj->getPath());
|
||||
self::assertEquals('modules', $obj->getPathElement(0));
|
||||
self::assertEquals(':modules', $obj->getPathElement(0));
|
||||
self::assertEquals(
|
||||
['modules', 'admin', 'test', 'path'],
|
||||
[':modules', 'admin', 'test', 'path'],
|
||||
$obj->getPathElements()
|
||||
);
|
||||
}
|
||||
|
|
@ -184,7 +184,7 @@ final class ArgumentTest extends \PHPUnit\Framework\TestCase
|
|||
$obj = new Argument(':modules/admin/test/path.php ?para1=abc ?para2=2 #frag');
|
||||
|
||||
self::assertEquals('?para1=abc ?para2=2 #frag', $obj->getQuery());
|
||||
self::assertEquals(['para1' => 'abc', 'para2' => '2'], $obj->getQueryArray());
|
||||
self::assertEquals(['?para1=abc', '?para2=2', '#frag'], $obj->getQueryArray());
|
||||
self::assertEquals('2', $obj->getQuery('para2'));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user