Neos\Flow\Tests\Unit\Monitor\FileMonitorTest::detectChangesDetectsDeletedFilesOfMonitoredDirectoriesIfPatternIsMatched PHP Метод

detectChangesDetectsDeletedFilesOfMonitoredDirectoriesIfPatternIsMatched() публичный Метод

    public function detectChangesDetectsDeletedFilesOfMonitoredDirectoriesIfPatternIsMatched()
    {
        $testPath = vfsStream::url('testDirectory');
        // Initially known files per path
        $knownDirectoriesAndFiles = [Files::getNormalizedPath($testPath) => [$testPath . '/NodeTypes.foo.yaml' => 1]];
        // Outcome of the change dection per file
        $changeDetectionResult = [$testPath . '/NodeTypes.foo.yaml' => ChangeDetectionStrategyInterface::STATUS_DELETED];
        // Expected emitted changes for files
        $expectedEmittedChanges = [$testPath . '/NodeTypes.foo.yaml' => ChangeDetectionStrategyInterface::STATUS_DELETED];
        $fileMonitor = $this->setUpFileMonitorForDetection($changeDetectionResult, $expectedEmittedChanges, $knownDirectoriesAndFiles);
        $fileMonitor->monitorDirectory($testPath, 'NodeTypes(\\..+)?\\.yaml');
        $fileMonitor->detectChanges();
    }