subject = new BrokerFactory(); } public function testCreateInMemory(): void { $test = $this->subject->create(BrokerFactory::BROKER_MEMORY); $this->assertInstanceOf(InMemoryQueueBroker::class, $test); } public function testCreateRDS(): void { $test = $this->subject->create(BrokerFactory::BROKER_RDS, 'default'); $this->assertInstanceOf(RdsQueueBroker::class, $test); } public function testCreateRDSWithError(): void { $this->expectException(InvalidArgumentException::class); $this->subject->create(BrokerFactory::BROKER_RDS); } public function testCreateNewSql(): void { $test = $this->subject->create(BrokerFactory::BROKER_NEW_SQL, 'default'); $this->assertInstanceOf(NewSqlQueueBroker::class, $test); } public function testCreateNewSqlWithException(): void { $this->expectException(InvalidArgumentException::class); $this->subject->create(BrokerFactory::BROKER_NEW_SQL); } public function testCreateSqs(): void { $test = $this->subject->create(BrokerFactory::BROKER_SQS); $this->assertInstanceOf(SqsQueueBroker::class, $test); } public function testBogusQueue(): void { $this->expectException(InvalidArgumentException::class); $this->subject->create('bogus'); $this->expectErrorMessage('Broker bogus is not supported'); } }