# wp-optimize/3.2.5/vendor/rosell-dk/file-util/tests/FileExistsUsingExecTest.php

WP-Optimize – Cache, Compress images, Minify &amp; Clean database to boost page speed &amp; performance, version 3.2.5. 19 lines.

- Page: https://pluginprobe.com/plugins/wp-optimize/3.2.5/code/vendor/rosell-dk/file-util/tests/FileExistsUsingExecTest.php
- Raw: https://pluginprobe.com/plugins/wp-optimize/3.2.5/raw/vendor/rosell-dk/file-util/tests/FileExistsUsingExecTest.php
- Modified: 2022-06-03T18:20:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-optimize/3.2.5/code/vendor/rosell-dk/file-util/tests/FileExistsUsingExecTest.php#L10-L20`.

```php
<?php

namespace FileUtil\Tests;

use PHPUnit\Framework\TestCase;
use FileUtil\FileExistsUsingExec;

class FileExistsUsingExecTest extends TestCase
{
    public function testFileExists()
    {
        if (function_exists('exec')) {
            $this->assertTrue(FileExistsUsingExec::fileExists(__DIR__ . '/FileExistsTest.php'));
            $this->assertFalse(FileExistsUsingExec::fileExists(__DIR__ . '/not-here.php'));
        }
    }

}

```
