Fixes to ssl/tls, misc improvements
* Use the PHP context options to configure tls rather than reinventing the wheel. * Properly setup the SocketServer for ssl * Added generic getter for config values
This commit is contained in:
@ -15,12 +15,14 @@ class TopicTest extends \PHPUnit\Framework\TestCase
|
||||
public function isAuthorized():bool { return true; }
|
||||
public function deliver(Message $message):void { $this->messages[] = $message; }
|
||||
public function getPayload(): ?array { return null; }
|
||||
public function getId(): string { return ""; }
|
||||
};
|
||||
$unauthorizedSubscriber = new class implements SubscriberInterface {
|
||||
public array $messages = [];
|
||||
public function isAuthorized():bool { return false; }
|
||||
public function deliver(Message $message):void { $this->messages[] = $message; }
|
||||
public function getPayload(): ?array { return null; }
|
||||
public function getId(): string { return ""; }
|
||||
};
|
||||
|
||||
$topic = new Topic("foo");
|
||||
@ -41,12 +43,14 @@ class TopicTest extends \PHPUnit\Framework\TestCase
|
||||
public function isAuthorized():bool { return true; }
|
||||
public function deliver(Message $message):void { $this->messages[] = $message; }
|
||||
public function getPayload(): ?array { return null; }
|
||||
public function getId(): string { return ""; }
|
||||
};
|
||||
$unauthorizedSubscriber = new class implements SubscriberInterface {
|
||||
public array $messages = [];
|
||||
public function isAuthorized():bool { return false; }
|
||||
public function deliver(Message $message):void { $this->messages[] = $message; }
|
||||
public function getPayload(): ?array { return null; }
|
||||
public function getId(): string { return ""; }
|
||||
};
|
||||
|
||||
$topic = new Topic("foo");
|
||||
|
Reference in New Issue
Block a user