コード例 #1
0
ファイル: MysqlTest.php プロジェクト: vasiljok/magento2
 public function testGetConnectionInactive()
 {
     $config = ['host' => 'localhost', 'active' => false];
     $object = new Mysql($this->string, $this->dateTime, $config);
     $logger = $this->getMockForAbstractClass('Magento\\Framework\\DB\\LoggerInterface');
     $this->assertNull($object->getConnection($logger));
 }
コード例 #2
0
    /**
     * {@inheritdoc}
     */
    public function create(array $connectionConfig)
    {
        $resourceInstance = new Mysql(new Stdlib\StringUtils(), new Stdlib\DateTime(), $connectionConfig);

        return $resourceInstance->getConnection($this->serviceLocator->get(\Magento\Framework\DB\Logger\Quiet::class));
    }