refactor: rename remote mail service

Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
2026-09-26 22:00:16 -04:00
parent 54a24c9892
commit 8abd2c2c8c
7 changed files with 52 additions and 52 deletions
+6 -6
View File
@@ -5,7 +5,7 @@ declare(strict_types=1);
namespace KTXT\ProviderImap\Tests\Unit;
use KTXM\ProviderImap\Providers\Service;
use KTXM\ProviderImap\Service\Remote\RemoteMailService;
use KTXM\ProviderImap\Service\Live\LiveMailService;
use PHPUnit\Framework\TestCase;
use ReflectionProperty;
@@ -14,18 +14,18 @@ final class ServiceTest extends TestCase
public function testEntityExtantReportsExistenceOfEachIdentifier(): void
{
$service = new Service();
$remote = new ServiceTestRemoteStub($this->createStub(Service::class));
$remote->existing = [5];
(new ReflectionProperty(Service::class, 'remoteService'))->setValue($service, $remote);
$live = new ServiceTestLiveStub($this->createStub(Service::class));
$live->existing = [5];
(new ReflectionProperty(Service::class, 'liveService'))->setValue($service, $live);
$result = $service->entityExtant('INBOX', 5, '6', 'abc', 0);
$this->assertSame([5 => true, 6 => false, 'abc' => false, 0 => false], $result);
$this->assertSame([['INBOX', [5, 6]]], $remote->extantCalls);
$this->assertSame([['INBOX', [5, 6]]], $live->extantCalls);
}
}
final class ServiceTestRemoteStub extends RemoteMailService
final class ServiceTestLiveStub extends LiveMailService
{
/** @var int[] */
public array $existing = [];