fangx/sqlite-driver
最新稳定版本:v3.2.0
Composer 安装命令:
composer require fangx/sqlite-driver
包简介
hyperf sqlite driver
README 文档
README
在 hyperf 中使用 sqlite 作为数据驱动.
SQLite 不支持协程, 请不要在生产中使用, 本扩展的初衷是使用 SQLite 作为驱动来进行单元测试.
安装
composer require fangx/sqlite-driver --dev
使用
使用前需配置好相关数据回滚迁移等配置, 推荐使用
fangx/testing
修改 phpunit.xml 中的数据库配置
<?xml version="1.0" encoding="UTF-8"?> <phpunit backupGlobals="false" backupStaticAttributes="false" bootstrap="./test/bootstrap.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false"> <testsuites> <testsuite name="Tests"> <directory suffix="Test.php">./test</directory> </testsuite> </testsuites> <filter> <whitelist processUncoveredFilesFromWhitelist="true"> <directory suffix=".php">./app</directory> </whitelist> </filter> <php> <env name="DB_DRIVER" value="sqlite"/> <env name="DB_DATABASE" value=":memory:"/> </php> </phpunit>
运行测试
composer test
统计信息
- 总下载量: 4.52k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-27