fix: Texte zu post_ids und Bearbeitungsrecht nennen forbidden für genannte Live-Seiten; Test für genannte blockierte Live-Seite; Smoke prüft Seiten-IDs numerisch
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
10bed73b24
commit
6b5de199f9
@@ -268,6 +268,29 @@ final class PageRewriterTest extends TestCase
|
||||
self::assertSame([[101, SaveScope::Page]], $this->saved);
|
||||
}
|
||||
|
||||
/** A named live post the caller may not edit blocks the whole call (forbidden), also with post_ids. */
|
||||
public function testNamedBlockedLivePageRefusesTheCallEvenWithPostIds(): void
|
||||
{
|
||||
$rewriter = $this->rewriter(
|
||||
[
|
||||
self::page(101, self::layout(self::BUTTON), ['post_status' => 'publish']),
|
||||
self::page(102, self::layout(self::BUTTON), ['post_status' => 'publish']),
|
||||
],
|
||||
self::report(2, [102], 2)
|
||||
);
|
||||
|
||||
$preview = $rewriter->preview(self::query(), self::assign(), [101, 102]);
|
||||
self::assertSame([102], $preview['blocked_ids']);
|
||||
|
||||
$error = self::assertToolError(
|
||||
$rewriter->apply(self::ABILITY, self::query(), self::assign(), [101, 102], self::SUMMARY),
|
||||
'forbidden'
|
||||
);
|
||||
self::assertSame([102], $error['blocked_ids']);
|
||||
self::assertSame([], $this->saved);
|
||||
self::assertSame([], $this->log->records);
|
||||
}
|
||||
|
||||
public function testTooManyLiveUsagesAreUnsupported(): void
|
||||
{
|
||||
$rewriter = $this->rewriter(
|
||||
|
||||
Reference in New Issue
Block a user