Blog Profile / Planet PHP


URL :http://www.planet-php.net
Filed Under:Programming / Web Development
Posts on Regator:5274
Posts / Week:11.2
Archived Since:June 30, 2008

Blog Post Archive

Sockets with PHP and Node - Sarfraz Ahmed

I was looking to implement real time notifications system via sockets without having to use any third party services such as Pusher, etc. I just wanted to be able to send notifications from PHP side to the client and instantly show them...Show More Summary

05: Finding untested code - Sammy Kaye Powers

Now that we know how to create tests and debug them when they fail, let's make a useful test that actually covers some untested code. Finding untested lines of code The PHP gcov website shows what lines of C code are covered by the test...Show More Summary

[#3331208]: WordPress.com Skimlinks - Federico Cargnelutti

To reproduce this issue: 1) Open this page in “Incognito” mode 2) Refresh the page multiple times and observe how js converts “foo” to “foo} import {assert} from 'chai'; import sinon from 'sinon'; import mockRequire from 'mock-require'; describe('My...Show More Summary

Iterators & Generators - Nomad PHP

October 2017 - EU Presented By Eli White October 19, 2017 20:00 CEST The post Iterators & Generators appeared first on Nomad PHP.

How to Write JavaScript-Style Test Watchers in PHP - SitePoint PHP

I didn't start out writing tests for my code. Like many before and since, my "testing" was to write code and refresh the page. "Does it look right?", I'd ask myself. If I thought so, I'd move on. In fact, most of the jobs I've had have been with companies who don't much care for other forms of testing. Show More Summary

PHP 7.2.0 Beta 1 Released - PHP: Hypertext Preprocessor

The PHP development team announces the immediate availability of PHP 7.2.0 Beta 1. This release is the first beta for 7.2.0. All users of PHP are encouraged to test this version carefully, and report any bugs and incompatibilities in the bug tracking system. Show More Summary

Node.js: How to mock the imports of an ES6 module - Federico Cargnelutti

The package mock-require is useful if you want to mock require statements in Node.js. It has a simple API that allows you to mock anything, from a single exported function to a standard library. Here’s an example: app/config.js function...Show More Summary

Domain Logic and Email Templates - Paul M. Jones

From an email conversation with a reader: Hi Paul, I’ve been following your writing and examples about the ADR pattern for some time now. It’s taken me awhile to wrap my head around it but ADR has really added a lot of structure to my...Show More Summary

04: Debugging failed tests - Sammy Kaye Powers

So far we've learned how to create.phpt tests and run them with run-test.php. But what do we do when a test fails? Today we dig in and debug failed tests. Make a test fail We started by making our trusty echo_basic.phpt test fail byShow More Summary

03: All about .phpt files - Sammy Kaye Powers

Now that we know how to run the test suite with run-tests, let's create our first.phpt file. Create a basic test We started by creating a basic test file that tested that echo could take a list of arguments. We created a new file inShow More Summary

Re-Introducing Eloquent’s Polymorphic Relationships - SitePoint PHP

You've probably used different types of relationships between models or database tables, like those commonly seen in Laravel: one-to-one, one-to-many, many-to-many, and has-many-through. But there's another type of relationship that's not so common: polymorphic. Show More Summary

JsonMapper v1.2.0 - Christian Weiske

Yesterday I released JsonMapper version 1.2.0, adding support for multi-dimensional arrays: int[][][]. One month ago I got a big pull request hat added two features and adjust some configuration. After my vacation I had a look at the...Show More Summary

Announcing PHP TestFest 2017 - Ben Ramsey

For those who’ve been around the PHP community for a while, you’ll recall the successful PHP TestFest events that began after a discussion at PHP Quebec in 2008. Many user groups and mentors signed on to host and help with events, and a lot of folks became first-time contributors to the PHP project, helping improve our code coverage. Show More Summary

02: Running the test suite - Sammy Kaye Powers

Now that we've compiled PHP from source, we need to learn how to run the tests using PHP's black-box testing tool called run-tests.php. Where the test files live The test files live in various places throughout the PHP source code. ext/{extension-name}/tests/...Show More Summary

01: Compiling PHP from source - Sammy Kaye Powers

If you've ever wanted to get involved with PHP internals, writing tests is a great way to get your foot into the door. The tests are written in PHP so you don't even need to know C to get started. The first step to writing tests forShow More Summary

Interview with Jeff Kolesnikowicz - Voices of the ElePHPant

jkolez Audio Show Notes The post Interview with Jeff Kolesnikowicz appeared first on Voices of the ElePHPant.

The Theory of Constraints in PHP - SitePoint PHP

I had been reading The Phoenix Project, a great novel about IT (you read that right), which presents day to day IT and devops problems at a large Amazon-like company in a way which makes mortals understand the complexities and chaosShow More Summary

Designing a JSON serializer - Matthias Noback

Workshop utilities For the workshops that I organize, I often need some "utilities" that will do the job, but are as simple as possible. Examples of such utilities are: Something to dispatch events with. Something to serialize and deserialize...Show More Summary

Refactoring Singleton Usage to get Testable Code - Qafoo - PHP

So your code base is littered with singletons and using them? Don't worry, you can start refactoring them out of your code base class by class and introduce increased testability at every step. This strategy is very simple to implement and the propability of breaking your code is very low, especially when you are becoming more experienced with this technique.

Recent Posting Activity

Achievements

Posts per Week
Posts on Regator

Related Blogs


Copyright © 2015 Regator, LLC