Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F7277479
D1606.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D1606.diff
View Options
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,7 @@
+all: vendor
+
+vendor:
+ composer install
+
test:
- phpunit tests/coreTest
+ vendor/bin/phpunit
diff --git a/composer.json b/composer.json
--- a/composer.json
+++ b/composer.json
@@ -18,6 +18,9 @@
"require": {
"php": ">=5.4.0"
},
+ "require-dev": {
+ "phpunit/phpunit": "^7"
+ },
"autoload": {
"files": ["core.php"]
},
diff --git a/phpunit.xml b/phpunit.xml
new file mode 100644
--- /dev/null
+++ b/phpunit.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<phpunit bootstrap="vendor/autoload.php"
+ convertErrorsToExceptions="true"
+ convertNoticesToExceptions="true"
+ convertWarningsToExceptions="true"
+ stopOnFailure="false">
+ <php>
+ <ini name="display_errors" value="On" />
+ <ini name="display_startup_errors" value="On" />
+ <ini name="error_reporting" value="On" />
+ </php>
+ <testsuites>
+ <testsuite name="Unit tests">
+ <directory suffix="Test.php">./tests</directory>
+ </testsuite>
+ </testsuites>
+ <filter>
+ <whitelist processUncoveredFilesFromWhitelist="true">
+ <file>core.php</file>
+ </whitelist>
+ </filter>
+</phpunit>
diff --git a/tests/coreTest.php b/tests/coreTest.php
--- a/tests/coreTest.php
+++ b/tests/coreTest.php
@@ -2,8 +2,6 @@
namespace Keruald;
-require 'core.php';
-
class CoreTest extends \PHPUnit\Framework\TestCase {
///
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 24, 19:41 (16 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2599246
Default Alt Text
D1606.diff (1 KB)
Attached To
Mode
D1606: Configure phpunit to rely on Composer
Attached
Detach File
Event Timeline
Log In to Comment