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 {
 
     ///