Files
smarty/tests/UnitTests/ResourceTests/Custom/DemoPluginMysql/PHPunitplugins/resource.mysqlstest.php

22 lines
519 B
PHP
Raw Normal View History

<?php
2022-12-22 21:50:01 +01:00
use Smarty\Exception;
require_once SMARTY_DIR . '../demo/plugins/resource.mysqls.php';
2022-12-21 16:33:26 +01:00
class Smarty_Resource_Mysqlstest extends _MysqlsPlugin
{
public function __construct()
{
try {
$this->db = PHPUnit_Smarty::$pdo;
}
catch
(PDOException $e) {
2022-12-22 21:50:01 +01:00
throw new Exception('Mysql Resource failed: ' . $e->getMessage());
}
$this->fetch = $this->db->prepare('SELECT modified, source FROM templates WHERE name = :name');
}
}