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

Matthias Noback:
The PHP testing experience Interview by Fernando Arconada
July 15, 2014 @ 09:54:12

Matthias Noback has a new post today, an interview that was conducted with him by Fernando Arconda about his experience and thoughts around testing in PHP-driven applications.

Fernando Arconada interviewed me about the subject of testing. He is writing a book about testing Symfony2 applications: Testing para Aplicaciones Symfony2. Fernando will translate this interview to Spanish and and add it to his book, together with the articles in my A better PHP testing experience series.

The interview starts with some background on who Matthias is and what kinds of things he's done in the past with BDD and TDD testing. He answers questions about testing, even for small projects, and if the sought after "100% coverage" is a good mark to try for. They discuss tooling and include some recommendations to beginner developers to help them get testing quickly. A large part of the interview also shares some of his thoughts around the "BDD/TDD is dead" debate that happened not too long ago.

0 comments voice your opinion now!
interview fernandoarconda testing bdd tdd unittest

Link: http://php-and-symfony.matthiasnoback.nl/2014/07/the-php-testing-experience-interview-by-fernando-arconada/

Matthias Noback:
A better PHP testing experience Part I Moving away from assertion-centric testing
July 07, 2014 @ 17:53:45

Matthias Noback has a new post today, part one in a series, looking at moving away from assertion-centric testing and more towards descriptive unit tests.

In the introduction article of this series I quickly mentioned that I think unit testing often focuses too much on assertions. [...] I used to preach these things myself too (yes, "development with tests" often comes with a lot of preaching). But now I don't follow these rules anymore. I will shortly explain my reasons. But before I do, let's take a step back and consider something that is known as the Test framework in a tweet, by Mathias Verraes.

He breaks up the rest of the article into three sections, each with a few paragraphs of description and code where appropriate:

  • Something is the case, or not
  • Only one assertion for each test?
  • Write assertions first and then work towards them?

He talks about the idea of "Arrange Act Assert" and makes some recommendations as to how to be more descriptive in your tests and make them easier to read and follow in the future.

0 comments voice your opinion now!
unittest experience assertion testing descriptive

Link: http://php-and-symfony.matthiasnoback.nl/2014/07/descriptive-unit-tests/

PHP.net:
PHP 5.6.0RC2 is available
July 04, 2014 @ 15:08:14

The PHP development group has released the latest Release Candidate in the PHP 5.6.x series: PHP 5.6.0RC2. A reminder, though, this is not a production release, so only use it in testing.

The PHP development team announces the immediate availability of the second release candidate of PHP 5.6. As we entered the feature freeze with beta1, this is a bugfix-only release. All users of PHP are encouraged to test this version carefully, and report any bugs in the bug tracking system.

Several issues were fixed in this release candidate including updates to the core engine, internationalization, the PostgreSQL extension and the PHPDBG debugger functionality. You can find the full list in the NEWS file. You can download this latest release from the PHP QA site or the Windows QA site.

0 comments voice your opinion now!
language release php56rc2 releasecandidate development testing bugfix

Link: http://php.net/index.php#id2014-07-03-1

Sound of Symfony:
Episode 2 - Let's talk about tests
July 03, 2014 @ 10:17:16

The newer Sound of Symfony podcast has posted its second episode today, Let's talk about tests, where hosts Magnus Nordlander and Tobias Nyholm are joined by Kacper Gunia to talk about unit testing and various other topics.

After an amazing response to our first episode, we once again cram up in the conference room to bring you our second episode. We go through the news, bring you hidden gems from Symfony, we talk about tests with Kacper Gunia, and find out what's going on in the community.

Topics mentioned include the SensioLabs Security Advisories Checker, "hidden gems" like using multiple mailers and how to use matchers to enable the profiler conditionally. On the testing side they talk BDD, legacy code and repository classes in Doctrine. You can check out this latest episode through the in-page player. You can also subscribe to their feed to keep up with the latest episodes of the show.

0 comments voice your opinion now!
soundofsymfony podcast ep2 testing kacpergunia

Link: http://www.soundofsymfony.com/episode/episode-2/

Loosely Coupled Podcast:
Episode 7 Building a Testing Culture
July 02, 2014 @ 11:30:19

The Loosely Coupled podcast has released episode #7 of their show: Building a Testing Culture. In this latest episode hosts Matt Frost and Jeff Carouth talk about their own experience with unit testing and make some recommendations on how to make it a priority in your group.

In this is episode Matt and Jeff discuss how to build a testing culture in your company. They discuss organization resistance, the importance of testing and how to move forward when the rest of your company is less than excited.

You can listen to this latest episode either through the in-page player or by downloading the mp3 directly. Be sure to subscribe to their feed if you like the show and want more.

0 comments voice your opinion now!
looselycoupled podcast ep7 unittest testing culture

Link: http://looselycoupled.info/blog/2014/06/30/episode-7-building-a-testing-culture/

Three Devs & A Maybe Podcast:
Introduction to Software Testing
June 24, 2014 @ 11:19:43

The Three Devs & A Maybe podcast has released their latest episode out into the wild: Episode #30, an Introduction to Software Testing. Hosts Michael Budd, Fraser Hart, Lewis Cains and Edd Mann discuss all things testing, and not just for PHP.

In this episode we introduce the very important topic of software testing. Starting off with why you should consider the automated testing route, we move on to discuss the different types of testing available. Some of the topics discussed include Quality Assurance, TDD/BDD, Unit Testing, Integration Testing, Functional Testing and Acceptance Testing.

Topics in this episode include design patterns, PHPUnit, Hamcrest PHP, Composer and Codeception. You can listen to this latest show either using the in-page player or by downloading the mp3.

