mirror of
https://github.com/getgrav/grav.git
synced 2026-06-17 23:21:45 +02:00
PHPUnit testing introduced
This commit is contained in:
@@ -20,12 +20,20 @@
|
||||
"donatj/phpuseragentparser": "dev-master",
|
||||
"pimple/pimple": "~3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Grav\\": "system/src/Grav"
|
||||
},
|
||||
"files": ["system/defines.php"]
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Grav\\Test\\": "system/tests/Grav/Test/"
|
||||
}
|
||||
},
|
||||
"archive": {
|
||||
"exclude": ["VERSION"]
|
||||
},
|
||||
|
||||
0
system/tests/Grav/Test/.gitkeep
Normal file
0
system/tests/Grav/Test/.gitkeep
Normal file
8
system/tests/Grav/TestCase.php
Normal file
8
system/tests/Grav/TestCase.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
namespace Grav;
|
||||
|
||||
|
||||
class TestCase extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
}
|
||||
6
system/tests/bootstrap.php
Normal file
6
system/tests/bootstrap.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
error_reporting(E_ALL);
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
require_once __DIR__.'/../../vendor/autoload.php';
|
||||
require_once __DIR__.'/Grav/TestCase.php';
|
||||
18
system/tests/phpunit.xml
Normal file
18
system/tests/phpunit.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit backupGlobals="false"
|
||||
backupStaticAttributes="false"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
processIsolation="true"
|
||||
stopOnFailure="false"
|
||||
syntaxCheck="false"
|
||||
bootstrap="./bootstrap.php"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Full Grav Test Suite">
|
||||
<directory>./Grav/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
Reference in New Issue
Block a user