Autoload the test classes

This commit is contained in:
Jeremy Dormitzer 2018-11-23 22:25:56 -05:00
parent a79c2f316f
commit c23604206c
7 changed files with 16 additions and 12 deletions

View File

@ -11,7 +11,7 @@
}
],
"scripts": {
"test": "phpunit -c ./test/config/config.xml test",
"test": "phpunit -c ./test/config.xml test",
"test-debug": "XDEBUG_CONFIG='idekey=ap_session' php ./vendor/bin/phpunit test"
},
"repositories": [
@ -33,6 +33,11 @@
"ActivityPub\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"ActivityPub\\Test\\": "test/"
}
},
"config": {
"sort-packages": true
}

View File

@ -1,10 +1,9 @@
<?php
require_once dirname( __FILE__ ) . '/config/SQLiteTestCase.php';
require_once dirname( __FILE__ ) . '/config/ArrayDataSet.php';
namespace ActivityPub\Test;
use ActivityPub\ActivityPub;
use ActivityPub\Config\SQLiteTestCase;
use ActivityPub\Config\ArrayDataSet;
use ActivityPub\Test\Config\SQLiteTestCase;
use ActivityPub\Test\Config\ArrayDataSet;
class ActivityPubTest extends SQLiteTestCase
{

View File

@ -1,5 +1,5 @@
<?php
namespace ActivityPub\Config;
namespace ActivityPub\Test\Config;
use PHPUnit\DbUnit\DataSet\AbstractDataSet;
use PHPUnit\DbUnit\DataSet\DefaultTableMetadata;

View File

@ -1,5 +1,5 @@
<?php
namespace ActivityPub\Config;
namespace ActivityPub\Test\Config;
use ActivityPub\ActivityPub;
use PHPUnit\Framework\TestCase;

View File

@ -1,10 +1,8 @@
<?php
require_once dirname( __FILE__ ) . '/config/SQLiteTestCase.php';
require_once dirname( __FILE__ ) . '/config/ArrayDataSet.php';
require_once dirname( __FILE__ ) . '/../src/Objects/ObjectsService.php';
namespace ActivityPub\Test;
use ActivityPub\Config\SQLiteTestCase;
use ActivityPub\Config\ArrayDataSet;
use ActivityPub\Test\Config\SQLiteTestCase;
use ActivityPub\Test\Config\ArrayDataSet;
use ActivityPub\Entities\Field;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Setup;

View File

@ -1,4 +1,6 @@
<?php
namespace ActivityPub\Test;
use ActivityPub\ActivityPub;
$dbPath = dirname( __FILE__ ) . '/../db.sqlite';