Skip to content

Commit

Permalink
better unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spipu committed Feb 2, 2023
1 parent 9718fd4 commit b0f4777
Show file tree
Hide file tree
Showing 58 changed files with 9 additions and 4 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once __DIR__ . '/../../../vendor/autoload.php';
require_once __DIR__ . '/../../vendor/autoload.php';

if (!class_exists('PHPUnit_Framework_TestCase') && version_compare(phpversion(), '7.1') >= 0) {
class PHPUnit_Framework_TestCase extends PHPUnit\Framework\TestCase
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/Tests/ExamplesTest.php → Tests/ExamplesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ExamplesTest extends PHPUnit_Framework_TestCase
*/
protected function launchExample($example)
{
$filename = dirname(dirname(dirname(__FILE__))).'/examples/'.$example.'.php';
$filename = dirname(dirname(__FILE__)).'/examples/'.$example.'.php';
if (!is_file($filename)) {
throw new \Exception('The filename of the example ['.$example.'] does not exist!');
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@
"psr-4": {
"Spipu\\Html2Pdf\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Spipu\\Html2Pdf\\Tests\\": "Tests/"
}
}
}
4 changes: 2 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
bootstrap="./src/Tests/CrossVersionCompatibility/bootstrap.php"
bootstrap="./Tests/CrossVersionCompatibility/bootstrap.php"
colors="true"
backupGlobals="false"
backupStaticAttributes="false"
verbose="true"
>
<testsuites>
<testsuite name="unit">
<directory>src/Tests</directory>
<directory>Tests</directory>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit b0f4777

Please sign in to comment.