File tree 1 file changed +21
-2
lines changed 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 7
7
* For the full copyright and license information, please view the LICENSE
8
8
* file that was distributed with this source code.
9
9
*/
10
+ const TEST_FILES_PATH = __DIR__ . DIRECTORY_SEPARATOR . '_files ' . DIRECTORY_SEPARATOR ;
11
+
12
+ if (defined ('__PHPUNIT_PHAR__ ' )) {
13
+ if (!file_exists (__DIR__ . '/autoload.php ' )) {
14
+ print __DIR__ . '/autoload.php does not exist ' . PHP_EOL ;
15
+
16
+ exit (1 );
17
+ }
18
+
19
+ require_once __DIR__ . '/autoload.php ' ;
20
+
21
+ $ jsonFile = realpath (__DIR__ . '/../composer.json ' );
22
+ $ base = dirname ($ jsonFile );
23
+
24
+ foreach (json_decode (file_get_contents ($ jsonFile ), true )['autoload-dev ' ]['files ' ] as $ file ) {
25
+ require_once $ base . DIRECTORY_SEPARATOR . $ file ;
26
+ }
27
+
28
+ return ;
29
+ }
30
+
10
31
if (!defined ('PHPUNIT_COMPOSER_INSTALL ' )) {
11
32
define ('PHPUNIT_COMPOSER_INSTALL ' , dirname (__DIR__ ) . '/vendor/autoload.php ' );
12
33
}
13
34
14
- const TEST_FILES_PATH = __DIR__ . DIRECTORY_SEPARATOR . '_files ' . DIRECTORY_SEPARATOR ;
15
-
16
35
require_once PHPUNIT_COMPOSER_INSTALL ;
You can’t perform that action at this time.
0 commit comments