newRepo(); $repo->save($this->makePassword(name: 'main')); $repo->save($this->makePassword(name: 'ci')); $this->assertCount(2, $repo->findAllForDid('did:plc:alice')); } public function testFindByDidAndName(): void { $repo = $this->newRepo(); $p = $this->makePassword(); $repo->save($p); $found = $repo->findByDidAndName('did:plc:alice', 'main'); $this->assertSame('main', $found->getName()); } public function testFindThrowsWhenMissing(): void { $repo = $this->newRepo(); $this->expectException(AppPasswordNotFoundException::class); $repo->findByDidAndName('did:plc:alice', 'nope'); } public function testDeleteByDidAndName(): void { $repo = $this->newRepo(); $repo->save($this->makePassword()); $repo->deleteByDidAndName('did:plc:alice', 'main'); $this->assertEmpty($repo->findAllForDid('did:plc:alice')); } }