Created
October 12, 2015 05:49
-
-
Save tilhom/2864744f340be8a4c49e to your computer and use it in GitHub Desktop.
test.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require(__DIR__ .'/db.php'); | |
require(__DIR__ .'/CurrencyGrabber.php'); | |
//fot test method MyCurrencyGrabberInterface::convert() | |
$from = 'USD'; | |
$to = 'UZS'; | |
$symbol = 'uzs'; | |
header('Content-Type: text/html; charset=utf-8'); | |
$db = Megagroup\Db::getInstance(); | |
$testObj = new Megagroup\MyCurrencyGrabber($db); | |
foreach ((new Megagroup\MyCurrencyGrabber) as $c) { | |
echo $c['nominal'].' '.$c['charcode'].' - '.$c['value'].' RUB'.PHP_EOL; | |
} | |
//if ($testObj->download()) echo ' Okay download '; | |
echo $testObj->convert($from,$to); | |
echo "<br>"; | |
//echo "{$testObj->get($symbol)}"; | |
var_dump($testObj->get($symbol)); | |
$db->close(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment