function testAllowedTypesShouldAllHaveSchema()
 {
     $missingSchemas = array();
     foreach (TransactionRequest::getAllowedTypes() as $type) {
         $file = JsonSchemaValidator::schemaPathFor($type);
         if (!file_exists($file)) {
             $missingSchemas[] = $type;
         }
     }
     $this->assertEqual(0, sizeof($missingSchemas), "missing schemas for Transaction types: " . join($missingSchemas, ', '));
 }
Ejemplo n.º 2
0
<?php

namespace Hypercharge;

// workaround to load SCHEMA_VERSION
JsonSchemaValidator::schemaPathFor('foo');
// workaround to load VERSION
Config::ENV_LIVE;
class Curl implements IHttpsClient
{
    private $user;
    private $passw;
    /**
     * curl handle
     */
    private $ch;
    public $timeout = 30;
    function __construct($user, $passw)
    {
        $this->user = $user;
        $this->passw = $passw;
        $this->init();
    }
    function __destruct()
    {
        if (method_exists($this, 'close')) {
            $this->close();
        }
    }
    function close()
    {