Add PHPUnit for testing
This commit is contained in:
parent
732b0c7e0c
commit
ba5a8dc8ea
|
|
@ -9,3 +9,7 @@ var/
|
|||
|
||||
# Composer dependencies:
|
||||
/vendor/
|
||||
|
||||
# PHPUnit caches:
|
||||
.phpunit.cache/
|
||||
.phpunit.result.cache
|
||||
|
|
|
|||
|
|
@ -12,5 +12,7 @@
|
|||
"PHPStarter\\": "src/"
|
||||
}
|
||||
},
|
||||
"require": {}
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^12.5"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.4/phpunit.xsd"
|
||||
bootstrap="tests/bootstrap.php">
|
||||
<testsuites>
|
||||
<testsuite name="PHPStarter Test Suite">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
public function test_it_works()
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
Loading…
Reference in New Issue