fix: discovery admin notice fires on cached 'recommended' too, guarded against oauth/permalink early returns
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -11,6 +11,12 @@ use Mockery;
|
||||
|
||||
final class ConnectionStatusTest extends TestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
Functions\stubTranslationFunctions();
|
||||
}
|
||||
|
||||
public function testEndpointCheckExpects401WithBearerChallengeAndCachesIt(): void
|
||||
{
|
||||
Functions\when('get_transient')->justReturn(false);
|
||||
@@ -56,4 +62,13 @@ final class ConnectionStatusTest extends TestCase
|
||||
self::assertNull($byLabel['Discovery (/.well-known/)']['ok']);
|
||||
self::assertNull($byLabel['Endpunkt ohne Token']['ok']);
|
||||
}
|
||||
|
||||
public function testPermalinksPrettyReflectsThePermalinkStructureOption(): void
|
||||
{
|
||||
Functions\when('get_option')->justReturn('/%postname%/');
|
||||
self::assertTrue((new ConnectionStatus())->permalinksPretty());
|
||||
|
||||
Functions\when('get_option')->justReturn('');
|
||||
self::assertFalse((new ConnectionStatus())->permalinksPretty());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user