定制 nekofar/slim-test 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nekofar/slim-test

最新稳定版本:v3.2.5

Composer 安装命令:

composer require --dev nekofar/slim-test

包简介

Slim Framework test helper built on top of the PHPUnit test framework

README 文档

README

Packagist Version PHP from Packagist Packagist Downloads Tests Status Coverage Status License X (formerly Twitter) Follow Farcaster (Warpcast) Follow Donate

Slim Framework test helper built on top of the PHPUnit test framework

This library inspired by the Illuminate Testing component.

Installation

To get started, install the package using composer:

composer require nekofar/slim-test --dev

Requires Slim Framework 4 and PHP 8.0 or newer.

Usage

use Nekofar\Slim\Test\Traits\AppTestTrait;
use PHPUnit\Framework\TestCase as BaseTestCase;

class TestCase extends BaseTestCase 
{
    use AppTestTrait;
    
    protected function setUp(): void
    {
        $app = require __DIR__ . '/../config/bootstrap.php';
        
        $this->setUpApp($app);
    }
    
    public function testHomePage(): void
    {
        $this->get('/')
            ->assertOk()
            ->assertSee('Welcome');
    }
}

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 34.77k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-09-07