silverstripe/frameworktest
Composer 安装命令:
composer require --dev silverstripe/frameworktest
包简介
Aids core and module developers in testing their code against a set of sample data and behaviour.
README 文档
README
Introduction
Aids core and module developers in testing their code against a set of sample data and behaviour.
- Shows all core form fields, including their disabled and readonly state
- Shows sample GridField instance including data
- Creates sample members (to efficiently test SecurityAdmin)
- Creates a sample ModelAdmin instance (available at
admin/test) - (Optional) Three-step process for the multiform module
- (Optional) Sample page for the tagfield module
- (Optional) Sample page for the recaptcha module
Usage
Simply running sake db:build will take care of most sample data setup.
In order to use any of the optional test behaviour targeted at modules,
install the module and remove the _manifest_exclude file from the relevant folder.
For example, to test the tagfield module, remove the frameworktest/code/tagfield/_manifest_exclude file.
More sample data
The module creates some default pages for different CMS behaviours.
The CMS is intended to be perform well with a couple of thousand pages.
If you want to test the CMS behaviour for a large and nested tree,
the module includes a simple generator task: sake tasks:FTPageMakerTask.
It will create 3^5 pages by default, so takes a while to run through.
Configuring the amount of data
Both FTPageMagerTask and FTFileMakerTask allow the amount of generated content to be configured.
To do this, pass a comma-seprarated list of integers representing the amount of records to create at each
depth.
$ vendor/bin/sake tasks:FTPageMakerTask --pageCounts=10,200,5,5
$ vendor/bin/sake tasks:FTFileMakerTask --fileCounts=5,300,55,5 --folderCounts=1,5,5,5
Guaranteed unique images
The FTFileMakerTask will randomly watermark each reference to your images by default. If you want to disable this,
set the uniqueImages config variable to false.
Blocks
When dnadesign/silverstripe-elemental
is installed, the FTPageMakerTask can also generate blocks within those pages automatically.
It has a few hardcoded sample data structures for common block types,
and randomly creates a number of blocks, as well as randomly choosing to publish them.
Relies on files and images being available to add as sample data.
Additional setup:
composer require dnadesign/silverstripe-elemental
composer require silverstripe/elemental-bannerblock
composer require silverstripe/elemental-fileblock
Usage:
# Generate some sample files to associate with blocks
sake tasks:FTFileMakerTask
sake tasks:FTPageMakerTask withBlocks=true
Requirements
The module is intended to run against the latest core codebase, but also includes branches matching earlier core releases for backwards compatibility.
Related
- zframeworktest_dbswitcher module - adds capabilities to switch the database by a query parameter for testing purposes
silverstripe/frameworktest 适用场景与选型建议
silverstripe/frameworktest 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 314.05k 次下载、GitHub Stars 达 17, 最近一次更新时间为 2012 年 11 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「testing」 「silverstripe」 「frameworktest」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 silverstripe/frameworktest 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 silverstripe/frameworktest 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 silverstripe/frameworktest 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Testing Suite For Lumen like Laravel does.
Analytics chooser extensions for site settings.
The PHP SDK for Checkmango
CitaNZ's SilverStripe picture object and field for SilverStripe 4
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
统计信息
- 总下载量: 314.05k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 17
- 依赖项目数: 24
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2012-11-08