Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.
/ pspec Public archive

Releases: codingpa-ws/pspec

1.0 — first stable release

27 Jul 10:13

Choose a tag to compare

The first stable release of PSpec. The main goal from the start date onwards is to add tests and documentation but also a few more new matchers. This makes PSpec easy to get started with.

Main updates

Future plans

  • 🦾 Straightforward Laravel testing (see #32)
  • 📈 Improved coverage metrics (see #31)
  • 💁 More detailed, jest-like coverage report (see #64)
  • 🚀 Writing less tests with the same expessiveness (see #65)

Pre-release v0.2

31 Mar 09:24

Choose a tag to compare

Pre-release v0.2 Pre-release
Pre-release
Merge branch 'Fix-vendor/bin/pspec-doesn’t-require-autoload' into 'main'

Fix vendor/bin/pspec doesn’t require autoload

See merge request codingpaws/pspec!26

Release 0.1

31 Mar 09:23

Choose a tag to compare

Release 0.1 Pre-release
Pre-release

PSpec

PSpec is a testing framework for PHP, influenced by RSpec and
jest.

Example

// src/Counter.php
class Counter {
  public int $value = 0;

  function increment() {
    $this->value++;
  }
}

// spec/Counter.spec.php
describe(Counter::class, function () {
  subject(fn () => new Counter);

  let('base_value', 10);

  before(function () {
    subject()->value = $this->base_value;
  });

  describe('#increment', function () {
    it('increments by 1', function () {
      expect(subject()->value)->toBe($this->base_value);

      subject()->increment();

      expect(subject()->value)->toBe($this->base_value + 1);
    });
  });
});