bag2/doppel
Composer 安装命令:
composer require bag2/doppel
包简介
Test double implementation for static methods
README 文档
README
Doppel is a PHP mocking framework for static methods.
Example
<?php class Vehicle { public static function horn() { return 'Beep!'; } } echo Vehicle::horn(), PHP_EOL; // Beep! $doppel = (new Bag2\Doppel\Factory)->create(); $doppel->add('Vehicle::horn')->andReturn('Boo!'); echo Vehicle::horn(), PHP_EOL; // Boo! $doppel->finalize(); echo Vehicle::horn(), PHP_EOL; // Beep!
Copyright
This package is licenced under Mozilla Public License Version 2.0.
Copyright 2020 Baguette HQ
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://www.mozilla.org/en-US/MPL/2.0/.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MPL-2.0
- 更新时间: 2021-06-17