1.1 2019-12-31 09:27 UTC

This package is auto-updated.

Last update: 2024-09-29 04:37:17 UTC


README

此库旨在提供编写测试的基本功能。

安装

composer require --dev philippwitzmann/testing

用法

创建新的测试文件

<?php

use PhilippWitzmann\Testing\TestCase;

class SomeClassTest extends TestCase
{
    protected function setUpTest()
    {
        // Do Initialisation for your mocks and subject here
    }
    
    protected function tearDownTest()
    {
        // Revert any leftovers from your tests
    }
    
    public function testSomething()
    {
        $this->assertTrue(true);
    }
}

运行测试

phpunit --configuration config/phpunit.xml

检查代码风格

phpcs