test.ical.ly | getting the web by the balls

TAG | Tests

For a while I’ve been toying with the idea to set up a fully automated continuous deployment process for my symfony plugins. You can think of continuous deployment as a continuous integration process with automated deployment.

I just didn’t come round to do it as I couldn’t find the time so far. But then I read this article by Toni Schneider about CD at wordpress.com and it got me hooked again.

So I thought lets write down what it takes for a start.

(more…)

· · · · · · · ·

I just wrote two functional tests for the sfBulkUploadPlugin I introduced in yesterdays post.

I haven’t written functional tests in a while so it took me some time to remember what you have to do to be able to run them from within your plugins fixture project. In case you stumble about the same question here’s the answer. (more…)

· · · ·

I’ve got this one question puzzling me for quite some time now and I got to get it off my chest.

An just to make sure there are no misunderstandings: I am not about to question TDD!

I am merely asking for help to find my way to do it properly..

(more…)

· · · · · · ·

field-book-of-ponds-and-streamsIn the last couple of months I have occupied myself a lot with unit testing. Once you get the hand of it it starts to feel natural and easy and you don’t want to miss it any more. Testing rocks!

Another thing I worked with are PHP streams which IMHO is one of the most underrated features of PHP.

Naturally I want to test my stream wrappers with PHPUnit just as I would test everything else. But it’s not that easy..

(more…)

· · · · · ·

elephpantEarlier this year I decided to go with Hudson as my Continuous Integration Server for testing my symfony plugins.

Earlier this week I installed phpUnderControl and wrote about setting up both phpuc and Hudson-CI.

Now what should you use? Here I try to summarise my experience and compare the two. (more…)

· · · · · ·

PHPUnit-testing-symfony-in-HudsonYesterday I wrote about setting up a symfony plugin project in phpUnderControl. However so far I’ve been using Hudson as my Continuous Integration server. So before comparing the two I will explain how to achieve yesterdays setup using Hudson. (more…)

· · · · · · · · · ·

PHPUnit-testing-symfony-in-phpUnderControlAs I’ve just started to look into phpUnderControl again I thought why not try to setup a project for testing sfImageTransformExtraPlugin running all the PHPUnit tests that I wrote about last week.

So the goal is to setup a phpuc project for a single plugin but with all dependencies (symfony itself) provided. This was a bit tricky so here we go! (more…)

· · · · · · · · · · ·

escher-moebiusI started this blog to occupy myself with topics like unit testing, continuous integration and code quality in general. As a subject for my studies I quickly released a symfony plugin (sfImageTransformExtraPlugin) that I already worked on for a while and decided to excercise all my learnings on it. So you can peek at the sources to see more details.

As all the early posts of this blog were kept in German I am going to summarise the best practice of PHPUnit testing a symfony 1.4 plugin in this post.

Of course I have to say that the term best practice refers to my current state of knowledge. :)

(more…)

· · · · · · ·

copy-pasteGestern habe ich mich mal an den roten CCD Grad gemacht und mich und meinen Code auf die dort angegebenen Prinzipien überprüft.

Eines der Prinzipien des roten Grades ist DRY und ich habe mal mit dem PHP Copy Paste Detector phpcpd nachgeschaut, wie viel Doppelungen ich denn so fabriziert habe.

Ich habe mittlerweile das erste Refactoring bereits hinter mir und bin sehr zufrieden, aber auch die restlichen Todos in diesem Zusammenhang sehen vielversprechend aus.

(more…)

· · · · · ·

MockUpGestern hab ich mich etwas darüber ausgelassen, wie doof doch einige Code Koppelungen von symfony mir das Testen behinderten.

Vor allem drei Dinge haben mir das Leben schwer gemacht: die Konfiguration, sfContext und Datenbankabhängigkeiten. Und ich habe für alle drei auch Antworten finden können. Vielleicht nicht die endgültigen, aber schon sehr akzeptable, wie ich meine.

(more…)

· · · · · ·

Older posts >>

Theme Design by devolux.nh2.me