public static function setUpBeforeClass() { $mock = new MockHandler([new Response(200, [], "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><UsersResponse><Users><User><Username>byo_dev</Username><FirstName>test</FirstName><LastName>test</LastName><EmailAddress>jsommerset@bandwidth.com</EmailAddress><TelephoneNumber>5413637598</TelephoneNumber><Roles><Role><RoleName>ROLE_USER</RoleName><Permissions><Permission><PermissionName>UPDATE</PermissionName></Permission><Permission><PermissionName>VIEW</PermissionName></Permission></Permissions></Role><Role><RoleName>ROLE_BDR</RoleName><Permissions><Permission><PermissionName>UPDATE</PermissionName></Permission><Permission><PermissionName>VIEW</PermissionName></Permission></Permissions></Role><Role><RoleName>ROLE_API_HISTORY</RoleName><Permissions><Permission><PermissionName>UPDATE</PermissionName></Permission><Permission><PermissionName>VIEW</PermissionName></Permission></Permissions></Role><Role><RoleName>ROLE_API_SITE</RoleName><Permissions><Permission><PermissionName>UPDATE</PermissionName></Permission><Permission><PermissionName>VIEW</PermissionName></Permission></Permissions></Role><Role><RoleName>ROLE_API_SEARCH</RoleName><Permissions><Permission><PermissionName>VIEW</PermissionName></Permission></Permissions></Role><Role><RoleName>ROLE_API_ORDERING</RoleName><Permissions><Permission><PermissionName>UPDATE</PermissionName></Permission><Permission><PermissionName>VIEW</PermissionName></Permission></Permissions></Role><Role><RoleName>ROLE_API_PROFILE</RoleName><Permissions><Permission><PermissionName>UPDATE</PermissionName></Permission><Permission><PermissionName>VIEW</PermissionName></Permission></Permissions></Role><Role><RoleName>ROLE_API_LNP</RoleName><Permissions><Permission><PermissionName>UPDATE</PermissionName></Permission><Permission><PermissionName>VIEW</PermissionName></Permission></Permissions></Role><Role><RoleName>ROLE_API_ACCOUNT</RoleName><Permissions><Permission><PermissionName>VIEW</PermissionName></Permission></Permissions></Role><Role><RoleName>ROLE_API_DLDA</RoleName><Permissions><Permission><PermissionName>UPDATE</PermissionName></Permission><Permission><PermissionName>VIEW</PermissionName></Permission></Permissions></Role><Role><RoleName>ROLE_API_CNAMLIDB</RoleName><Permissions><Permission><PermissionName>UPDATE</PermissionName></Permission><Permission><PermissionName>VIEW</PermissionName></Permission></Permissions></Role></Roles></User></Users></UsersResponse>"), new Response(200, [], "")]); self::$container = []; $history = Middleware::history(self::$container); $handler = HandlerStack::create($mock); $handler->push($history); self::$client = new Iris\Client("test", "test", array('url' => 'https://api.test.inetwork.com/v1.0', 'handler' => $handler)); self::$account = new \Iris\Account(9500249, self::$client); }
public function getConnection() { if ($this->conn === null) { $dsn = 'mysql:dbname=' . $_SERVER['PM_UNIT_DB_NAME'] . ';host=' . $_SERVER['PM_UNIT_DB_HOST']; if (self::$pdo == null) { self::$pdo = new PDO($dsn, $_SERVER['PM_UNIT_DB_USER'], $_SERVER['PM_UNIT_DB_PASS']); } $this->conn = $this->createDefaultDBConnection(self::$pdo, $_SERVER['PM_UNIT_DB_NAME']); } return $this->conn; }
{ public function setup() { } public function test_get() { $this->mark_test_incomplete(); } public function test_get_by_info() { $this->mark_test_incomplete(); } public function test_get_all() { $this->mark_test_incomplete(); } public function teardown() { } } UsersTest::run_one('UsersTest'); ?>