Matthew Turland

Matthew Turland’s Blog: Getting Started with Zend_Test

On his blog Matthew Turland is sharing his first time experience working with Zend_Test.

I worked on a project recently where we used Zend Framework. As part of that project, I was tasked with writing unit tests. So, I went to the “tests” directory generated for me by the zf CLI utility to get started. What I found there was three files. […] They were all completely empty, which didn’t really provide much in the way of guidance on how to get started. The Zend_Test documentation is good, but was a bit lacking in that area as well; it really only covers how Zend_Test extends the capabilities of PHPUnit.

Mathew walks you through entire process of preparing simple testing environment for Zend_Test, from explaining auto-generated “tests” folder content, through configuration and bootstrapping, to writing and running controller test, including database support and fixtures.

by Wojciech Szela on January 18, 2010 in News, No Comments »
tags: ,

Matthew Turland’s Blog: The Configuration Pattern in Zend Framework

Zend Framework is constantly changing. One of ongoing changes is unification of constructors that accept an array or Zend_Config object of options that relate to the defined setters is a current guideline.

We decided on this for several reasons. One, as you note, is predictability; if all constructors act in the same way, it’s really easy to know what you should pass. Another is to prepare the framework for dependency injection; having a common constructor paradigm such as this makes it easy to use DI containers with the components.

Knowing direction some blogers decided to spread the word about the concept. Matthew Turland wrote a post explaing how options relate to setter and getters and how a class should implement the concept. Small thing but good to know, especially for all contributors.

by Wojciech Szela on September 29, 2009 in News, No Comments »
tags: ,