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:
Laravel, BDD and You The First Feature
November 26, 2014 @ 12:19:37

NetTuts.com has posted the second part of their "Laravel, BDD and You" series (part one is here) building on their introduction in part one and building a first feature (what BDD tools call their tests).

In the second part of this series called Laravel, BDD and You, we will start describing and building our first feature using Behat and PhpSpec. In the last article we got everything set up and saw how easily we can interact with Laravel in our Behat scenarios. [...] In short, we are going to use the same .feature to design both our core domain and our user interface. I have often felt that I had a lot of duplication in my features in my acceptance/functional and integration suites. When I read everzet's suggestion about using the same feature for multiple contexts, it all clicked for me and I believe it is the way to go.

He starts in with the creation of the first feature - a simple "welcome" test that evaluates the main Laravel start page. He uses this example to set up a Laravel trait that can be reused in other parts of the testing and how to use it in a Feature Context file. He then starts to create the tests for the sample time tracking application started in part one. He gives an example of the feature file's contents, the result from its execution and the "small refactors" that it will suggest to add functionality to the feature file. With this skeleton in place, he then fleshes out the test to make it actually work with the requests. He walks through each function and provides the code needed for both the test and other tools/objects they need.

0 comments voice your opinion now!
laravel tutorial bdd feature series part2 testing behat phpspec

Link: http://code.tutsplus.com/tutorials/laravel-bdd-and-you-the-first-feature--cms-22486

Full Stack Radio:
Episode 3 Ruby, PHP, OO design, testing & other crap with Matt Machuga
November 17, 2014 @ 12:15:57

The Full Stack Radio podcast has released their latest episode today - Episode #3: Ruby, PHP, object oriented design, testing and other crap with Matt Machuga, with host Adam Wathan.

In this episode, Adam talks with Matt Machuga of Think Through Math about being a Rubyist who still writes PHP and the differences between writing PHP like a Rubyist vs. writing PHP like a Java developer. They also talk about common struggles when learning new things, and trying to remain pragmatic while still pushing the boundaries of what you know.

Links in the show notes include Matt's personal website, DHH on dependency injection and a book on Domain Driven Design. You can check out this episode either using the downloading the mp3. If you enjoy the episode, be sure to subscribe to their feed.

0 comments voice your opinion now!
fullstackradio podcast ep3 ruby objectoriented design testing mattmachuga

Link: http://fullstackradio.com/episodes/3/

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/


Community Events





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


framework library voicesoftheelephpant list language version security laravel opinion interview release series artisanfiles community tool podcast conference composer symfony introduction

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