[COMPOSER] Add new php-ffmpeg package
This commit is contained in:
45
vendor/symfony/finder/Tests/PhpFinderTest.php
vendored
Normal file
45
vendor/symfony/finder/Tests/PhpFinderTest.php
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\Finder\Tests;
|
||||
|
||||
use Symfony\Component\Finder\Adapter\PhpAdapter;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
*/
|
||||
class PhpFinderTest extends FinderTest
|
||||
{
|
||||
public function testImplementationsAreSynchronized()
|
||||
{
|
||||
$adapterReflector = new \ReflectionMethod('Symfony\Component\Finder\Adapter\PhpAdapter', 'searchInDirectory');
|
||||
$finderReflector = new \ReflectionMethod('Symfony\Component\Finder\Finder', 'searchInDirectory');
|
||||
|
||||
$adapterSource = \array_slice(file($adapterReflector->getFileName()), $adapterReflector->getStartLine() + 1, $adapterReflector->getEndLine() - $adapterReflector->getStartLine() - 1);
|
||||
$adapterSource = implode('', $adapterSource);
|
||||
$adapterSource = str_replace(array('$this->minDepth', '$this->maxDepth'), array('$minDepth', '$maxDepth'), $adapterSource);
|
||||
|
||||
$finderSource = \array_slice(file($finderReflector->getFileName()), $finderReflector->getStartLine() + 1, $finderReflector->getEndLine() - $finderReflector->getStartLine() - 1);
|
||||
$finderSource = implode('', $finderSource);
|
||||
|
||||
$this->assertStringEndsWith($adapterSource, $finderSource);
|
||||
}
|
||||
|
||||
protected function buildFinder()
|
||||
{
|
||||
$adapter = new PhpAdapter();
|
||||
|
||||
return Finder::create()
|
||||
->removeAdapters()
|
||||
->addAdapter($adapter);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user