Debugging Unit Tests ?

It might sound trivial and the solution is more than easy - but as I am frequently asked how todo this, here is the simple answer.

Create a PHP file in the directory where you start your Unittests usually with this content:

1
2
3
4
5
6
7
8
9
10
11
12
13
 
$unitTest = '...Your Unittest name - e.g. unit_mytest.php or Alltests.php etc...';
 
$_SERVER['argv'] = array(
'/...path to your PHPUnit.../PHPUnit/TextUI/Command.php',
$unitTest
);
 
echo "<pre>";
include( '/...path to your PHPUnit.../PHPUnit/TextUI/Command.php' );
echo "</pre>";
 
...

Point your browser to this file, et voila - Unit test in the Browser.

Ok ;) - this solution is very easy and silly - but it works very well. And at least I got the impression that there are enough people around who do not know how to debug unit tests…

Billigflüge finden….

So und jetzt muss ich mal ein paar Sätze über mein neuestes Projekt loswerden. Swoodoo ist eine Suchmaschine für Flüge - klingt erstmal nicht so spannend - ist es aber ;)

Der grosse Unterschied zwischen Swoodoo und anderen sog. “Metacrawlern” ist der, das zusätzlich zum Live durchsuchen diverser Portale wie z.b. Expedia auch eine eigene Datenbank geführt wird. Und das ist ziemlich geil, denn es erlaubt die wirklich billigen Flüge auch zu finden - denn man kann ohne Angabe von Datum oder Ort suchen.

Ein paar Beispiele gefällig ?
- Die billigsten Flüge ab Deutschland
- Von Stuttgart nach Spanien

Hmmm wo isses denn gerade noch warm ? Ah ja - Türkei :)
- also fliegen wir von Deutschland nach Istanbul

Und genau solche Suchen kann sonst keiner. Über den Filter links kann man auch schön einschränken z.B. nur für Wochenend Flüge etc. Ziemlich gute Sache das. Technisch auch ziemlich komplex irgendwann demnächst wird auch ein Artikel im PHPMagazin dazu erscheinen.

Viel Spass beim Stöbern ;)

Archiving your data ?

After I lost all my pictures once - as for sure I had not made a backup I realized that it is no good to keep things without backing it up. Even then something still can happen e.g. some month’s ago my external backup HDD died cause I simply forgot to switch it off and it run a few days…. a ‘bit’ hot…

Anyway there is a really nice solution named ‘Gigabank‘ where you can upload your data - and they are safe. The difference between this system and others like Flickr etc. is simply that the data is on a secure WORM storage in Switzerland. No way to delete the data. For sure this works also for every other data - you can upload whatever you want and it is safe ( yes even YOU can’t delete it any more ). Quite nice idea actually. The best thing is - you get one GByte for free when you create an Account. Should be enough for the most important data.

Check it out - https://www.gigabank.de/en/gigabank/index.php

Patenkinder…

Heute läuft ja so ein Aktionstag - “Ein Blogeintrag für Patenkinder”. Auch wenn ich World Vision nicht kenne ist es doch einen Link wert. Trotz meiner manchmal recht extremen Ansichten finde ich die Idee mit Patenkindern gut - und auch wir ( meine Frau vorallem, ich geb’s zu) haben seit vielen vielen Jahren ein Patenkind, allerdings mittels Plan International. Schon eine gute Sache das, und die paar Euro merkt - zumindest in unserer Branche - keiner.

Also schreib ich auch was drüber und hier ist das passende Banner dazu;

bloggerdaypatenkinder.worldvision.de

Wobei ich schon komisch finde das die Jungs nicht mal ihre Image Tags korrekt machen können…. egal…