Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

PhpExecutableFinderTest.php

Zuletzt modifiziert: 02.04.2025, 15:03 - Dateigröße: 2.13 KiB


01  <?php
02   
03  /*
04   * This file is part of the Symfony package.
05   *
06   * (c) Fabien Potencier <fabien@symfony.com>
07   *
08   * For the full copyright and license information, please view the LICENSE
09   * file that was distributed with this source code.
10   */
11   
12  namespace Symfony\Component\Process\Tests;
13   
14  use PHPUnit\Framework\TestCase;
15  use Symfony\Component\Process\PhpExecutableFinder;
16   
17  /**
18   * @author Robert Schönthal <seroscho@googlemail.com>
19   */
20  class PhpExecutableFinderTest extends TestCase
21  {
22      /**
23       * tests find() with the constant PHP_BINARY.
24       */
25      public function testFind()
26      {
27          if (\defined('HHVM_VERSION')) {
28              $this->markTestSkipped('Should not be executed in HHVM context.');
29          }
30   
31          $f = new PhpExecutableFinder();
32   
33          $current = \PHP_BINARY;
34          $args = 'phpdbg' === \PHP_SAPI ? ' -qrr' : '';
35   
36          $this->assertEquals($current.$args, $f->find(), '::find() returns the executable PHP');
37          $this->assertEquals($current, $f->find(false), '::find() returns the executable PHP');
38      }
39   
40      /**
41       * tests find() with the env var / constant PHP_BINARY with HHVM.
42       */
43      public function testFindWithHHVM()
44      {
45          if (!\defined('HHVM_VERSION')) {
46              $this->markTestSkipped('Should be executed in HHVM context.');
47          }
48   
49          $f = new PhpExecutableFinder();
50   
51          $current = getenv('PHP_BINARY') ?: \PHP_BINARY;
52   
53          $this->assertEquals($current.' --php', $f->find(), '::find() returns the executable PHP');
54          $this->assertEquals($current, $f->find(false), '::find() returns the executable PHP');
55      }
56   
57      /**
58       * tests find() with the env var PHP_PATH.
59       */
60      public function testFindArguments()
61      {
62          $f = new PhpExecutableFinder();
63   
64          if (\defined('HHVM_VERSION')) {
65              $this->assertEquals(['--php'], $f->findArguments(), '::findArguments() returns HHVM arguments');
66          } elseif ('phpdbg' === \PHP_SAPI) {
67              $this->assertEquals(['-qrr'], $f->findArguments(), '::findArguments() returns phpdbg arguments');
68          } else {
69              $this->assertEquals([], $f->findArguments(), '::findArguments() returns no arguments');
70          }
71      }
72  }
73