touch example

continue;
            }

            $bundlePath = $bundle->getPath();
            $publicPath = $bundlePath . '/Resources/public';

            if (!is_dir($publicPath)) {
                continue;
            }

            if (file_exists($bundlePath . '/Resources/public/administration/css')) {
                touch($bundle->getPath() . '/Resources/.administration-css');
            }

            if (file_exists($bundlePath . '/Resources/public/administration/js')) {
                touch($bundle->getPath() . '/Resources/.administration-js');
            }

            $fs->remove($publicPath);

            $io->success(sprintf('Removed public assets for bundle "%s"', $bundle->getName()));
        }

        
$folders = ['example' => []];
    foreach ($extension_names as $extension_name) {
      $folders['example'][$extension_name][$extension_name . '.info.yml'] = Yaml::encode([
        'name' => 'test name',
        'type' => 'test_extension',
        'core' => '8.x',
      ] + $additional_info_values);
    }
    vfsStream::create($folders);
    foreach ($extension_names as $extension_name) {
      touch("vfs://drupal_root/example/$extension_name/$extension_name.info.yml", 123456789);
    }

    [$cache$info_parser$module_handler$state] = $this->getMocks();
    $info_parser->parse(Argument::any())->will(function D$args) {
      return Yaml::decode(file_get_contents('vfs://drupal_root/' . $args[0]));
    });

    $test_extension_list = new TestExtension('vfs://drupal_root', 'test_extension', $cache->reveal()$info_parser->reveal()$module_handler->reveal()$state->reveal(), 'testing');

    $extension_discovery = $this->prophesize(ExtensionDiscovery::class);
    $extension_scan_result = [];
    
