BeanstalkdTransportFactory example

use PHPUnit\Framework\TestCase;
use Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdTransport;
use Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\BeanstalkdTransportFactory;
use Symfony\Component\Messenger\Bridge\Beanstalkd\Transport\Connection;
use Symfony\Component\Messenger\Transport\Serialization\SerializerInterface;

final class BeanstalkdTransportFactoryTest extends TestCase
{
    public function testSupports()
    {
        $factory = new BeanstalkdTransportFactory();

        $this->assertTrue($factory->supports('beanstalkd://127.0.0.1', []));
        $this->assertFalse($factory->supports('doctrine://127.0.0.1', []));
    }

    public function testCreateTransport()
    {
        $factory = new BeanstalkdTransportFactory();
        $serializer = $this->createMock(SerializerInterface::class);

        $this->assertEquals(
            
Home | Imprint | This part of the site doesn't use cookies.