eZ\Publish\Core\MVC\Symfony\CacheTests\Http\LocationAwareStoreTest::testGetPathDeadProcess PHP Method

testGetPathDeadProcess() public method

    public function testGetPathDeadProcess()
    {
        if (!function_exists('posix_kill')) {
            self::markTestSkipped('posix_kill() function is needed for this test');
        }
        $locationId = 123;
        $prefix = LocationAwareStore::LOCATION_CACHE_DIR . "/{$locationId}";
        $lockFile = $this->store->getLocationCacheLockName($locationId);
        file_put_contents($lockFile, '99999999999999999');
        $path = $this->store->getPath("{$prefix}/en" . sha1('someContent'));
        $this->assertTrue(strpos($path, __DIR__ . "/{$prefix}") === 0);
        $this->assertFalse(file_exists($lockFile));
    }