pulsarvp/vps-tools

用于每个 PulsarVP 项目中的工具和其他内容。

1.43.4 2022-06-22 09:27 UTC

README

Build Status Dependency Status

Code Climate Issue Count

PulsarVP 服务工具集。

启动测试

  • 从根目录运行 composer install
  • 创建测试数据库和用户。在 tests/config 目录中,将 db.default.php 文件复制到 db.php,并填写测试数据库和用户的设置。
  • tests/migrations 目录中的 sql 文件导入到创建的数据库中。
  • 创建 tests/data 目录,并赋予它写入权限: mkdir datachmod 0777 data

在 tests 目录中启动测试

所有测试: ../vendor/phpunit/phpunit/phpunit

特定测试集: ../vendor/phpunit/phpunit/phpunit helpers

单个测试文件: ../vendor/phpunit/phpunit/phpunit helpers/StringHelperTest.php

单个测试: ../vendor/phpunit/phpunit/phpunit --filter testExplode helpers/StringHelperTest.php

这里使用了 vendor 中的二进制文件,可以简化操作,直接将 phpunit 作为系统包安装,然后直接使用 phpunit helpers/StringHelperTest.php 运行。