Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/holz-machines/web/core/tests/Drupal/KernelTests/Core/File/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/holz-machines/web/core/tests/Drupal/KernelTests/Core/File/FileDeleteTest.php

<?php

namespace Drupal\KernelTests\Core\File;

use Drupal\Core\File\Exception\NotRegularFileException;

/**
 * Tests the unmanaged file delete function.
 *
 * @group File
 */
class FileDeleteTest extends FileTestBase {

  /**
   * Delete a normal file.
   */
  public function testNormal() {
    // Create a file for testing
    $uri = $this->createUri();

    // Delete a regular file
    $this->assertTrue(\Drupal::service('file_system')->delete($uri), 'Deleted worked.');
    $this->assertFileDoesNotExist($uri);
  }

  /**
   * Try deleting a missing file.
   */
  public function testMissing() {
    // Try to delete a non-existing file
    $this->assertTrue(\Drupal::service('file_system')->delete('public://' . $this->randomMachineName()), 'Returns true when deleting a non-existent file.');
  }

  /**
   * Try deleting a directory.
   */
  public function testDirectory() {
    // A directory to operate on.
    $directory = $this->createDirectory();

    // Try to delete a directory.
    try {
      \Drupal::service('file_system')->delete($directory);
      $this->fail('Expected NotRegularFileException');
    }
    catch (NotRegularFileException $e) {
      // Ignore.
    }
    $this->assertDirectoryExists($directory);
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net