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

Laravel News:
Laravel Collection “tap” Method
Feb 20, 2017 @ 16:05:55

In this recent post to the Laravel News site Eric Barnes introduces a new method that's included in Laravel 5.4.10: the "tap" method.

Laravel 5.4.10 introduces a new tap method on collections which allow you to “tap” into the collection at a specific point and do something with the results while not affecting the main collection.

He includes an example, showing a sample array of user data and how, after converting it into a collection, he can "tap" into it at any point. He tapping pulls out the name of the current record following a "where" to locate the matching value. The quick post ends with a look at how the "tap" method is different from "pipe". Essentially the difference is that using "pipe" returns a different collection, potentially with modified data while "tap" does not.

tagged: laravel collection tap pipe method introduction

Link: https://laravel-news.com/collection-tap

Chris Shiflett's Blog:
Test-Harness for PHP
Feb 06, 2006 @ 12:47:01

Chris Shiflett has a quick post today with another addition to the "reasons to use TAP for your testing" - test-harness.php.

In the tradition of test-more.php, Mike Lively adds to the growing list of reasons to be using TAP (Test Anything Protocol) by creating test-harness.php, a TAP-compliant PHP testing harness. This provides yet another testing option for PHP developers:

  • Easy: Apache-Test (with any TAP-compliant library)
  • Easier: test-harness.php (with any TAP-compliant library)
  • Easiest: test-more.php

You can grab the source for test-harness here and the source for test-more here...

tagged: test::harness test-more test-harness TAP apache-test test::harness test-more test-harness TAP apache-test

Link:

Chris Shiflett's Blog:
Test-Harness for PHP
Feb 06, 2006 @ 12:47:01

Chris Shiflett has a quick post today with another addition to the "reasons to use TAP for your testing" - test-harness.php.

In the tradition of test-more.php, Mike Lively adds to the growing list of reasons to be using TAP (Test Anything Protocol) by creating test-harness.php, a TAP-compliant PHP testing harness. This provides yet another testing option for PHP developers:

  • Easy: Apache-Test (with any TAP-compliant library)
  • Easier: test-harness.php (with any TAP-compliant library)
  • Easiest: test-more.php

You can grab the source for test-harness here and the source for test-more here...

tagged: test::harness test-more test-harness TAP apache-test test::harness test-more test-harness TAP apache-test

Link:

Sebastian Bergmann's Blog:
PHPUnit 3.0
Dec 26, 2005 @ 13:20:09

In his latest post today, Sebastian Bergmann announces the upcoming release of the latest version of the widely popular PHP unit testing suite - PHPUnit 3.0.

These past few days I have been busy hacking on what will become PHPUnit 3.0, hopefully already in January 2006.

The hallmark feature of PHPUnit 3.0 will be its support for Mock Objects. PHPUnit's Mock Object implementation has been initially developed by Jan Borsodi of eZ systems AS and is inspired by jMock.

While working with the Unit Tests for the Zend Framework I noticed that PHPUnit previously had no support for skipping the execution of a test, for instance when a required PHP extension is not available. PHPUnit 3.0 introduces the PHPUnit2_Framework_Assert::markTestSkipped() to mark a test as being skipped.

Chris Shiflett requested support for the Test Anything Protocol (TAP) which I added in the form of a respective PHPUnit2_Framework_TestListener implementation.

PHPUnit has become the de-facto standard for unit testing with PHP, and it's great to see so many more improvements coming from it. It's also good to see that, through it's efforts with the Zend Framework, it's also found some places it was lacking and fixed them right up.

tagged: phpunit version three mock objects tap support phpunit version three mock objects tap support

Link:

Sebastian Bergmann's Blog:
PHPUnit 3.0
Dec 26, 2005 @ 13:20:09

In his latest post today, Sebastian Bergmann announces the upcoming release of the latest version of the widely popular PHP unit testing suite - PHPUnit 3.0.

These past few days I have been busy hacking on what will become PHPUnit 3.0, hopefully already in January 2006.

The hallmark feature of PHPUnit 3.0 will be its support for Mock Objects. PHPUnit's Mock Object implementation has been initially developed by Jan Borsodi of eZ systems AS and is inspired by jMock.

While working with the Unit Tests for the Zend Framework I noticed that PHPUnit previously had no support for skipping the execution of a test, for instance when a required PHP extension is not available. PHPUnit 3.0 introduces the PHPUnit2_Framework_Assert::markTestSkipped() to mark a test as being skipped.

Chris Shiflett requested support for the Test Anything Protocol (TAP) which I added in the form of a respective PHPUnit2_Framework_TestListener implementation.

PHPUnit has become the de-facto standard for unit testing with PHP, and it's great to see so many more improvements coming from it. It's also good to see that, through it's efforts with the Zend Framework, it's also found some places it was lacking and fixed them right up.

tagged: phpunit version three mock objects tap support phpunit version three mock objects tap support

Link:


Trending Topics: