1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Fix errors in last commit

This commit is contained in:
J. King 2019-09-05 10:13:17 -04:00
parent 29667464a1
commit 6235cb0be6
5 changed files with 5 additions and 5 deletions

View file

@ -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();
}

View file

@ -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 {

View file

@ -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",

View file

@ -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() {

View file

@ -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);
}