TAG | Tests
7
A continuous deployment process for symfony plugins
3 Comments · Posted by Christian in The right tool
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.
Continuous Deployment · Continuous Integration · Hudson · Open Source · Plugin · plugins · symfony · Tests · Unit Tests
5
In case you wonder how to run a functional lime test in a symfony plugin
1 Comment · Posted by Christian in Good to know
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…)
Functional Tests · lime · sfBulkUploadPlugin · symfony · Tests
24
[Question] How can you develop test driven when you don’t know where you’re going in the first place?
11 Comments · Posted by Christian in Question
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..
best practice · Functional Tests · Integrations Tests · Refactoring · TD · Test Driven Development · Tests · Unit Tests
7
Unit testing PHP Stream Wrappers with PHPUnit
5 Comments · Posted by Christian in Miscellaneous
In 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..
PHP · phpUnit · Stream Wrapper · Stream Wrappers · Streams · Tests · Unit Tests
5
Continuous Integration: Hudson vs phpUnderControl
14 Comments · Posted by Christian in The right tool
Earlier 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…)
Continuous Integration · CruiseControl · Hudson · Integrations Tests · phpUnderControl · Tests · Unit Tests
4
Running PHPUnit tests for your symfony plugin in Hudson
8 Comments · Posted by Christian in The real job
Yesterday 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…)
Clover · Continuous Integration · Hudson · Integrations Tests · phpUnit · Plugin · sfImageTransformExtraPlugin · symfony · Test Coverage · Tests · Unit Tests
3
Running PHPUnit tests for your symfony plugin in phpUnderControl
5 Comments · Posted by Christian in The real job
As 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…)
Clover · Continuous Integration · CruiseControl · Integrations Tests · phpUnderControl · phpUnit · Plugin · sfImageTransformExtraPlugin · symfony · Test Coverage · Tests · Unit Tests
26
Best practice of PHPUnit testing a symfony 1.4 plugin
24 Comments · Posted by Christian in The right tool
I 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.
Bootstrap · Continuous Integration · phpUnit · sfImageTransformExtraPlugin · symfony · Tests · Unit Tests · xUnit
26
Copy and Paste Detection und wie man damit umgehen kann
2 Comments · Posted by Christian in The real job
Gestern 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.
CCD · Clean Code Developer · DRY · Refactoring · sfImageTransformExtraPlugin · Tests · Unit Tests
Gestern 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.
Continuous Integration · Hudson · phpUnit · sfImageTransformExtraPlugin · symfony · Tests · Unit Tests

