On the Zend Developer Zone there's a new tutorial written by Nathan Good about improving the quality of your Flash applications (built in Flash Builder 4) with the help of unit testing with PHPUnit.
Unit testing is becoming a fairly common element of software projects because of its promise of providing better quality to the code base. [...] This article is about improving your code quality in a sample project using Adobe Flash Builder 4 to build a rich user interface (UI) and connecting to PHP services via Zend Action Message Format (AMF). In this article, you learn how to write tests using two frameworks: FlexUnit and PHPUnit.
He starts with an overview of unit testing - why you should test your applications even though it might seem counterproductive and a description of what parts of your application the two testing tools (FlexUnit and PHPUnit) can help with. He first focuses is on the latter of the two and he shows how to get PHPUnit installed and write a first test on an example class. Following that, he moves over to the FlexUnit side and gives the same class and first test example. He then talks about running and automating the testing on both sides and even touches on things like continuous integration and code coverage results.