Skip to content

Commit

Permalink
move tests to /tests directory and adapt bootstrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
bicpi committed Apr 18, 2013
1 parent f095535 commit ea733b4
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 92 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
build/
vendor/

composer.lock
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

php:
- 5.3.3
- 5.3
- 5.4

Expand Down
9 changes: 0 additions & 9 deletions autoload.php.dist

This file was deleted.

72 changes: 0 additions & 72 deletions composer.lock

This file was deleted.

17 changes: 14 additions & 3 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./autoload.php.dist" colors="true">

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php.dist"
>
<testsuites>
<testsuite name="bicpi Test Suite">
<directory>./src/bicpi/*/Tests/</directory>
<testsuite name="bicpi HtmlConverter Test Suite">
<directory>./tests</directory>
</testsuite>
</testsuites>
</phpunit>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace bicpi\HtmlConverter\Tests;
namespace bicpi\HtmlConverter;

use bicpi\HtmlConverter\Exception\ConverterException;
use bicpi\HtmlConverter\Converter\ChainConverter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace bicpi\HtmlConverter\Tests\Converter;
namespace bicpi\HtmlConverter\Converter;

use bicpi\HtmlConverter\Tests\Tool\BaseTestCase;
use bicpi\HtmlConverter\Converter\Html2TextConverter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace bicpi\HtmlConverter\Tests\Converter;
namespace bicpi\HtmlConverter\Converter;

use bicpi\HtmlConverter\Tests\Tool\BaseTestCase;
use bicpi\HtmlConverter\Converter\LynxConverter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace bicpi\HtmlConverter\Tests\Converter;
namespace bicpi\HtmlConverter\Converter;

use bicpi\HtmlConverter\Converter\SimpleConverter;
use bicpi\HtmlConverter\Tests\Tool\BaseTestCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ abstract class BaseTestCase extends \PHPUnit_Framework_TestCase
{
public function getFixtureContent($fixture)
{
return file_get_contents(__DIR__.'/../Fixtures/'.$fixture);
return file_get_contents(dirname(__DIR__).'/Fixtures/'.$fixture);
}
}
7 changes: 7 additions & 0 deletions tests/bootstrap.php.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

$baseDir = dirname(__DIR__);

$loader = require_once $baseDir.'/vendor/autoload.php';
$loader->add('bicpi\HtmlConverter\Tests\\', __DIR__);
$loader->register();

0 comments on commit ea733b4

Please sign in to comment.