Skip to content

Commit ce6d69f

Browse files
committed
Added tests skeleton, now about those tests...
1 parent 92d09ae commit ce6d69f

File tree

5 files changed

+47
-2
lines changed

5 files changed

+47
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
vendor/*
2-
*.sublime-*
2+
*.sublime-*
3+
phpunit.xml

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: php
2+
php:
3+
- 5.3
4+
- 5.4
5+
before_script:
6+
- composer install --dev
7+
script: phpunit

phpunit.xml.dist

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="tests/bootstrap.php" colors="true">
3+
<testsuites>
4+
<testsuite name="Nod Suite">
5+
<directory>tests/Nod/</directory>
6+
</testsuite>
7+
</testsuites>
8+
<filter>
9+
<whitelist>
10+
<directory suffix=".php">src/Nod/</directory>
11+
</whitelist>
12+
</filter>
13+
</phpunit>

bootstrap.php renamed to tests/Nod/Test.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@
1010
* @author Filipe Dobreira <http://github.com/filp>
1111
* @license MIT
1212
*/
13-
require __DIR__ . '/vendor/autoload.php';
13+
14+
namespace Nod;
15+
16+
/**
17+
* Nod\Test
18+
*/
19+
class Test extends \PHPUnit_Framework_TestCase {}

tests/bootstrap.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
/**
4+
* This file is part of Nod, a desktop notifications
5+
* library for PHP. Nod is distributed freely under
6+
* the MIT license, available at:
7+
* http://opensource.org/licenses/mit-license.php
8+
*
9+
* @package Nod
10+
* @author Filipe Dobreira <http://github.com/filp>
11+
* @license MIT
12+
*/
13+
call_user_func(function() {
14+
$loader = require __DIR__ . '/../vendor/autoload.php';
15+
$loader->add('Nod\\', __DIR__);
16+
17+
return $loader;
18+
});

0 commit comments

Comments
 (0)