/** * delete the domain created in testCreateDomain * * @depends testCreateDomain */ function testDeleteDomain() { // sleep for atleast one second between methods, it is only 'eventual consistency' sleep(1); $result = SimpleDB::deleteDomain($this->test_domain); // test we got back the expected success message $this->assertTrue($result); }
Utils::printResult('putAttributesAssoc', true, $r); $r = $sdb->getAttributes('bob'); Utils::printResult('getAttributes', $r['name'] == 'Bob', $r); $sdb->setSingleAttr('bob', 'foo', 'bar'); $r = $sdb->getAttributes('bob'); Utils::printResult('setSingleAttr', $r['foo'] == 'bar'); $a = array('alice' => array('name' => 'Alice', 'age' => 50), 'charlie' => array('name' => 'Charlie', 'age' => 20)); $r = $sdb->batchPutAttributesAssoc($a); Utils::printResult('batchPutAttributesAssoc', true, $r); $r = $sdb->query("SELECT * FROM UnitTest WHERE age>'25'"); Utils::printResult('query', count($r) == 2, $r); $r = $sdb->singleAttrQuery('name', 'Alice'); Utils::printResult('singleAttrQuery - single val', count($r), $r); $r = $sdb->singleAttrQuery('name', array('Alice', 'Bob')); Utils::printResult('singleAttrQuery - multival', count($r) == 2, $r); $r = $sdb->deleteDomain('UnitTest'); $list = $sdb->listDomains(); Utils::printResult('DeleteDomain', !in_array('UnitTest', $list), $r); echo '<pre>' . print_r($sdb->getLog(), 1) . '</pre>'; /* $bi = new BookInfo(); $r = $bi->getBookInfoFromWS('055321246x'); if ($debug) var_dump($r); Utils::printResult('ItemLookup',!empty($r['title'])); $r = $bi->searchBooks('walden'); if ($debug) var_dump($r); Utils::printResult('search title',!empty($r)); $r = $bi->searchBooks('walden', 'thoreau'); if ($debug) var_dump($r);