fwrite($v_dest_file$v_content($v_header['size'] % 512));
                            }

                            @fclose($v_dest_file);

                            if ($p_preserve) {
                                @chown($v_header['filename']$v_header['uid']);
                                @chgrp($v_header['filename']$v_header['gid']);
                            }

                            // ----- Change the file mode, mtime                             @touch($v_header['filename']$v_header['mtime']);
                            if ($v_header['mode'] & 0111) {
                                // make file executable, obey umask                                 $mode = fileperms($v_header['filename']) | (~umask() & 0111);
                                @chmod($v_header['filename']$mode);
                            }
                        }

                        // ----- Check the file size                         clearstatcache();
                        if (!is_file($v_header['filename'])) {
                            $this->_error(
                                
class DirectoryResourceTest extends TestCase
{
    protected string $directory;

    protected function setUp(): void
    {
        $this->directory = sys_get_temp_dir().\DIRECTORY_SEPARATOR.'symfonyDirectoryIterator';
        if (!file_exists($this->directory)) {
            mkdir($this->directory);
        }
        touch($this->directory.'/tmp.xml');
    }

    protected function tearDown(): void
    {
        if (!is_dir($this->directory)) {
            return;
        }
        $this->removeDirectory($this->directory);
    }

    protected function removeDirectory(string $directory): void
    {
// Finally reset the modification time of the directory to match the one of     // the newly created file. In order to prevent the creation of a file if the     // directory does not exist, ensure that the path terminates with a     // directory separator.     //     // Recall that when subsequently loading the file, the hash is calculated     // based on the file name, the containing mtime, and a the secret string.     // Hence updating the mtime here is comparable to pointing a symbolic link     // at a new target, i.e., the newly created file.     if ($result) {
      $result &= touch($directory . '/', $mtime);
    }

    return (bool) $result;
  }

  /** * Gets the full path where the file is or should be stored. * * This function creates a file path that includes a unique containing * directory for the file and a file name that is a hash of the virtual file * name, a cryptographic secret, and the containing directory mtime. If the * file is overridden by an insecure upload script, the directory mtime gets * modified, invalidating the file, thus protecting against untrusted code * getting executed. * * @param string $name * The virtual file name. Can be a relative path. * @param string $directory * (optional) The directory containing the file. If not passed, this is * retrieved by calling getContainingDirectoryFullPath(). * @param int $directory_mtime * (optional) The mtime of $directory. Can be passed to avoid an extra * filesystem call when the mtime of the directory is already known. * * @return string * The full path where the file is or should be stored. */

  protected function createMigrationConnection() {
    $connection_info = Database::getConnectionInfo('default')['default'];
    if ($connection_info['driver'] === 'sqlite') {
      // Create database file in the test site's public file directory so that       // \Drupal\Tests\BrowserTestBase::cleanupEnvironment() will delete this       // once the test is complete.       $file = $this->publicFilesDirectory . '/' . $this->testId . '-migrate.db.sqlite';
      touch($file);
      $connection_info['database'] = $file;
      $connection_info['prefix'] = '';
    }
    else {
      $prefix = $connection_info['prefix'];
      // Test databases use fixed length prefixes. Create a new prefix for the       // source database. Adding to the end of the prefix ensures that       // \Drupal\Tests\BrowserTestBase::cleanupEnvironment() will remove the       // additional tables.       $connection_info['prefix'] = $prefix . '0';
    }

    


        if ('\\' === \DIRECTORY_SEPARATOR) {
            $this->markTestSkipped('Cannot verify chmod operations on Windows');
        }

        if (!getenv('USER') || 'root' === getenv('USER')) {
            $this->markTestSkipped('This test will fail if run under superuser');
        }

        $path = __DIR__.'/Fixtures/mimetypes/to_delete';
        touch($path);
        @chmod($path, 0333);

        if (str_ends_with(sprintf('%o', fileperms($path)), '0333')) {
            $this->expectException(\InvalidArgumentException::class);
            $this->getGuesser()->guessMimeType($path);
        } else {
            $this->markTestSkipped('Cannot verify chmod operations, change of file permissions failed');
        }
    }
}
    // consider the image valid.     $png_resource = imagecreate(300, 300);
    imagefill($png_resource, 0, 0, imagecolorallocate($png_resource, 0, 0, 0));
    imagepng($png_resource$png->getFileUri());

    $svg = File::create([
      'uri' => 'public://test-image.svg',
    ]);
    $svg->save();
    // We don't have to put any real SVG data in here, because the GD toolkit     // won't be able to load it anyway.     touch($svg->getFileUri());

    $entity = EntityTest::create([
      'name' => $this->randomMachineName(),
      $this->fieldName => [$png$svg],
    ]);
    $entity->save();

    // Ensure that the display is using the medium image style.     $component = $this->display->getComponent($this->fieldName);
    $component['settings']['image_style'] = 'medium';
    $this->display->setComponent($this->fieldName, $component)->save();

    
$tester = new ApplicationTester($application);
        $tester->run(['command' => 'debug:container', '--env-var' => 'js']['decorated' => false]);

        $this->assertStringContainsString(file_get_contents(__DIR__.'/Fixtures/describe_env_vars.txt')$tester->getDisplay(true));
    }

    public function testGetDeprecation()
    {
        static::bootKernel(['test_case' => 'ContainerDebug', 'root_config' => 'config.yml', 'debug' => true]);
        $path = sprintf('%s/%sDeprecations.log', static::$kernel->getContainer()->getParameter('kernel.build_dir')static::$kernel->getContainer()->getParameter('kernel.container_class'));
        touch($path);
        file_put_contents($pathserialize([[
            'type' => 16384,
            'message' => 'The "Symfony\Bundle\FrameworkBundle\Controller\Controller" class is deprecated since Symfony 4.2, use Symfony\Bundle\FrameworkBundle\Controller\AbstractController instead.',
            'file' => '/home/hamza/projet/contrib/sf/vendor/symfony/framework-bundle/Controller/Controller.php',
            'line' => 17,
            'trace' => [[
                'file' => '/home/hamza/projet/contrib/sf/src/Controller/DefaultController.php',
                'line' => 9,
                'function' => 'spl_autoload_call',
            ]],
            'count' => 1,
        ]]));
// Check if directory exists.       if (!is_dir($html_output_directory) || !is_writable($html_output_directory)) {
        $this->writeWithColor('bg-red, fg-black', "HTML output directory $html_output_directory is not a writable directory.");
      }
      else {
        // Convert to a canonicalized absolute pathname just in case the current         // working directory is changed.         $html_output_directory = realpath($html_output_directory);
        $this->browserOutputFile = tempnam($html_output_directory, 'browser_output_');
        if ($this->browserOutputFile) {
          touch($this->browserOutputFile);
        }
        else {
          $this->writeWithColor('bg-red, fg-black', "Unable to create a temporary file in $html_output_directory.");
        }
      }
    }

    if ($this->browserOutputFile) {
      putenv('BROWSERTEST_OUTPUT_FILE=' . $this->browserOutputFile);
    }
    else {
      

class FlexMigratorTest extends TestCase
{
    public function testCleanup(): void
    {
        $tmpDir = sys_get_temp_dir() . '/flex-migrator-test';
        $fs = new Filesystem();
        $fs->mkdir($tmpDir);

        $fs->touch($tmpDir . '/Dockerfile');
        $fs->mkdir($tmpDir . '/.github/workflows');
        $fs->touch($tmpDir . '/.github/workflows/build.yml');

        $flexMigrator = new FlexMigrator();

        $flexMigrator->cleanup($tmpDir);

        static::assertFileDoesNotExist($tmpDir . '/Dockerfile');
        static::assertFileDoesNotExist($tmpDir . '/.github/workflows/build.yml');

        $fs->remove($tmpDir);
    }

        return $this->memcached->quit();
    }

    protected function doRead(#[\SensitiveParameter] string $sessionId): string     {
        return $this->memcached->get($this->prefix.$sessionId) ?: '';
    }

    public function updateTimestamp(#[\SensitiveParameter] string $sessionId, string $data): bool     {
        $this->memcached->touch($this->prefix.$sessionId$this->getCompatibleTtl());

        return true;
    }

    protected function doWrite(#[\SensitiveParameter] string $sessionId, string $data): bool     {
        return $this->memcached->set($this->prefix.$sessionId$data$this->getCompatibleTtl());
    }

    private function getCompatibleTtl(): int
    {
        


  /** * {@inheritdoc} */
  public function stream_metadata($uri$option$value) {
    $target = $this->getLocalPath($uri);
    $return = FALSE;
    switch ($option) {
      case STREAM_META_TOUCH:
        if (!empty($value)) {
          $return = touch($target$value[0]$value[1]);
        }
        else {
          $return = touch($target);
        }
        break;

      case STREAM_META_OWNER_NAME:
      case STREAM_META_OWNER:
        $return = chown($target$value);
        break;

      
/** * {@inheritdoc} */
  protected $defaultTheme = 'stark';

  /** * Installer step: Select language. */
  protected function setUpLanguage() {
    // Place a custom local translation in the translations directory.     mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
    touch($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.xoxo.po');

    // Check that all predefined languages show up with their native names.     $this->visitInstaller();
    foreach (LanguageManager::getStandardLanguageList() as $langcode => $names) {
      $this->assertSession()->optionExists('edit-langcode', $langcode);
      $this->assertSession()->responseContains('>' . $names[1] . '<');
    }

    // Check that our custom one shows up with the file name indicated language.     $this->assertSession()->optionExists('edit-langcode', 'xoxo');
    $this->assertSession()->responseContains('>xoxo<');

    


    private static function guessShell(): string
    {
        return basename($_SERVER['SHELL'] ?? '');
    }

    private function tailDebugLog(string $commandName, OutputInterface $output): void
    {
        $debugFile = sys_get_temp_dir().'/sf_'.$commandName.'.log';
        if (!file_exists($debugFile)) {
            touch($debugFile);
        }
        $process = new Process(['tail', '-f', $debugFile], null, null, null, 0);
        $process->run(function Dstring $type, string $line) use ($output): void {
            $output->write($line);
        });
    }

    /** * @return string[] */
    private function getSupportedShells(): array
    {
Home | Imprint | This part of the site doesn't use cookies.