承接 rdm/phpspec-customsuffix 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

rdm/phpspec-customsuffix

Composer 安装命令:

composer require rdm/phpspec-customsuffix

包简介

PHPSpec extension to allow custom class file suffixes ie. MyClass.class.php

README 文档

README

PHPSpec is a highly opinionated tool, and is hard-coded to deal with class files that use only the .php filename extension. While this may be a good practice, it keeps people from adopting it as a test framework if their existing code-base doesn't exactly follow it's recommended practices, without a tremendous amount of disruptive change.

And, disruptive change to an untested code-base is bad, yeah?

Within the PHP community, different conventions have been used over the years for filenames. Different communities have different opinions on PHP class file naming conventions, for better or worse. Some communities use suffixes like *.class.php, some use *.inc.php, some even use prefixes like class-*.php (although this plugin doesn't support prefixes at this time).

In order to add a little flexibility to PHPSpec, this plugin allows you to specify on a suite-by-suite basis different filename suffix/extension conventions.

Configuring custom suffixes in phpspec.yml:

suites:
  really_old_stuff:
    src_path: thing/includes
    spec_path: thing
    src_extension: .inc.php
  old_stuff:
    src_path: newer_thing/classes
    spec_path: newer_thing
    src_extension: .class.php
extensions: [RDM\CustomSuffix\Extension]

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-15