Phive\Queue\Tests\Handler\PdoHandler::createQueue PHP Method

createQueue() public method

public createQueue ( )
    public function createQueue()
    {
        $class = $this->getQueueClass();
        return new $class($this->pdo, $this->getOption('table_name'));
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @dataProvider provideQueueInterfaceMethods
  */
 public function testThrowExceptionOnMalformedSql($method)
 {
     $options = self::getHandler()->getOptions();
     $options['table_name'] = uniqid('non_existing_table_name_');
     $handler = new PdoHandler($options);
     $queue = $handler->createQueue();
     try {
         $this->callQueueMethod($queue, $method);
     } catch (NoItemAvailableException $e) {
     } catch (\PDOException $e) {
         return;
     }
     $this->fail();
 }