Skip to content

Commit

Permalink
Add phpunit.xml.dist and bootstrap file for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Baachi committed Oct 27, 2011
1 parent 9b68841 commit 25fce29
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* SearchService
* Aggregiert eine ObjectManager Instanz: $searchManager = new SearchManager($objectManager);
* Direkt mit API (Solr, Lucene, ... Adapter nutzbar)
* Wandelt zurŸckgegebene IDs per Batch-Operation in Objekte um
* EventListener fŸr Indexierung, new SearchIndexListener($backendAdapter);
* Nutzt ObjectManager::getClassMetadata() fŸr Grundstruktur
* Hat eigene Annotationen fŸr komplexere Konfigurationszwecke
* Wandelt zurückgegebene IDs per Batch-Operation in Objekte um
* EventListener für Indexierung, new SearchIndexListener($backendAdapter);
* Nutzt ObjectManager::getClassMetadata() für Grundstruktur
* Hat eigene Annotationen für komplexere Konfigurationszwecke

An der Klasse:
@ORM\Entity
Expand Down
1 change: 0 additions & 1 deletion lib/Doctrine/Search/Http/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

interface Client
{

public function getRequest();

public function getResponse();
Expand Down
25 changes: 25 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="test/bootstrap.php"
>
<testsuites>
<testsuite name="Doctrine Search Test Suite">
<directory>./test/Doctrine/Search</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">./lib/Doctrine/Search</directory>
</whitelist>
</filter>
</phpunit>
17 changes: 17 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
spl_autoload_register(function ($class) {

if ( 0 !== strpos($class, 'Doctrine\\Search')) {
return false;
}

$path = __DIR__ . '/../lib';
$file = strtr($class, '\\', '/') . '.php';
$filename = $path . '/' . $file;

if ( file_exists($filename) ) {
return (Boolean) require_once $filename;
}

return false;
} );

0 comments on commit 25fce29

Please sign in to comment.