PHPUnit testing introduced

This commit is contained in:
Jan Chren
2014-09-14 22:44:59 +02:00
parent 0276ce94df
commit 2d95b3bb09
5 changed files with 40 additions and 0 deletions

View File

@@ -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"]
},

View File

View File

@@ -0,0 +1,8 @@
<?php
namespace Grav;
class TestCase extends \PHPUnit_Framework_TestCase
{
}

View 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
View 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>