|
@ -789,11 +789,6 @@ trait SeriesArticle { |
|
|
$this->compareExpectations($state); |
|
|
$this->compareExpectations($state); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function testMarkTooFewMultipleArticles() { |
|
|
|
|
|
$this->assertException("tooShort", "Db", "ExceptionInput"); |
|
|
|
|
|
Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->articles([])); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function testMarkTooManyMultipleArticles() { |
|
|
public function testMarkTooManyMultipleArticles() { |
|
|
$this->assertSame(7, Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)))); |
|
|
$this->assertSame(7, Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->articles(range(1, Database::LIMIT_SET_SIZE * 3)))); |
|
|
} |
|
|
} |
|
@ -860,11 +855,6 @@ trait SeriesArticle { |
|
|
$this->compareExpectations($state); |
|
|
$this->compareExpectations($state); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function testMarkTooFewMultipleEditions() { |
|
|
|
|
|
$this->assertException("tooShort", "Db", "ExceptionInput"); |
|
|
|
|
|
Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->editions([])); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function testMarkTooManyMultipleEditions() { |
|
|
public function testMarkTooManyMultipleEditions() { |
|
|
$this->assertSame(7, Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->editions(range(1, 51)))); |
|
|
$this->assertSame(7, Arsse::$db->articleMark($this->user, ['read'=>false,'starred'=>true], (new Context)->editions(range(1, 51)))); |
|
|
} |
|
|
} |
|
@ -1036,13 +1026,20 @@ trait SeriesArticle { |
|
|
Arsse::$db->articleCategoriesGet($this->user, 19); |
|
|
Arsse::$db->articleCategoriesGet($this->user, 19); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function testSearchTooFewTerms() { |
|
|
/** @dataProvider provideArrayContextOptions */ |
|
|
|
|
|
public function testUseTooFewValuesInArrayContext(string $option) { |
|
|
$this->assertException("tooShort", "Db", "ExceptionInput"); |
|
|
$this->assertException("tooShort", "Db", "ExceptionInput"); |
|
|
Arsse::$db->articleList($this->user, (new Context)->searchTerms([])); |
|
|
Arsse::$db->articleList($this->user, (new Context)->annotationTerms([])); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function testSearchTooFewTermsInNote() { |
|
|
public function provideArrayContextOptions() { |
|
|
$this->assertException("tooShort", "Db", "ExceptionInput"); |
|
|
foreach([ |
|
|
Arsse::$db->articleList($this->user, (new Context)->annotationTerms([])); |
|
|
"articles", "editions", |
|
|
|
|
|
"subscriptions", "foldersShallow", //"folders", |
|
|
|
|
|
"tags", "tagNames", "labels", "labelNames", |
|
|
|
|
|
"searchTerms", "authorTerms", "annotationTerms", |
|
|
|
|
|
] as $method) { |
|
|
|
|
|
yield [$method]; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|