Skip to content

Commit 11cb171

Browse files
committed
structure tests and add base resource
1 parent 3966a6f commit 11cb171

File tree

5 files changed

+53
-0
lines changed

5 files changed

+53
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/vendor
2+
composer.phar
3+
composer.lock
4+
tests/_output/*

.styleci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
preset: laravel

composer.json

+9
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@
1616
],
1717
"minimum-stability": "dev",
1818
"require": {},
19+
"require-dev": {
20+
"phpunit/phpunit" : "^8.0",
21+
"orchestra/testbench": "~3.8.0|^4.0"
22+
},
23+
"autoload-dev": {
24+
"psr-4": {
25+
"Laravel\\DataTables\\Tests\\": "tests/"
26+
}
27+
},
1928
"autoload": {
2029
"psr-4": {
2130
"Laravel\\DataTables\\" : "src/"

phpunit.xml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="false"
3+
backupStaticAttributes="false"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false">
11+
<testsuites>
12+
<testsuite name="Package Test Suite">
13+
<directory>./tests/</directory>
14+
</testsuite>
15+
</testsuites>
16+
<filter>
17+
<whitelist>
18+
<directory suffix=".php">app/</directory>
19+
</whitelist>
20+
</filter>
21+
<php>
22+
<env name="APP_ENV" value="testing"/>
23+
<env name="CACHE_DRIVER" value="array"/>
24+
<env name="SESSION_DRIVER" value="array"/>
25+
<env name="QUEUE_DRIVER" value="sync"/>
26+
<env name="CACHE_DRIVER" value="array"/>
27+
<env name="DB_CONNECTION" value="sqlite"/>
28+
<env name="DB_DATABASE" value=":memory" />
29+
</php>
30+
</phpunit>

tests/TestCase.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
namespace Laravel\DataTables\Tests;
3+
4+
use Orchestra\Testbench\TestCase as Orchestra;
5+
6+
abstract class TestCase extends Orchestra
7+
{
8+
9+
}

0 commit comments

Comments
 (0)