public function createFactory($class, $args = [], $replaces = [true, true])
{
$methods = [];
if ($replaces[0]) {
$methods[] = 'getClient';
}
if ($replaces[1]) {
$methods[] = 'getClass';
}
$args = $args ? [$args] : [];
$mock = $this->getMock($class, $methods, $args);
if ($replaces[0]) {
$mock->expects($this->any())->method('getClient')->will($this->returnValue(FilesystemAdapterFactoryMock::class));
}
if ($replaces[1]) {
$mock->expects($this->any())->method('getClass')->will($this->returnValue(FilesystemAdapterFactoryMock::class));
}
return $mock;
}