Fix the errors for watcher tests (#5207)

This commit is contained in:
Deeka Wong 2022-11-18 17:45:31 +08:00 committed by GitHub
parent 5e27db78c7
commit be4b34c589
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

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

View File

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

View File

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