ai-agent

Prophecy

Highly opinionated mocking framework for PHP 5.3+
8,474 stars249 forksPHPUpdated 4/13/2026100% free · open source
What it does

Prophecy is a mocking framework for PHP that allows you to easily create and manage mock objects in your tests, making it easier to isolate dependencies and test your code in isolation.

When to use it
  • When writing unit tests for PHP applications and you need to mock out dependencies
  • When you want to test how your code behaves when a certain dependency is not available or returns an error
  • When you need to test complex interactions between objects and want to isolate the dependencies
Ready-to-paste prompt
$mock = $this->prophesize('HttpClient'); $mock->get('https://example.com')->willReturn(['status' => 200, 'body' => 'Hello World']); $httpClient = $mock->reveal();
Heads up: Prophecy requires PHP 5.3 or later, and you need to have the composer dependency manager installed to install Prophecy
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

🛠️ Technical setup

Expect 20–40 minutes in a terminal — or let your AI agent drive it.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/prophecy && curl -fsSL https://workflowstacks.com/api/skills/prophecy/claude-skill -o ~/.claude/skills/prophecy/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How Prophecy works
Codeflow
Free to inspect

Prophecy is a medium PHP project (~5.7k lines across 100 code files, plus 128 test files). Expect some technical setup — comfortable with a terminal, or ask a developer. Last commit 5 months ago, MIT license, has a test suite.

Size
Medium codebase
~5.7k lines · 100 code files · 48 min skim
Setup
Some technical setup
Comfortable with a terminal? 20–40 min. Otherwise ask a dev.
Runs on
PHP
No API keys detected
PHP 100%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    composer.json
    Dependencies and the commands it exposes
  3. 3
    src/Prophecy/Argument.php
    Inside src/ — the main logic begins here
What's in each folder
src/Core code — the actual logic99 files
fixtures/Data files49 files
spec/Tests — proof it works73 files
tests/Tests — proof it works6 files
.github/CI / automation (GitHub Actions)1 files
READMEHas testsThin docsCI checksMIT licenseUpdated 5 mo ago
Quick Actions
Details
Creator
phpspec
Language
PHP
Category
ai-agent
Published
3/25/2013

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.