|
@ -14,7 +14,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { |
|
|
public function testVerifyInitialState() { |
|
|
public function testVerifyInitialState() { |
|
|
$c = new Context; |
|
|
$c = new Context; |
|
|
foreach ((new \ReflectionObject($c))->getMethods(\ReflectionMethod::IS_PUBLIC) as $m) { |
|
|
foreach ((new \ReflectionObject($c))->getMethods(\ReflectionMethod::IS_PUBLIC) as $m) { |
|
|
if ($m->isConstructor() || $m->isStatic()) { |
|
|
if ($m->isStatic() || strpos($m->name, "__") === 0) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
$method = $m->name; |
|
|
$method = $m->name; |
|
@ -51,11 +51,14 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { |
|
|
'annotated' => true, |
|
|
'annotated' => true, |
|
|
'searchTerms' => ["foo", "bar"], |
|
|
'searchTerms' => ["foo", "bar"], |
|
|
'annotationTerms' => ["foo", "bar"], |
|
|
'annotationTerms' => ["foo", "bar"], |
|
|
|
|
|
'titleTerms' => ["foo", "bar"], |
|
|
|
|
|
'authorTerms' => ["foo", "bar"], |
|
|
|
|
|
'not' => (new Context)->subscription(5), |
|
|
]; |
|
|
]; |
|
|
$times = ['modifiedSince','notModifiedSince','markedSince','notMarkedSince']; |
|
|
$times = ['modifiedSince','notModifiedSince','markedSince','notMarkedSince']; |
|
|
$c = new Context; |
|
|
$c = new Context; |
|
|
foreach ((new \ReflectionObject($c))->getMethods(\ReflectionMethod::IS_PUBLIC) as $m) { |
|
|
foreach ((new \ReflectionObject($c))->getMethods(\ReflectionMethod::IS_PUBLIC) as $m) { |
|
|
if ($m->isConstructor() || $m->isStatic()) { |
|
|
if ($m->isStatic() || strpos($m->name, "__") === 0) { |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
$method = $m->name; |
|
|
$method = $m->name; |
|
@ -84,7 +87,7 @@ class TestContext extends \JKingWeb\Arsse\Test\AbstractTest { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function testCleanStringArrayValues() { |
|
|
public function testCleanStringArrayValues() { |
|
|
$methods = ["searchTerms", "annotationTerms"]; |
|
|
$methods = ["searchTerms", "annotationTerms", "titleTerms", "authorTerms"]; |
|
|
$now = new \DateTime; |
|
|
$now = new \DateTime; |
|
|
$in = [1, 3.0, "ook", 0, true, false, null, $now, ""]; |
|
|
$in = [1, 3.0, "ook", 0, true, false, null, $now, ""]; |
|
|
$out = ["1", "3", "ook", "0", valueInfo::normalize($now, ValueInfo::T_STRING)]; |
|
|
$out = ["1", "3", "ook", "0", valueInfo::normalize($now, ValueInfo::T_STRING)]; |
|
|