mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
db132c0c24
- Introduced "strict" binding types for use when inserting into NOT NULL columns: any null value supplied is always cast to the supplied type rather than passing through - Fixed feed updating further - Filled out full complement of subscription manipulation functions - made folderPropertiesSet possibly return false
30 lines
No EOL
891 B
PHP
30 lines
No EOL
891 B
PHP
<?php
|
|
namespace JKingWeb\Arsse;
|
|
const INSTALL = true;
|
|
require_once __DIR__."/../bootstrap.php";
|
|
|
|
|
|
$user = "john.doe@example.com";
|
|
$pass = "secret";
|
|
$_SERVER['PHP_AUTH_USER'] = $user;
|
|
$_SERVER['PHP_AUTH_PW'] = $pass;
|
|
$conf = new Conf();
|
|
$conf->dbSQLite3File = ":memory:";
|
|
$conf->userAuthPreferHTTP = true;
|
|
Data::load($conf);
|
|
Data::$db->schemaUpdate();
|
|
|
|
Data::$user->add($user, $pass);
|
|
Data::$user->auth();
|
|
Data::$user->authorizationEnabled(false);
|
|
Data::$user->rightsSet($user, User\Driver::RIGHTS_GLOBAL_ADMIN);
|
|
Data::$user->authorizationEnabled(true);
|
|
Data::$db->folderAdd($user, ['name' => 'ook']);
|
|
Data::$db->subscriptionAdd($user, "https://jkingweb.ca/test.atom");
|
|
Data::$db->subscriptionPropertiesSet($user, 1, [
|
|
'title' => "OOOOOOOOK!",
|
|
'folder' => null,
|
|
'order_type' => null,
|
|
'pinned' => null,
|
|
]);
|
|
var_export(Data::$db->subscriptionList($user)->getAll()); |