Skip to content

Commit ca2f32c

Browse files
committed
Added replicate method tests
1 parent d4df6bd commit ca2f32c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/ActionsTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,4 +427,22 @@ public function testCreateDesignDocCreatesDesignDocuments()
427427
$this->assertInternalType('string', $ddoc);
428428
});
429429
}
430+
431+
/**
432+
* @eris-repeat 5
433+
*/
434+
public function testReplicateFunctionReplicatesDatabase()
435+
{
436+
$this->forAll(Generator\associative([
437+
'source' => Generator\constant('testdb'),
438+
'target' => Generator\constant('testdb_foreign')
439+
]))
440+
->then(function (array $opts) {
441+
$promise = $this->action->replicate($opts);
442+
$replicate = self::blockFn()($promise, $this->eventLoop);
443+
444+
$this->assertInstanceOf(\React\Promise\Promise::class, $promise);
445+
$this->assertInternalType('string', $replicate);
446+
});
447+
}
430448
}

0 commit comments

Comments
 (0)