示例#1
0
    {
        return SmartyTests::_init($smarty);
    }
    protected function clearFiles()
    {
        SmartyTests::clearFiles();
    }
}
class _object_toString
{
    protected $string = null;
    public function __construct($string)
    {
        $this->string = (string) $string;
    }
    public function __toString()
    {
        return $this->string;
    }
}
class _object_noString
{
    protected $string = null;
    public function __construct($string)
    {
        $this->string = (string) $string;
    }
}
SmartyTests::$smarty = new \Box\Brainy\Brainy();
SmartyTests::$smartyBC = new \Box\Brainy\SmartyBC();
ini_set('date.timezone', 'UTC');
示例#2
0
 public function __construct()
 {
     SmartyTests::$smarty = new Smarty();
     SmartyTests::$smartyBC = new SmartyBC();
 }
示例#3
0
    }
    public function assertFalse($a)
    {
        if ($a !== false) {
            $this->error();
            echo '<br>result was not false';
        }
    }
    public function assertTrue($a)
    {
        if ($a !== true) {
            $this->error();
            echo '<br>result was not true';
        }
    }
    public function assertNull($a)
    {
        if ($a !== null) {
            $this->error();
            echo '<br>result was not "null"';
        }
    }
    public function error()
    {
        echo '<br><br><br>ERROR in test:  ' . get_class($this) . '::' . $this->current_function;
        $this->error_functions[] = $this->current_function;
    }
}
SmartyTests::$smartyBC = new SmartyBC();
SmartyTests::$smarty = new Smarty();