Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darkin1 committed Dec 14, 2016
1 parent bb30aef commit a025d75
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
18 changes: 18 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="tests/bootstrap.php" colors="true">
<testsuites>
<testsuite name="Hello World Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./</directory>
<exclude>
<directory>./tests</directory>
</exclude>
</whitelist>
</filter>
</phpunit>
16 changes: 16 additions & 0 deletions tests/HelloWorldTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

/**
* Class HelloWorldTest.
*/
class HelloWorldTest extends PHPUnit_Framework_TestCase
{
public function setUp()
{
}

public function testHelloWorld()
{
$this->assertEquals('Hello World', 'Hello World');
}
}
10 changes: 10 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

function loader($class)
{
$file = $class.'.php';
if (file_exists($file)) {
require $file;
}
}
spl_autoload_register('loader');

0 comments on commit a025d75

Please sign in to comment.