visavi/codeception-phpixie
Composer 安装命令:
composer require visavi/codeception-phpixie
包简介
Phpixie module for Codeception
关键字:
README 文档
README
Installation
You can install this package through composer:
composer require visavi/codeception-phpixie
Settings
Include the phpixie module in the tests/functional.suite file
actor: FunctionalTester modules: enabled: - Phpixie: url: 'http://localhost' - \Helper\Functional
In acceptance tests, you can use methods to work with a database of functional tests.
To do this, you must enable the module in the tests/acceptance.suite file
actor: AcceptanceTester modules: enabled: - PhpBrowser: url: http://localhost - Phpixie: part: ORM - \Helper\Acceptance
After that 7 methods will be available to work with the database.
Methods for working with the DB
All methods work in a transaction, which means that after the tests are completed, the database will be in its original form
Inserts record into the database
$user = $I->haveRecord('user', ['name' => 'phpixie']);
Checks that record exists in database.
$I->seeRecord('user', ['name' => 'phpixie']);
Checks that record does not exist in database.
$I->dontSeeRecord('user', ['name' => 'trixie']);
Retrieves record from database.
$record = $I->grabRecord('user', ['name' => 'phpixie']);
Removes a record from the database.
$I->deleteRecord('user', ['id' => $user->id]);
Transaction control methods do not look at the global transaction enable settings, if you have transactions enabled by default, you can turn them off for each method
Conversely, if transactions are globally disabled (cleanup: false), then methods can force transactions to be enabled.
$I->startTransaction();
$I->stopTransaction();
Call methods
Calling methods for functional and acceptance tests:
$I->methodName();
Calling methods for unit tests:
$this->tester->methodName();
Example
$data = [ 'login' => 'phpixie', 'password' => 'password', 'name' => 'trixie', ]; $entity = $I->haveRecord('user', $data); $I->seeRecord('user', ['id' => $entity->id]); $I->wantTo('Test user page'); $I->amOnPage('/user/' . $entity->login); $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK); $I->seeInSource('trixie');
License
The class is open-sourced software licensed under the MIT license
visavi/codeception-phpixie 适用场景与选型建议
visavi/codeception-phpixie 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 17 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 09 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「codeception」 「phpixie」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 visavi/codeception-phpixie 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 visavi/codeception-phpixie 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 visavi/codeception-phpixie 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Connection 'Db' codeception module to 'Yii2' module database settings
Mailtrap module for Codeception
Framework support bundle for PHPixie
Qase TMS Codeception reporter.
Framework-agnostic, bidirectional implementation of the Bruno (usebruno.com) .bru file language. Can be used to generate and parse from and to Bruno collections / request files.
Run codeception in multiple modes in mvc structure
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-19