Skip to main content

Quality Assurance on PHP projects - PHPUnit lessons learned

This is what I like about the PHP community: people work out similar ideas and share what they've learned in the process. Sometimes people pick up ideas and work them out, sometimes people just continue the conversation.

And I believe Lars Tesmer has done the latter, where he blogs on testing PHPUnit itself and the lessons learned in that process.

Thank you Lars for sharing your lessons.


Comments

  1. You're welcome! :D

    Btw, today we've had our second practice trying our luck on Assetic, it's been very interesting, too.
    I hope to find the time to blog about it some time over the weekend.

    Anyways, thanks for the shoutout!

    Cheers,
    Lars Tesmer

    ReplyDelete
  2. Here's the blog about our second After Work Hacking:
    http://lars-tesmer.com/blog/2011/09/20/how-to-unit-test-a-class-making-calls-to-an-url-or-the-filesystem-with-phpunit/

    ReplyDelete
  3. In Php Projects people pick up ideas and work them out, sometimes people just continue the conversation.

    Php Programmer

    ReplyDelete
  4. People pick up ideas and work them out,and sometimes people just continue the conversation.Thanks for sharing it.

    PHP Development India

    ReplyDelete

Post a Comment

Popular posts from this blog

Deploy Docker containers fast to Microsoft Azure

DEPLOY DOCKER CONTAINERS FAST TO MICROSOFT AZURE It’s hard to ignore the fact thatDockeris a way to move forward for rapid application development, distributed architectures and microservices. For developersDockeroffers great advantages as they can build their containers specifically for the task they work on. They grab a base image of a container, modify it for their purpose and prepare the functionality inside the container. Quality, testing and security teams now have a single instance to look at and ensure all functional and regulatory requirements are met. System engineers now don’t have to worry about providing a system with the required specs as the container is already provisioned for that purpose. But where do you deploy yourDockercontainers? You can set up your existing bare metal infrastructure to allow them to run containers, but this also means you need to learn about securing your container infrastructure, which is not an easy task. Luckily “the cloud” offers container …

Speeding up database calls with PDO and iterators

When you review lots of code, you often wonder why things were written the way they were. Especially when making expensive calls to a database, I still see things that could and should be improved.
No framework development When working with a framework, mostly these database calls are optimized for the developer and abstract the complex logic to improve and optimize the retrieval and usage of data. But then developers need to build something without a framework and end up using the basics of PHP in a sub-optimal way.

$pdo = new \PDO( $config['db']['dsn'], $config['db']['username'], $config['db']['password'] ); $sql = 'SELECT * FROM `gen_contact` ORDER BY `contact_modified` DESC'; $stmt = $pdo->prepare($sql); $stmt->execute(); $data = $stmt->fetchAll(\PDO::FETCH_OBJ); echo 'Getting the contacts that changed the last 3 months' . PHP_EOL; foreach ($data as $row) { $dt = new \DateTime('2015-04-…

PHP 7 and Apache on macOS Sierra

I posted several talks about compiling PHP from source, but everyone was trying to convince me that a package manager like Homebrew was a more convenient way to install. The purpose of Homebrew is simple: a package manager for macOS that will allow you to set up and install common packages easily and allows you to update frequently using simple commands. I used a clean installation of macOS Sierra to ensure all steps could be recorded and tested. In most cases you already have done work on your Mac, so chances are you can skip a few steps in this tutorial. APACHE AND PHP WITH HOMEBREW I’ve made this according to the installation instructions given on GetGrav. The installation procedures These installation procedures will set up your macOS Sierra with PHP 7.1 and Apache 2.4. Install Xcode command line tools (if not done yet)xcode-select --install Install Homebrew/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Set up for in…