|
|
@ -8,8 +8,7 @@ use JKingWeb\Arsse\Feed\Exception as FeedException; |
|
|
|
use Phake; |
|
|
|
|
|
|
|
trait SeriesSubscription { |
|
|
|
function setUpSeries() { |
|
|
|
$this->data = [ |
|
|
|
protected $data = [ |
|
|
|
'arsse_users' => [ |
|
|
|
'columns' => [ |
|
|
|
'id' => 'str', |
|
|
@ -18,7 +17,6 @@ trait SeriesSubscription { |
|
|
|
'rights' => 'int', |
|
|
|
], |
|
|
|
'rows' => [ |
|
|
|
["admin@example.net", '$2y$10$PbcG2ZR3Z8TuPzM7aHTF8.v61dtCjzjK78gdZJcp4UePE8T9jEgBW', "Hard Lip Herbert", UserDriver::RIGHTS_GLOBAL_ADMIN], // password is hash of "secret" |
|
|
|
["jane.doe@example.com", "", "Jane Doe", UserDriver::RIGHTS_NONE], |
|
|
|
["john.doe@example.com", "", "John Doe", UserDriver::RIGHTS_NONE], |
|
|
|
], |
|
|
@ -48,11 +46,7 @@ trait SeriesSubscription { |
|
|
|
'password' => "str", |
|
|
|
'next_fetch' => "datetime", |
|
|
|
], |
|
|
|
'rows' => [ |
|
|
|
[1,"http://example.com/feed1", "Ook", "", "",strtotime("now")], |
|
|
|
[2,"http://example.com/feed2", "Eek", "", "",strtotime("now - 1 hour")], |
|
|
|
[3,"http://example.com/feed3", "Ack", "", "",strtotime("now + 1 hour")], |
|
|
|
] |
|
|
|
'rows' => [] // filled in the series setup |
|
|
|
], |
|
|
|
'arsse_subscriptions' => [ |
|
|
|
'columns' => [ |
|
|
@ -112,7 +106,13 @@ trait SeriesSubscription { |
|
|
|
] |
|
|
|
], |
|
|
|
]; |
|
|
|
$this->primeDatabase($this->data); |
|
|
|
|
|
|
|
function setUpSeries() { |
|
|
|
$this->data['arsse_feeds']['rows'] = [ |
|
|
|
[1,"http://example.com/feed1", "Ook", "", "",strtotime("now")], |
|
|
|
[2,"http://example.com/feed2", "Eek", "", "",strtotime("now - 1 hour")], |
|
|
|
[3,"http://example.com/feed3", "Ack", "", "",strtotime("now + 1 hour")], |
|
|
|
]; |
|
|
|
// initialize a partial mock of the Database object to later manipulate the feedUpdate method |
|
|
|
Data::$db = Phake::PartialMock(Database::class, $this->drv); |
|
|
|
$this->user = "john.doe@example.com"; |
|
|
|