mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 21:22:40 +00:00
Fix errors in last commit
This commit is contained in:
parent
29667464a1
commit
6235cb0be6
5 changed files with 5 additions and 5 deletions
|
@ -344,7 +344,7 @@ class TestV1_2 extends \JKingWeb\Arsse\Test\AbstractTest {
|
|||
Arsse::$user->id = "john.doe@example.com";
|
||||
// create a mock database interface
|
||||
Arsse::$db = \Phake::mock(Database::class);
|
||||
\Phake::when(Arsse::$db)->begin->thenReturn(Phake::mock(Transaction::class));
|
||||
\Phake::when(Arsse::$db)->begin->thenReturn(\Phake::mock(Transaction::class));
|
||||
$this->h = new V1_2();
|
||||
}
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ class TestREST extends \JKingWeb\Arsse\Test\AbstractTest {
|
|||
$this->assertInstanceOf(ResponseInterface::class, $out);
|
||||
if ($called) {
|
||||
\Phake::verify($r)->authenticateRequest;
|
||||
\Phake::verify($h)->dispatch(Phake::capture($in));
|
||||
\Phake::verify($h)->dispatch(\Phake::capture($in));
|
||||
$this->assertSame($method, $in->getMethod());
|
||||
$this->assertSame($target, $in->getRequestTarget());
|
||||
} else {
|
||||
|
|
|
@ -180,7 +180,7 @@ LONG_STRING;
|
|||
Arsse::$user->id = "john.doe@example.com";
|
||||
// create a mock database interface
|
||||
Arsse::$db = \Phake::mock(Database::class);
|
||||
\Phake::when(Arsse::$db)->begin->thenReturn(Phake::mock(Transaction::class));
|
||||
\Phake::when(Arsse::$db)->begin->thenReturn(\Phake::mock(Transaction::class));
|
||||
\Phake::when(Arsse::$db)->sessionResume->thenThrow(new \JKingWeb\Arsse\User\ExceptionSession("invalid"));
|
||||
\Phake::when(Arsse::$db)->sessionResume("PriestsOfSyrinx")->thenReturn([
|
||||
'id' => "PriestsOfSyrinx",
|
||||
|
|
|
@ -18,7 +18,7 @@ class TestInternal extends \JKingWeb\Arsse\Test\AbstractTest {
|
|||
self::setConf();
|
||||
// create a mock database interface
|
||||
Arsse::$db = \Phake::mock(Database::class);
|
||||
\Phake::when(Arsse::$db)->begin->thenReturn(Phake::mock(\JKingWeb\Arsse\Db\Transaction::class));
|
||||
\Phake::when(Arsse::$db)->begin->thenReturn(\Phake::mock(\JKingWeb\Arsse\Db\Transaction::class));
|
||||
}
|
||||
|
||||
public function testConstruct() {
|
||||
|
|
|
@ -19,7 +19,7 @@ class TestUser extends \JKingWeb\Arsse\Test\AbstractTest {
|
|||
self::setConf();
|
||||
// create a mock database interface
|
||||
Arsse::$db = \Phake::mock(Database::class);
|
||||
\Phake::when(Arsse::$db)->begin->thenReturn(Phake::mock(\JKingWeb\Arsse\Db\Transaction::class));
|
||||
\Phake::when(Arsse::$db)->begin->thenReturn(\Phake::mock(\JKingWeb\Arsse\Db\Transaction::class));
|
||||
// create a mock user driver
|
||||
$this->drv = \Phake::mock(Driver::class);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue