定制 rozbehsharahi/tester3 二次开发

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

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

rozbehsharahi/tester3

最新稳定版本:v2.0.0

Composer 安装命令:

composer require rozbehsharahi/tester3

包简介

Testing-Framework for TYPO3

README 文档

README

Tester3 is an approach for a more simple integration of functional tests for TYPO3 pages. I simple find TYPO3's testing-framework a bit messy.

This extension is currently work in progress.

The idea is to be able to create an encapsulated test-app scope on every test, which can than be filled with data and tested against.

Every scope has its own sqlite-database, site-config and typo3-settings and leads ideally to full determinism.

Installation

composer require --dev rozbehsharahi/tester3

Usage

use Rozbehsharahi\Tester3\Builder\FunctionalScopeBuilder;

class FunctionalScopeBuilderTest extends TestCase
{
    private FunctionalScopeBuilder $scopeBuilder;

    public function setUp(): void
    {
        $this->scopeBuilder = (new FunctionalScopeBuilder())
            ->withVendorPath(__DIR__ . '/../../vendor');
    }

    public function testCanCreateScopeAndAccessibleHomepage(): void
    {
        $scope = $this->scopeBuilder->build();

        self::assertSame('root page', $scope->getRecord('pages', 1)['title']);
        self::assertSame(200, $scope->request('/')->getStatusCode());
    }
}

Todos

  • Write docker env for contribution
  • Test on TYPO3 11
  • Introduce CI-testing
  • Introduce phpstan
  • Introduce code-sniffer
  • More tests
  • setup test database only once before all tests and then copy to every scope (performance)

统计信息

  • 总下载量: 77
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-11-12