mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-30 02:37:58 +08:00
Fix the errors for watcher tests (#5207)
This commit is contained in:
parent
5e27db78c7
commit
be4b34c589
@ -29,7 +29,7 @@ class FindDriverTest extends TestCase
|
||||
public function testWatch()
|
||||
{
|
||||
$container = ContainerStub::getContainer(FindDriver::class);
|
||||
$option = new Option($container->get(ConfigInterface::class), [], []);
|
||||
$option = new Option($container->get(ConfigInterface::class)->get('watcher'), [], []);
|
||||
$channel = new Channel(10);
|
||||
|
||||
try {
|
||||
|
@ -29,7 +29,7 @@ class FindNewerDriverTest extends TestCase
|
||||
public function testWatch()
|
||||
{
|
||||
$container = ContainerStub::getContainer(FindNewerDriver::class);
|
||||
$option = new Option($container->get(ConfigInterface::class), [], []);
|
||||
$option = new Option($container->get(ConfigInterface::class)->get('watcher'), [], []);
|
||||
$channel = new Channel(10);
|
||||
|
||||
try {
|
||||
|
@ -31,7 +31,7 @@ class FswatchDriverTest extends TestCase
|
||||
public function testWatch()
|
||||
{
|
||||
$container = ContainerStub::getContainer(FswatchDriver::class);
|
||||
$option = new Option($container->get(ConfigInterface::class), [], []);
|
||||
$option = new Option($container->get(ConfigInterface::class)->get('watcher'), [], []);
|
||||
$channel = new Channel(10);
|
||||
try {
|
||||
$driver = new FswatchDriver($option);
|
||||
|
@ -31,7 +31,7 @@ class ScanFileDriverTest extends TestCase
|
||||
public function testWatch()
|
||||
{
|
||||
$container = ContainerStub::getContainer(ScanFileDriver::class);
|
||||
$option = new Option($container->get(ConfigInterface::class), [], []);
|
||||
$option = new Option($container->get(ConfigInterface::class)->get('watcher'), [], []);
|
||||
|
||||
$channel = new Channel(10);
|
||||
$driver = new ScanFileDriverStub($option, $container->get(StdoutLoggerInterface::class));
|
||||
|
@ -32,7 +32,7 @@ class WatcherTest extends TestCase
|
||||
],
|
||||
]);
|
||||
|
||||
$option = new Option($config, ['src'], []);
|
||||
$option = new Option($config->get('watcher'), ['src'], []);
|
||||
|
||||
$this->assertSame('xxx', $option->getDriver());
|
||||
$this->assertSame(['app', 'config', 'src'], $option->getWatchDir());
|
||||
|
Loading…
Reference in New Issue
Block a user