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

NetTuts.com:
Basic Functional Testing With Symfony 2's Crawler
October 23, 2014 @ 10:21:33

In this new tutorial on the NetTuts.com site Andrew Perkins shares a way that you can use Symfony2's own Crawler to do some simple functional testing.

Testing your web applications is one of the best things you can do to ensure its health, safety, and security, both for the app and your app's visitors. Symfony 2 offers a complete integration testing suite that you can use to make sure your applications run just as you expect. Today we'll look at how we can use Symfony 2 and PHPUnit, the testing framework that it employs, to write basic functional tests using the Crawler.

He starts off by helping you get a Symfony2 instance installed, the Standard edition, and grabbing the latest PHPUnit phar file from the project's site. He then gets into the actual development of the Crawler bundle, using the command line Symfony tool to do some of the automatic code generation for you. They show how to execute the PHPUnit tests and make the first controller/action/routes for the sample pages to test. He then makes the first test file, extending the "WebTestCase" class from the Symfony2 components. He makes a simple client, executes the request and shows how to test various parts of the response (including an example of mimicking the clicking of a link).

0 comments voice your opinion now!
crawler symfony2 functional testing tutorial introduction

Link: http://code.tutsplus.com/tutorials/basic-functional-testing-with-symfony-2s-crawler--cms-20666

Inviqa techPortal:
My top ten favourite PhpSpec limitations
September 11, 2014 @ 11:15:31

On the Inviqua techPortal today Marcello Duarte lists out his top ten favorite limitations with the PhpSpec testing tool. PhpSpec is a tool where the tests are driven by specifications, focusing on the "how".

PhpSpec is enjoying a growth in popularity lately, probably related to the recent release of 2.0. Lots of people have been playing with it and trying to get to grips with what it can do. Naturally they try to do the same things they would with other testing tools. Soon they find out they can't. "Oh! This PhpSpec has some many limitations… I can't do this… I can't do that…". Ironically, other people make positive comments about the same "limitations". So I decided to publish a list of my top ten favourite limitations of PhpSpec, and why I love them so much.

His limitations list includes things like:

  • I can't test private methods
  • You can't have code coverage
  • I can't use a data provider
  • My tests can't follow a code standard

Check out the full article for more of his list and some code examples ot help clarify each topic.

0 comments voice your opinion now!
phpspec testing behavior specification limitations top10 list

Link: http://techportal.inviqa.com/2014/09/11/my-top-ten-favourite-phpspec-limitations/

NetTus.com:
Understanding PhpSpec
September 04, 2014 @ 11:09:42

The NetTuts.com site (well, TutsPlus) has posted a new tutorial that gets you more intimate with PhpSpec, a PHP-based testing tool that lets you define tests as specifications and using behavior-driven development principles. If you need an introduction to the tool, check out this other tutorial first.

If you compare PhpSpec to other testing frameworks, you will find that it is a very sophisticated and opinionated tool. One of the reasons for this, is that PhpSpec is not a testing framework like the ones you already know. Instead, it is a design tool that helps describing behavior of software. A side effect of describing the behavior of software with PhpSpec, is that you will end up with specs that will also serve as tests afterwards. In this article, we will take a look under the hood of PhpSpec and try to gain a deeper understanding of how it works and how to use it.

They provide a quick overview of some of the internals of the PhpSpec tool and a brief look at the difference between BDD (behavior-driven) and TDD (test-driven) development practices. There's also a look at how the tool differs from the popular PHP testing tool PHPUnit. Code examples are provided through out the post with simple tests, making the separation between the methods and tools easier to follow.

0 comments voice your opinion now!
tutorial phpspec testing tool bdd tdd unittest behaviordriven development

Link: http://code.tutsplus.com/tutorials/understanding-phpspec--cms-21915

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/


Community Events





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


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

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