File: dbunit

package info (click to toggle)
phpunit-dbunit 2.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 900 kB
  • ctags: 1,394
  • sloc: php: 5,449; xml: 477; sh: 42; makefile: 12
file content (39 lines) | stat: -rwxr-xr-x 1,132 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/php
<?php
/*
 * This file is part of DBUnit.
 *
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php', __DIR__ . '/../share/php/PHPUnit/Extensions/Database/Autoload.php') as $file) {
    if (file_exists($file)) {
        define('DBUNIT_COMPOSER_INSTALL', $file);
        break;
    }
}

unset($file);

if (!defined('DBUNIT_COMPOSER_INSTALL')) {
    fwrite(STDERR,
        'You need to set up the project dependencies using the following commands:' . PHP_EOL .
        'wget http://getcomposer.org/composer.phar' . PHP_EOL .
        'php composer.phar install' . PHP_EOL
    );
    die(1);
}

require DBUNIT_COMPOSER_INSTALL;

$command = new PHPUnit_Extensions_Database_UI_Command(
    new PHPUnit_Extensions_Database_UI_ModeFactory
);

$command->main(
    new PHPUnit_Extensions_Database_UI_Mediums_Text($_SERVER['argv']),
    new PHPUnit_Extensions_Database_UI_Context
);