1<?php 2/* 3 * This file is part of PHPUnit. 4 * 5 * (c) Sebastian Bergmann <sebastian@phpunit.de> 6 * 7 * For the full copyright and license information, please view the LICENSE 8 * file that was distributed with this source code. 9 */ 10 11class Util_GlobalStateTest extends PHPUnit_Framework_TestCase 12{ 13 public function testIncludedFilesAsStringSkipsVfsProtocols() 14 { 15 $dir = __DIR__; 16 $files = [ 17 'phpunit', // The 0 index is not used 18 $dir . '/ConfigurationTest.php', 19 $dir . '/GlobalStateTest.php', 20 'vfs://' . $dir . '/RegexTest.php', 21 'phpvfs53e46260465c7://' . $dir . '/TestTest.php', 22 'file://' . $dir . '/XMLTest.php' 23 ]; 24 25 $this->assertEquals( 26 "require_once '" . $dir . "/ConfigurationTest.php';\n" . 27 "require_once '" . $dir . "/GlobalStateTest.php';\n" . 28 "require_once 'file://" . $dir . "/XMLTest.php';\n", PHPUnit_Util_GlobalState::processIncludedFilesAsString($files)); 29 } 30} 31