mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Style fixes
This commit is contained in:
parent
b8ac646d22
commit
ad32bf3340
19 changed files with 40 additions and 40 deletions
|
@ -1,8 +1,10 @@
|
||||||
Version 0.9.3 (2021-??-??)
|
Version 0.10.0 (2021-??-??)
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
New features:
|
New features:
|
||||||
- Complete UNIX manual page
|
- Complete UNIX manual page
|
||||||
|
- Support for running service as a forking daemon
|
||||||
|
- Respond to TERM and HUP signals when possible
|
||||||
|
|
||||||
Version 0.9.2 (2021-05-25)
|
Version 0.9.2 (2021-05-25)
|
||||||
==========================
|
==========================
|
||||||
|
|
|
@ -34,6 +34,9 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"bamarni/composer-bin-plugin": "*"
|
"bamarni/composer-bin-plugin": "*"
|
||||||
},
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-pcntl": "To respond to signals, particular to reload configuration via SIGHUP"
|
||||||
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "7.1.33"
|
"php": "7.1.33"
|
||||||
|
|
|
@ -44,10 +44,12 @@ class Service {
|
||||||
if ($this->loop) {
|
if ($this->loop) {
|
||||||
do {
|
do {
|
||||||
sleep((int) max(0, $t->getTimestamp() - time()));
|
sleep((int) max(0, $t->getTimestamp() - time()));
|
||||||
|
if (function_exists("pcntl_signal_dispatch")) {
|
||||||
pcntl_signal_dispatch();
|
pcntl_signal_dispatch();
|
||||||
if ($this->reload) {
|
if ($this->reload) {
|
||||||
$this->reload();
|
$this->reload();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} while ($this->loop && $t->getTimestamp() > time());
|
} while ($this->loop && $t->getTimestamp() > time());
|
||||||
}
|
}
|
||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
|
|
|
@ -11,7 +11,6 @@ use JKingWeb\Arsse\Database;
|
||||||
use JKingWeb\Arsse\Test\Result;
|
use JKingWeb\Arsse\Test\Result;
|
||||||
use JKingWeb\Arsse\ImportExport\OPML;
|
use JKingWeb\Arsse\ImportExport\OPML;
|
||||||
use JKingWeb\Arsse\ImportExport\Exception;
|
use JKingWeb\Arsse\ImportExport\Exception;
|
||||||
use ReflectionMethod;
|
|
||||||
|
|
||||||
/** @covers \JKingWeb\Arsse\ImportExport\OPML<extended> */
|
/** @covers \JKingWeb\Arsse\ImportExport\OPML<extended> */
|
||||||
class TestOPML extends \JKingWeb\Arsse\Test\AbstractTest {
|
class TestOPML extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
|
|
|
@ -12,7 +12,6 @@ use JKingWeb\Arsse\Test\Result;
|
||||||
|
|
||||||
/** @covers \JKingWeb\Arsse\Misc\ValueInfo */
|
/** @covers \JKingWeb\Arsse\Misc\ValueInfo */
|
||||||
class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest {
|
class TestValueInfo extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
|
|
||||||
public function testGetIntegerInfo(): void {
|
public function testGetIntegerInfo(): void {
|
||||||
$tests = [
|
$tests = [
|
||||||
[null, I::NULL],
|
[null, I::NULL],
|
||||||
|
|
|
@ -15,7 +15,6 @@ use JKingWeb\Arsse\Db\ExceptionInput;
|
||||||
use JKingWeb\Arsse\Db\Transaction;
|
use JKingWeb\Arsse\Db\Transaction;
|
||||||
use JKingWeb\Arsse\REST\Fever\API;
|
use JKingWeb\Arsse\REST\Fever\API;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use Laminas\Diactoros\ServerRequest;
|
|
||||||
use Laminas\Diactoros\Response\JsonResponse;
|
use Laminas\Diactoros\Response\JsonResponse;
|
||||||
use Laminas\Diactoros\Response\XmlResponse;
|
use Laminas\Diactoros\Response\XmlResponse;
|
||||||
use Laminas\Diactoros\Response\EmptyResponse;
|
use Laminas\Diactoros\Response\EmptyResponse;
|
||||||
|
|
|
@ -306,7 +306,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
if ($called) {
|
if ($called) {
|
||||||
$rMock->authenticateRequest->called();
|
$rMock->authenticateRequest->called();
|
||||||
$hMock->dispatch->once()->called();
|
$hMock->dispatch->once()->called();
|
||||||
$in = $hMock->dispatch->firstCall()->argument();;
|
$in = $hMock->dispatch->firstCall()->argument();
|
||||||
$this->assertSame($method, $in->getMethod());
|
$this->assertSame($method, $in->getMethod());
|
||||||
$this->assertSame($target, $in->getRequestTarget());
|
$this->assertSame($target, $in->getRequestTarget());
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1356,7 +1356,6 @@ LONG_STRING;
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** @dataProvider provideArticleChanges */
|
/** @dataProvider provideArticleChanges */
|
||||||
public function testChangeArticles(array $in, ResponseInterface $exp): void {
|
public function testChangeArticles(array $in, ResponseInterface $exp): void {
|
||||||
$in = array_merge(['op' => "updateArticle", 'sid' => "PriestsOfSyrinx"], $in);
|
$in = array_merge(['op' => "updateArticle", 'sid' => "PriestsOfSyrinx"], $in);
|
||||||
|
|
|
@ -23,7 +23,6 @@ class TestService extends \JKingWeb\Arsse\Test\AbstractTest {
|
||||||
$this->srv = new Service();
|
$this->srv = new Service();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function testCheckIn(): void {
|
public function testCheckIn(): void {
|
||||||
$now = time();
|
$now = time();
|
||||||
$this->srv->checkIn();
|
$this->srv->checkIn();
|
||||||
|
|
|
@ -37,7 +37,6 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase {
|
||||||
protected $dbMock;
|
protected $dbMock;
|
||||||
protected $userMock;
|
protected $userMock;
|
||||||
|
|
||||||
|
|
||||||
public function setUp(): void {
|
public function setUp(): void {
|
||||||
self::clearData();
|
self::clearData();
|
||||||
// create the object factory as a mock
|
// create the object factory as a mock
|
||||||
|
@ -155,7 +154,6 @@ abstract class AbstractTest extends \PHPUnit\Framework\TestCase {
|
||||||
} else {
|
} else {
|
||||||
parent::assertFileNotExists($filename, $message);
|
parent::assertFileNotExists($filename, $message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function assertException($msg = "", string $prefix = "", string $type = "Exception"): void {
|
public function assertException($msg = "", string $prefix = "", string $type = "Exception"): void {
|
||||||
|
|
Loading…
Reference in a new issue