<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 09:20:42 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Andrew Podner: Functional Testing to Improve Quality Assurance (part 1)]]></title>
      <guid>http://www.phpdeveloper.org/news/19605</guid>
      <link>http://www.phpdeveloper.org/news/19605</link>
      <description><![CDATA[<p>
<i>Andrew Podner</i> has posted the first part of a new series to his site today. He'll be looking at <a href="http://unassumingphp.com/functional-testing-to-improve-quality-assurance-part-1/">using functional testing to improve quality</a> of the resulting code and full application.
</p>
<blockquote>
 For this week, I wanted to focus on some different types of automated testing other than unit testing that can help developers build more robust applications and improve both the speed and effectiveness of quality assurance.  Specifically, this post is going to focus on functional testing. Functional testing is composed of the tests that you write which are from the user's point of view.  A functional test is used to perform quality assurance on all or part of an application utilizing the user interface as a pathway to the application. 
</blockquote>
<p>
He gives some examples of functional tests like clicking on buttons, trying a login, checking that the contents of the page are correct. He talks some about the purpose of functional testing and how it differs from unit testing. He suggests the metaphor of a race car - the pit crew would be the "unit testers" and the driver would be the "functional tester", saying whether or not all of the parts of the car are working together as they should for the race. In the next part of the series, he'll talk some about the actual software to automate this process.
</p>
Link: http://unassumingphp.com/functional-testing-to-improve-quality-assurance-part-1]]></description>
      <pubDate>Mon, 20 May 2013 09:19:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Script-Tutorials.com: Functional Programming - How to Write Functional Code in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19568</guid>
      <link>http://www.phpdeveloper.org/news/19568</link>
      <description><![CDATA[<p>
On the Script-Tutorial.com site today there's a new post looking at <a href="http://www.script-tutorials.com/functional-programming-php/">functional programming in PHP</a> - some of the concepts involved and example code showing how to make it work.
</p>
<blockquote>
Functional programming can be defined in simple terms as a programming paradigm that do not change the state of a program instead it uses pure functions. A pure function is a function that has the ability to accept a value and return another value without changing the input supplied to it. It is characterized by its ability to support functions that are of high order. [...]  A programming paradigm that is functional has the following attributes: do not alter the states which make parallelism easier, deals mostly with a function which is the smallest unit hence enhances readability of code, has deterministic functions that enable stability of a program.
</blockquote>
<p>
He talks some about anonymous/lambda functions (closures) and their role in PHP's implementation of functional programming. He also talks some about partial functions, currying, higher order functions and recursion. He finishes off the article with a look at some of the advantages this method of development can bring as well as some of the disadvantages that come with things like recursion and the learning curve of the method.
</p>
Link: http://www.script-tutorials.com/functional-programming-php]]></description>
      <pubDate>Thu, 09 May 2013 11:04:26 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Codeception.com: Specification or Testing: The Comparison of Behat and Codeception]]></title>
      <guid>http://www.phpdeveloper.org/news/19560</guid>
      <link>http://www.phpdeveloper.org/news/19560</link>
      <description><![CDATA[<p>
On the Codeception site today there's a new post that <a href="http://codeception.com/05-06-2013/specification-testing-coparison.html">compares their tool, Behat and PHPUnit</a> for testing your applications.
</p>
<blockquote>
This is guest post by <a href="https://github.com/Ragazzo">Ragazzo</a>. He uses Behat as well as Codeception for making his project better. He was often asked to do a comparison between Codeception, Behat, and PhpUnit. In this post he explains the commons and different parts of this products.
</blockquote>
<p>
The author talks some about the difference between functional/acceptance tests and how they fit in with behavior driven development. He includes some examples of Behat test formats (Gherkin) and how it can be used for both the functional and acceptance side of things. He also talks some about why he prefers Codeception over Behat(+Mink) for his testing. A sample Codeception test is included, showing a login form check.
</p>
Link: http://codeception.com/05-06-2013/specification-testing-coparison.html]]></description>
      <pubDate>Wed, 08 May 2013 09:28:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Inviqa techPortal: Functionally Testing You Application Using Mink]]></title>
      <guid>http://www.phpdeveloper.org/news/19538</guid>
      <link>http://www.phpdeveloper.org/news/19538</link>
      <description><![CDATA[<p>
On the Inviqa TechPortal today there'a a new post from <i>Konstantin Kudryashov</i> showing you how to <a href="http://techportal.inviqa.com/2013/05/02/functionally-testing-your-application-using-mink/">use Mink for functional testing</a> (an extension of <a href="http://behat.org">Behat</a>) of you web application.
</p>
<blockquote>
Automated testing is big news these days. There's hardly a PHP conference happening without a talk on testing automation or derivative methodologies. TDD (Test-Driven Development) and BDD (Behaviour Driven Development) are all around us. So why should you care about all this? [...] The more complex an application becomes, the harder it is to be sure that each new feature or bug fix won't break the system, and that decreases your overall confidence in your work as developer. That's exactly the reason why you need automated testing - to be confident that you're not breaking important parts of an application.
</blockquote>
<p>
For his examples he uses a simple <a href="http://silex.sensiolabs.org/">Silex</a>-based application (found <a href="https://github.com/everzet/silex-mink">here on github</a>) that just shows a main page and an "add article" page that returns a preview when submitted. He shows how to get Behat/Mink installed and how to bootstrap PHPUnit to allow you to execute your tests. Also included is a sample test that clicks the "Add Article" link, runs a few checks and fills in some data. The form is submitted and the "preview" page is checked for valid results.
</p>
Link: http://techportal.inviqa.com/2013/05/02/functionally-testing-your-application-using-mink]]></description>
      <pubDate>Thu, 02 May 2013 13:50:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[QaFoo.com: Webinar: Behavior Driven Development with Behat]]></title>
      <guid>http://www.phpdeveloper.org/news/19473</guid>
      <link>http://www.phpdeveloper.org/news/19473</link>
      <description><![CDATA[<p>
The QaFoo folks have <a href="http://qafoo.com/blog/042_webinar_bdd_behat.html">posted information about a webinar</a> they're putting on for those interested in using Behat for doing functional testing on their applications:
</p>
<blockquote>
I've already written two blog posts here about Behat: <a href="http://qafoo.com/blog/036_behavior_driven_development.html">Behavior Driven Development</a> and <a href="http://qafoo.com/blog/040_code_coverage_with_behat.html">Code Coverage with Behat</a>. If that made you curious or you wanted to learn about Behat anyway, I can highly recommend to join the free <a href="https://www.zend.com/en/company/news/event/1246_webinar-behavior-driven-development-with-behat">webinar on Behavior Driven Development with Behat</a> I'll be giving on May 8th 2013 on behalf of Qafoo in cooperation with Zend.
</blockquote>
<p>
As mentioned, the webinar is free to attend, but you'll need to <a href="http://www.zend.com/webinar/register/?eventNumber=575435768">sign up</a> to be able to attend.
</p>
Link: http://qafoo.com/blog/042_webinar_bdd_behat.html]]></description>
      <pubDate>Wed, 17 Apr 2013 10:44:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anna Filina: Define: Functional, Unit and Integration Tests]]></title>
      <guid>http://www.phpdeveloper.org/news/19429</guid>
      <link>http://www.phpdeveloper.org/news/19429</link>
      <description><![CDATA[<p>
<i>Anna Filina</i> has a new post to her site that helps to clarify the definitions between <a href="http://annafilina.com/blog/functional-unit-and-integration-tests/">functional, unit and integrations tests</a> of your application's functionality.
</p>
<blockquote>
I have recently read a blog post claiming that functional tests are not "true" tests. The author also claims that unit testing shows you where the problem is occurring, while functional testing simply identifies that a problem exists. This argument is deceptive and the conclusion dangerous. Different kinds of tests are not mutually exclusive. One is not superior to the other. They have different goals and can happily coexist. Let me explain the kinds of tests so that you could make enlightened decisions.
</blockquote>
<p>
She covers each type of test in detail, noting the goal of that particular type and some examples of the kinds of things they might test. She starts with the highest level, functional testing, then jumps down to the lowest - unit testing. She finishes up the post defining "integration tests" as tests that ensure you're integrating correctly - that you're using the API provided by the tool in the right way and that it's working as expected.
</p>
Link: http://annafilina.com/blog/functional-unit-and-integration-tests]]></description>
      <pubDate>Mon, 08 Apr 2013 14:45:46 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[QaFoo.com: Code Coverage with Behat]]></title>
      <guid>http://www.phpdeveloper.org/news/19406</guid>
      <link>http://www.phpdeveloper.org/news/19406</link>
      <description><![CDATA[<p>
On the QaFoo blog today there's a post for those using the <a href="http://behat.org/">Behat</a> testing tool showing a way to <a href="http://qafoo.com/blog/040_code_coverage_with_behat.html">collect code coverage metrics</a> based on your tests using the <a href="https://github.com/sebastianbergmann/php-code-coverage">PHP_CodeCoverage</a> library and <a href="https://github.com/sebastianbergmann/phpcov">phpcov</a>.
</p>
<blockquote>
There is generally no point in having code coverage for Behat test cases because of their nature: The purpose of an acceptance test is to assert a certain behavior of an application, not to technically test a piece of code. Therefore, there is no point in checking for uncovered code pieces in order to write a Behat test for it. That said, there is still a scenario where you want to peek at code coverage of Behat tests: When creating them as wide-coverage tests before starting to refactor legacy code. Behat in combination with Mink provides you with a great tool for such tests.
</blockquote>
<p>
They help you get the tools installed and show the code you'll need to add to the application itself to collect the coverage data as the tests execute. It keys off of a file existing/not existing to know if it should execute the coverage or not. The <a href="https://github.com/sebastianbergmann/phpcov">phpcov</a> tool can then be used to generate the HTML output of the coverage information for easy viewing.
</p>
Link: http://qafoo.com/blog/040_code_coverage_with_behat.html]]></description>
      <pubDate>Wed, 03 Apr 2013 12:37:30 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Ruling the Swarm (of Tests) with Codeception]]></title>
      <guid>http://www.phpdeveloper.org/news/19330</guid>
      <link>http://www.phpdeveloper.org/news/19330</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial posted showing you how to <a href="http://phpmaster.com/ruling-the-swarm-of-tests-with-codeception/">use the Codeception testing tool</a> to perform some acceptance/functional testing of your application.
</p>
<blockquote>
What happens if you have more tests then zergs in the swarm? Really much more. You should find a way to control and manage them. In this article I'll share some hints and best practices you may use writing acceptance tests. I'll use Codeception testing framework to illustrate the best practices, but surely, they can be ported to any acceptance framework you use for testing.
</blockquote>
<p>
He introduces the <a href="http://codeception.com/">Codeception</a> tool and some of the features it includes. He recommends using it to coordinate all of your testing as it can handle PHPUnit and Selenium tests as well as generate its own code coverage reports. He includes some code showing a basic test, making a request to a page, checking for contents and clicking on some links. He also shares a few design patterns using the tool - Page Object and Controller test examples.
</p>]]></description>
      <pubDate>Tue, 19 Mar 2013 09:15:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Functional Programming and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19238</guid>
      <link>http://www.phpdeveloper.org/news/19238</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial written up by <i>Shameer C</i> looking at <a href="http://phpmaster.com/functional-programming-and-php/">functional programming with PHP</a> - some of the basic concepts of it and how much is possible in the language.
</p>
<blockquote>
Many programmer like to talk about functional programming, but if you ask them if they've ever done it, most of their replies will be "No". The reason is quite simple: we are taught to think in an imperative manner when we first start learning to program, in terms of flow charts and steps to be followed in the program. So in this article I'll explain some important concepts to functional programming and how to write functional code in PHP.
</blockquote>
<p>
He starts by defining some of the basic fundamental concepts of functional programming including recursion, referential transparency, higher order functions and lambda functions. He includes a bit of code along the way, showing things a bit more practically. 
</p>]]></description>
      <pubDate>Tue, 26 Feb 2013 09:43:42 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Lars Strojny: Functional programming in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/19055</guid>
      <link>http://www.phpdeveloper.org/news/19055</link>
      <description><![CDATA[<p>
<i>Lars Strojny</i> has <a href="http://usrportage.de/archives/941-Functional-programming-in-PHP.html">a new post</a> that takes an in-depth look at the current state of <a href="http://en.wikipedia.org/wiki/Functional_programming">functional programming</a> in PHP:
</p>
<blockquote>
PHP has traditionally been a simple, procedural language that took a lot of inspiration from C and Perl. Both syntax wise and making sure function signatures are as convoluted as possible. PHP 5.0 introduced a proper object model but you know all of that already. PHP 5.3 introduced closures and PHP 5.4 improved closures very much (hint: $this is available per default).
</blockquote>
<p>
He starts by defining functional programming for those not familiar with the concept. With this understanding, he looks at what PHP has to offer that will help make this definition a reality, things like <a href="http://php.net/call_user_func_array">call_user_func_array</a> and <a href="http://php.net/closures">closures</a>. He includes some code examples comparing the PHP structures to other languages and their features (like Haskell and Ruby). The post also gets a bit more practical with a "real world" example of a script that calculates the totals from the set of items in a shopping cart using a <a href="https://github.com/lstrojny/functional-php">helper library</a> to do some of the basic functional handling.
</p>]]></description>
      <pubDate>Thu, 17 Jan 2013 14:21:38 -0600</pubDate>
    </item>
  </channel>
</rss>