0 comments voice your opinion now!
threedevsandamaybe podcast ep30 software testing introduction

Link: http://threedevsandamaybe.com/posts/introduction-to-software-testing/

SitePoint PHP Blog:
Help Develop PHP 5.6 RC1 on Homestead
June 23, 2014 @ 11:08:01

In this new post from the SitePoint PHP blog Bruno Skvorc puts out a "call to action" for the PHP developers out there to help develop and test out PHP 5.6RC1 (the current 5.6 release candidate) with the Laravel Homestead virtual machine.

Last week we talked about Laravel Homestead, a prepared local development environment for PHP built on Vagrant by Taylor Otwell, meant to serve as a common starting point for all Laravel (and possibly other PHP) projects. [...] A week before that, we talked about the end of beta for 5.6, and the beginning of the RC program. [...] In this post, we'll have a quick look at how we can install it over the regular PHP in Laravel Homestead and report the build feedback back to the QA site.

He refers to the other article for installation instructions and quickly gets into the steps needed to download and install the RC1 version. There's a few dependencies to install before you compile, but with a few commands it should be off and running quickly. Screenshots are provided to show you the output each step of the way too. If all goes well, the output of a "php -v" command line call will show the successful build of PHP 5.6.0RC1.

0 comments voice your opinion now!
homestead releasecandidate testing compile install tutorial laravel

Link: http://www.sitepoint.com/help-develop-php-5-6-rc1-homestead/

NetTus.com:
You Requested It, We Made It Free PHP Testing Course
June 05, 2014 @ 10:26:49

On NetTuts.com today they've made an announcement about a new PHP testing course they're making available for free. The course is an introduction to testing your PHP applications and is taught by Andrew Perkins.

In this course, Andrew Perkins will teach you the very basics of testing in the PHP language. Learn what is needed to test PHP applications and why testing is important. Explore the differences between regular testing, test-driven development (TDD) and behavior-driven development (BDD). Along the way, take a look at the various frameworks that are available, to make sure your PHP websites run just as you expected. And lastly, compare and contrast the different types of tests that you can run such as unit, functional, and acceptance tests.

The training course covers a lot of the basics behind testing and several of the tools you can use along the way including PHPUnit, Codeception and Behat. It's a pretty quick overview, so don't expect too much in-depth coding and testing examples. The course with all videos included comes in at just a bit over an hour of content. You can find out more and sign up to have access to the training here.

0 comments voice your opinion now!
testing training course unittest functionaltest software introduction

Link: http://code.tutsplus.com/tutorials/you-requested-it-we-made-it-free-php-testing-course--cms-21283

AWS PHP Development:
Testing Webhooks Locally for Amazon SNS
April 08, 2014 @ 11:33:07

In a previous post the AWS for PHP blog showed how to set up webhooks for handling the callbacks from their SNS messaging service. In this next part of the series they continue the process, showing how you can test these hooks locally without needing to actually send the messages. This eliminates the need to deploy to a public-facing server just to test the hooks every time you need an update.

In a recent post, I talked about Receiving Amazon SNS Messages in PHP. I showed you how to use the SNS Message and MessageValidator classes in the AWS SDK for PHP to handle incoming SNS messages. The PHP code for the webhook is easy to write, but can be difficult to test properly, since it must be deployed to a server in order to be accessible to Amazon SNS. I'll show you how you can actually test your code locally with the help of a few simple tools.

Using PHP's own built-in webserver and a tool called ngrok to tunnel from the public internet to a local server. He includes the commands to set up the PHP script directory, the code to intercept the POSTed data from the request, validate it and send the subscription confirmation request. He helps you create an SNS "topic" through the management console and walks you through a sample test request while tailing the logs.

0 comments voice your opinion now!
aws amazon sns webhook testing local server ngrok tutorial

Link: http://blogs.aws.amazon.com/php/post/Tx2CO24DVG9CAK0/Testing-Webhooks-Locally-for-Amazon-SNS

Master Zend Framework:
Simplifying Unit Testing (and asking for help when needed)
March 20, 2014 @ 11:54:16

On Matthew Ssetter's "Master Zend Framework" blog today he talks about simplifying unit testing and some of his experience with getting too complicated in his own testing practices.

Recently I was a bit stuck, trying to figure out how to test a section of an application I've been developing. Specifically, I was trying to mock a HydratingResultSet in a controller test, so it could be the return value of a method call on a datasource, my controller needed. I was sure it was the right approach to help ensure the functionality in question was working properly. But no matter what I tried, my tests didn't work, because I wasn't mocking it correctly. [...] I asked for help [on IRC], laying out the problem as I saw it. The first response which came back, from Ocramius, stopped me dead in my tracks: "Why are you trying to do that?"

He includes a bit of background on what he was trying to test and the functionality around it and how, when he stopped to think about it, wondered why he was testing it too. He talks about the refactor he made to his code with a positive end result - the tests now passed. He suggests a few questions to ask yourself when writing your tests such as "am I doing too much?" or "am I testing code in the right place?" Chances are, if you step back and really look at what you're testing, you might realize that the answer to these questions is just to simplify.

He finishes the post with a few suggestions, some of his own personal favorites, of places you can go for help when questions do pop up. He points out that the usual excuses shouldn't be a blocker on asking for help. He is "encouraging you to set your pride, ego and excuses aside and when you're stuck: ask for help."

0 comments voice your opinion now!
testing simplify unittest zftalk help question

Link: http://www.masterzendframework.com/people/right-approach-unit-testing-asking-help


Community Events





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


developer community library list install unittest framework language laravel podcast opinion release series interview wordpress configure threedevsandamaybe testing code introduction

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