News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Test.ical.ly Blog:
Wrapping symfonys functional tests in a PHPUnit test case
July 08, 2010 @ 13:58:50

In a new post to the test.ical.ly blog Christian looks at how to wrap Symfony functional tests inside of a PHPUnit test case to unify them with your already-existing unit tests.

Yesterday I wrote a lot of functional tests for a symfony plugin that provides and XML web service interface. Using symfonys functional testing classes this is actually quite easy to do. But wouldn't it be cool if you could integrate these tests into your continuous integration service just like PHPUnit tests? Wouldn't it be cool to be able to generate PHPUnit coverage reports?

He created a simple PHPUnit test whose job it is to run all of the Lime tests (with a standard naming convention) and pull the results back into the test to be evaluated. An assertEquals checks the result to be sure the string "ok" is returned as the first thing on the line. If any of the functional tests fail, the whole test case will fail. It could be modified a bit to record which case it was that actually failed and report that back in the failure information.

0 comments voice your opinion now!
functional test symfony phpunit testcase tutorial


Debuggable Blog:
What is a Testcase - especially in CakePHP?
June 12, 2009 @ 08:41:17

In this new blog post to the Debuggable blog today Tim Loschutzki takes a look at tests cases in CakePHP applications - what they are and a few resources to learn more.

it's amazing how many people on the public CakePHP irc channel don't know what a test case is. This has to stop. To clear up some confusion, let's have a look at it.

According to the Wikipedia article he quotes, test cases are the "set of conditions under which a tester will determine whether an application or software is working correctly or not." This doesn't have to be unit testing - it could also be front-end testing or load testing. It's whatever you think it takes to ensure that everything is "working correctly." He includes links to several places where you can find out more about testcases and some as it relates specifically to CakePHP.

0 comments voice your opinion now!
test cakephp testcase


Matthew Weier O'Phinney's Blog:
Testing Zend Framework MVC Applications
July 01, 2008 @ 12:05:32

Matthew Weier O'Phinney has posted about a project he undertook to make it simple to test "userland projects" built with the Zend Framework as easy to test as the framework's own Front Controller and Dispatcher.

One of my ongoing projects the past few months has been to create an infrastructure for functional testing of ZF projects using PHPUnit. This past weekend, I made the final commits that make this functionality feature complete.

This new functionality allows you to create stub test case classes, use a Zend_Dom_Query object with CSS selectors/XPath for queries and makes available a special PHPUnit test case that handles the interface between some of the custom functionality (boostrapping, dispatching requests, etc) and PHPUnit.

He includes a sample test case that has assertions for calls to a controller with an action, that a page contains a login form and that a page creates a session and redirects to a profile page.

You can get this functionality from the incubator on the subversion repository for the project.

0 comments voice your opinion now!
testing zendframework application phpunit testcase


Sebastian Bergmann's Blog:
Support for BDD and Stories in PHPUnit 3.3
January 17, 2008 @ 08:48:00

On his blog today Sebastian Bergmann has posted about new functionality that's been added to the PHPUnit unit testing package for PHP - support for BDD and Stories.

PHPUnit_Extensions_Story_TestCase is a new extension for PHPUnit that has been contributed by Xait, a company that I visited last fall. It adds a story framework with a Domain-Specific Language (DSL) for Behaviour-Driven Development (BDD).

He includes an example of the new extension in action - creating a Story, adding Steps to it and the output that would result from the execution (reading?) of the example.

0 comments voice your opinion now!
bdd story extension xait dsl testcase step bdd story extension xait dsl testcase step


Gareth Heyes' Blog:
Exploiting PHP SELF
January 14, 2008 @ 07:54:00

Gareth Heyes has a new post today talking about one of the vulnerable values in the $_SERVER superglobal - PHP_SELF.

I thought it might be a good idea to gather a few test cases demonstrating the problem. Why PHP allows these URL's is beyond me and it wouldn't take much work to filter out these malicious URL's in the PHP code.

He provides four test cases to show how simple it is to abuse - one using a HTTP header, another pushing XSS through, the third mentions search pages and the fourth a direct code injection.

You can download the code here.

0 comments voice your opinion now!
exploit phpself superglobal inject testcase security exploit phpself superglobal inject testcase security



Community Events





Don't see your event here?
Let us know!


introduction opinion symfony api install update interview release laravel language framework tips community series library deployment list package zendserver podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework