PHPSPEC

HISTORICAL ARCHIVE · SPEC BY EXAMPLE

PHPSpec
still describes.

An archive of a PHP testing culture. Spec-by-example. Green bars on a CRT. Drawers labeled DESCRIBE, IT, MATCHERS. The suite that taught objects to speak before they ran.

A porcelain-faced brass archival robot in a stained lab coat standing at a wooden desk stacked with yellowed PHP spec sheets, a beige CRT showing green pass bars, and a purple PHP elephant figurine, in front of card-catalog drawers labeled DESCRIBE, IT, MATCHERS, and GREEN BARS.
ALL EXAMPLES PASSING

SPEC BY EXAMPLE

describe, then it

PHPSpec was never a pile of assertions. You described an object. You wrote examples. The generator filled in the class only after the sentences were true.

<?php

describe('Invoice', function () {
    it('calculates totals from line items', function () {
        $invoice = new Invoice();
        $invoice->add(new Line('widget', 2, 10.00));
        expect($invoice->total())->toBe(20.00);
    });

    it('refuses a negative quantity', function () {
        $invoice = new Invoice();
        expect(function () {
            $invoice->add(new Line('widget', -1, 10.00));
        })->toThrow(InvalidArgumentException::class);
    });
});
  • describe

    Open a subject. Everything else hangs off that noun.

  • it

    One behavior. One sentence. One green bar if you told the truth.

  • should

    Matchers as grammar: return, throw, beLike, haveCount.

Close-up of a vintage CRT labeled PHP-TEST-ARCHIVE-97 showing describe/it spec text and a stack of green PASS bars, with a brass robot finger pointing at the phosphor while a wooden drawer marked SPECS / BDD 1994-98 holds yellowed typed sheets.
PHOSPHOR OVER THE SUITE

GREEN BARS

The quiet of a passing suite

Before dashboards, a green bar meant the examples still held. PHPSpec printed that bar like a receipt. This site keeps the receipt in a drawer.

42 EXAMPLES · 0 FAILURES

A brass archival stamp on walnut, its circular face a ring of green test-progress segments around a purple PHP elephant, with a tiny porcelain robot peeking over the rim.

THE ARCHIVE

Card catalog for a testing culture

PHPSpec is historical now. The drawers still open. Spec-by-example still reads like a letter you meant to send the next maintainer.

  1. DRAWER 01 · DESCRIBE

    Name the object first

    PHPSpec asked you to describe a class before you wrote it. The example was the spec. The spec was the design. The file was an archive of intent.

  2. DRAWER 02 · IT

    One example, one promise

    it('calculates the total') was not a test name. It was a sentence. Matchers read like English. Failures read like a librarian catching a misfiled card.

  3. DRAWER 03 · GREEN BARS

    Phosphor, not dashboards

    A suite that passed painted a green bar across the terminal. No badges. No waitlist. Just the quiet of a CRT that had nothing left to complain about.

Kept as an archive in The Robot Lives portfolio. No waitlist. No backend. Just examples, matchers, and the last green bar.