mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-12 01:54:41 +08:00
Created chainIpLocationResolver
This commit is contained in:
@@ -81,7 +81,7 @@ class InstallCommandTest extends TestCase
|
||||
*/
|
||||
public function generatedConfigIsProperlyPersisted()
|
||||
{
|
||||
$this->configWriter->toFile(Argument::any(), Argument::type('array'), false)->shouldBeCalledTimes(1);
|
||||
$this->configWriter->toFile(Argument::any(), Argument::type('array'), false)->shouldBeCalledOnce();
|
||||
$this->commandTester->execute([]);
|
||||
}
|
||||
|
||||
@@ -97,8 +97,8 @@ class InstallCommandTest extends TestCase
|
||||
|
||||
$this->commandTester->execute([]);
|
||||
|
||||
$appConfigExists->shouldHaveBeenCalledTimes(1);
|
||||
$appConfigRemove->shouldHaveBeenCalledTimes(1);
|
||||
$appConfigExists->shouldHaveBeenCalledOnce();
|
||||
$appConfigRemove->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -115,8 +115,8 @@ class InstallCommandTest extends TestCase
|
||||
|
||||
$this->commandTester->execute([]);
|
||||
|
||||
$appConfigExists->shouldHaveBeenCalledTimes(1);
|
||||
$appConfigRemove->shouldHaveBeenCalledTimes(1);
|
||||
$appConfigExists->shouldHaveBeenCalledOnce();
|
||||
$appConfigRemove->shouldHaveBeenCalledOnce();
|
||||
$configToFile->shouldNotHaveBeenCalled();
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class ApplicationConfigCustomizerTest extends TestCase
|
||||
'CHECK_VISITS_THRESHOLD' => false,
|
||||
], $config->getApp());
|
||||
$ask->shouldHaveBeenCalledTimes(2);
|
||||
$confirm->shouldHaveBeenCalledTimes(1);
|
||||
$confirm->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -77,7 +77,7 @@ class ApplicationConfigCustomizerTest extends TestCase
|
||||
'VISITS_THRESHOLD' => 20,
|
||||
], $config->getApp());
|
||||
$ask->shouldHaveBeenCalledTimes(3);
|
||||
$confirm->shouldHaveBeenCalledTimes(1);
|
||||
$confirm->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -101,7 +101,7 @@ class ApplicationConfigCustomizerTest extends TestCase
|
||||
'CHECK_VISITS_THRESHOLD' => true,
|
||||
'VISITS_THRESHOLD' => 20,
|
||||
], $config->getApp());
|
||||
$ask->shouldHaveBeenCalledTimes(1);
|
||||
$ask->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,7 +55,7 @@ class DatabaseConfigCustomizerTest extends TestCase
|
||||
'HOST' => 'param',
|
||||
'PORT' => 'param',
|
||||
], $config->getDatabase());
|
||||
$choice->shouldHaveBeenCalledTimes(1);
|
||||
$choice->shouldHaveBeenCalledOnce();
|
||||
$ask->shouldHaveBeenCalledTimes(5);
|
||||
}
|
||||
|
||||
@@ -137,6 +137,6 @@ class DatabaseConfigCustomizerTest extends TestCase
|
||||
$this->assertEquals([
|
||||
'DRIVER' => 'pdo_sqlite',
|
||||
], $config->getDatabase());
|
||||
$copy->shouldHaveBeenCalledTimes(1);
|
||||
$copy->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ class LanguageConfigCustomizerTest extends TestCase
|
||||
'DEFAULT' => 'en',
|
||||
'CLI' => 'es',
|
||||
], $config->getLanguage());
|
||||
$choice->shouldHaveBeenCalledTimes(1);
|
||||
$choice->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -50,7 +50,7 @@ class UrlShortenerConfigCustomizerTest extends TestCase
|
||||
'NOT_FOUND_REDIRECT_TO' => 'asked',
|
||||
], $config->getUrlShortener());
|
||||
$ask->shouldHaveBeenCalledTimes(3);
|
||||
$choice->shouldHaveBeenCalledTimes(1);
|
||||
$choice->shouldHaveBeenCalledOnce();
|
||||
$confirm->shouldHaveBeenCalledTimes(2);
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@ class UrlShortenerConfigCustomizerTest extends TestCase
|
||||
'NOT_FOUND_REDIRECT_TO' => 'foo',
|
||||
], $config->getUrlShortener());
|
||||
$choice->shouldNotHaveBeenCalled();
|
||||
$ask->shouldHaveBeenCalledTimes(1);
|
||||
$confirm->shouldHaveBeenCalledTimes(1);
|
||||
$ask->shouldHaveBeenCalledOnce();
|
||||
$confirm->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,6 +146,6 @@ class UrlShortenerConfigCustomizerTest extends TestCase
|
||||
'ENABLE_NOT_FOUND_REDIRECTION' => false,
|
||||
], $config->getUrlShortener());
|
||||
$ask->shouldNotHaveBeenCalled();
|
||||
$confirm->shouldHaveBeenCalledTimes(1);
|
||||
$confirm->shouldHaveBeenCalledOnce();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user