Пример #1
0
 public function testGetPhones()
 {
     try {
         include_once "../config.php";
         $phones = new Phones($arrConfig);
         $result = $phones->getPhones();
         foreach ($result as $value) {
             $this->assertEquals("+", $value[0]);
         }
     } catch (Exception $ex) {
         $this->fail($ex->getMessage());
     }
 }
Пример #2
0
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Задание 1</title>
    <style type="text/css">
        body { font-family:courier }
    </style>
</head>
<body>
<table>
    <?php 
require "../config.php";
require "Phones.php";
try {
    $phones = new Phones($arrConfig);
    $result = $phones->getPhones();
    foreach ($result as $value) {
        echo "<tr><td>" . $value . "</td></tr>";
    }
} catch (Exception $ex) {
    die($ex->getMessage());
}
?>
</table>
</body>
</html>