Add Missing Class Php Doc Rector (FastForward\DevTools\Tests\Rector\AddMissingClassPhpDocRector)
- Get rule definition will return configured definition
- Get node types will return class node
- Refactor will return null if not class node
- Refactor will return null if node has doc comment
- Refactor will add doc comment to class without namespace
- Refactor will add doc comment to class with namespace
Add Missing Method Php Doc Rector (FastForward\DevTools\Tests\Rector\AddMissingMethodPhpDocRector)
- Get rule definition will return configured definition
- Get node types will return class method node
- Refactor will return node if not class method
- Refactor will add docblock if missing
- Refactor will not change if docblock exists
- Refactor will add docblock with complex types
- Resolve throws will skip non new or non name expressions
- Resolve throws will handle multiple and duplicates
- Refactor will add docblock with intersections and unions
- Refactor will add docblock with fully qualified intersections
- Refactor will skip return tag for constructors and respect original type names
- Refactor will return original node when no tags can be generated
Agents Command (FastForward\DevTools\Tests\Console\Command\AgentsCommand)
- Execute will fail when packaged agents directory does not exist
- Execute will create agents directory when it does not exist
- Execute will return failure when synchronizer fails
Author (FastForward\DevTools\Tests\Composer\Json\Schema\Author)
- Accessors will return values provided to constructor
- To string will return formatted string when name and email are provided
- To string will return only name when email is missing
- To string will return only email when name is missing
- To string will return empty string when both name and email are missing
Bootstrap Shim Generator (FastForward\DevTools\Tests\PhpUnit\Bootstrap\BootstrapShimGenerator)
- Generate will write bootstrap shim with project and dev tools autoloaders
By Passfinals Started Subscriber (FastForward\DevTools\Tests\PhpUnit\Event\TestSuite\ByPassfinalsStartedSubscriber)
- Notify will enable bypass finals
Candidate Provider (FastForward\DevTools\Tests\GitAttributes\CandidateProvider)
- Folders will return non empty array
- Folders will start with slash
- Folders will end with slash
- Files will return non empty array
- Files will start with slash
- Files will not end with slash
- All will combine folders and files
- All will have folders first
- All will have files after folders
- Folder will contain dot github
- Files will contain gitignore
Changelog Check Command (FastForward\DevTools\Tests\Console\Command\ChangelogCheckCommand)
- Execute will return success when unreleased entries exist
- Execute will return failure when unreleased entries are missing
- Execute will log failure context when against reference is provided
Changelog Document (FastForward\DevTools\Tests\Changelog\Document\ChangelogDocument)
- With release will keep the unreleased section at the top
- Promote unreleased will merge with an existing published version
- Document accessors will resolve expected release variants
- Get latest published release will return null when only unreleased exists
- With release will replace existing version and insert unreleased at the top
- Promote unreleased will create published release when document is empty
- Release helpers will normalize entries and support immutable mutators
Changelog Entry Command (FastForward\DevTools\Tests\Console\Command\ChangelogEntryCommand)
- Execute will add an unreleased entry
- Execute will pass published release metadata
Changelog Entry Type (FastForward\DevTools\Tests\Changelog\Entry\ChangelogEntryType)
- Ordered will return keep a changelog section order
- From input will normalize supported values
- From input will reject unsupported values
Changelog Manager (FastForward\DevTools\Tests\Changelog\Manager\ChangelogManager)
- Add entry will create the managed changelog when needed
- Add entry will preserve existing release dates when no new date is provided
- Add entry will update an existing release date when a new one is provided
- Promote will throw when the unreleased section is empty
- Promote will persist the published release when unreleased entries exist
- Infer next version will throw when there are no unreleased entries
- Infer next version will bump minor versions when added entries exist
- Infer next version will bump major versions when removed entries exist
- Infer next version will bump patch versions when only fixes exist
- Render release notes will return the renderer output for the requested release
- Render release notes will throw when the requested release does not exist
Changelog Next Version Command (FastForward\DevTools\Tests\Console\Command\ChangelogNextVersionCommand)
- Execute will write the inferred version to output in plain text mode
- Execute will log the inferred version when json output is requested
- Execute will pass the explicit current version to inference in plain text mode
- Execute will return failure when version inference fails
Changelog Parser (FastForward\DevTools\Tests\Changelog\Parser\ChangelogParser)
- Parse will extract release sections and entries
- Parse will return default document for empty contents
- Parse will return default document when no release headings exist
- Parse will ignore unsupported lines and deduplicate entries within a section
- Parse will treat empty category bodies as empty entry lists
- Extract entries will return empty array when category heading is missing
Changelog Promote Command (FastForward\DevTools\Tests\Console\Command\ChangelogPromoteCommand)
- Execute will use the current date by default
- Execute will prefer the explicit date
- Execute will return failure when promotion fails
Changelog Show Command (FastForward\DevTools\Tests\Console\Command\ChangelogShowCommand)
- Execute will write release notes to output in plain text mode
- Execute will log release notes when json output is requested
- Execute will return failure when release notes cannot be rendered
Changelog Workflow (FastForward\DevTools\Tests\GitHubActions\ChangelogWorkflow)
- Prepare release pull request will keep composer plugins enabled for wiki preview refresh
Class Reflection (FastForward\DevTools\Tests\Reflection\ClassReflection)
- Is instantiable subclass of will return true for matching class
- Is instantiable subclass of will return false for non matching class
- Get attribute arguments will return arguments for matching attribute
- Get attribute arguments will return null when attribute does not exist
- Get attribute arguments will normalize positional arguments
Classifier (FastForward\DevTools\Tests\GitIgnore\Classifier)
- Classify with trailing slash returns directory
- Classify with wildcard slash returns directory
- Classify with star slash star returns directory
- Classify with double star slash returns directory
- Classify with double star slash at start returns directory
- Classify with star slash star mid pattern returns directory
- Classify with wildcard mid pattern returns directory
- Classify with file pattern returns file
- Classify with comment returns file
- Classify with empty string returns file
- Classify with specific file returns file
- Is directory with trailing slash returns true
- Is directory with file pattern returns false
- Is file with file pattern returns true
- Is file with directory pattern returns false
Code Owners Command (FastForward\DevTools\Tests\Console\Command\CodeOwnersCommand)
- Command will set expected name description and help
- Execute will write generated code owners when file is missing
- Execute will skip existing code owners by default
- Execute will fail check mode when drift is detected
- Execute will prompt for owners when interactive inference fails
- Execute will return success on dry run when drift is detected
- Execute will skip replacing existing code owners when confirmation is declined
Code Owners Generator (FastForward\DevTools\Tests\CodeOwners\CodeOwnersGenerator)
- Infer owners will collect group and author owners
- Infer group owner will return repository owner from support source
- Infer owners will ignore unsupported author entries and invalid urls
- Infer group owner will return null when support source is missing or invalid
- Generate will render explicit owners
- Generate will render commented fallback when owners cannot be inferred
- Generate will render group owner when author cannot be inferred
- Normalize owners will preserve handles and emails
- Normalize owners will drop empty tokens and deduplicate repeated owners
- Extract git hub helpers will handle supported and unsupported urls
Code Style Command (FastForward\DevTools\Tests\Console\Command\CodeStyleCommand)
- Execute will return success when process queue succeeds
- Execute will return failure when process queue fails
- Execute will capture buffered output when json is requested
- Execute will enable progress when requested
Color Preserving Process Environment Configurator (FastForward\DevTools\Tests\Process\ColorPreservingProcessEnvironmentConfigurator)
- Configure adds color environment for decorated output
- Configure does not override no color opt out
- Configure does nothing when color is not requested
- Configure honors parent force color for plain output
Command (FastForward\DevTools\Tests\Console\Command\Command)
- Execute will run php unit process with config file
- Execute with no cache will disable php unit result cache
- Execute will disable php unit progress when json is requested
- Execute will capture structured php unit summary when agent environment is detected
- Execute will preserve an inherited agent environment when forcing structured php unit output
- Execute will keep pretty json inside the standard command log output
- Execute will capture structured php unit summary after coverage prelude when agent environment is detected
- Execute will keep the exit code derived failure result authoritative
- Execute will keep raw php unit output when structured summary cannot be decoded
- Execute will enable php unit progress when requested
- Execute with invalid min coverage will return failure
- Execute will skip when no tests directory or php source exists
- Execute will fail when custom tests path does not exist
- Execute with coverage below minimum will return failure
- Execute will emit structured coverage failure payload when minimum coverage is not met
- Execute will return failure when coverage summary cannot be loaded
Command Attribute Compatibility (FastForward\DevTools\Tests\Console\Command\CommandAttributeCompatibility)
- As command attributes will not use the help named parameter
Command Input Processor (FastForward\DevTools\Tests\Console\Logger\Processor\CommandInputProcessor)
- Process will extract provided arguments and options
- Process will preserve existing command value
Command Output Processor (FastForward\DevTools\Tests\Console\Logger\Processor\CommandOutputProcessor)
- Process will replace buffered output with its contents
- Process will decode single json buffered output
- Process will normalize rector changed files when no files actually changed
- Process will normalize rector changed files using only diff entries
- Process will decode multiple json buffered outputs into a list
- Process will discard plain text preamble before structured json output
- Process will decode the final structured json after plain text tool output
- Process will extract buffered error output from console output
Composer Dependency Analyser Config (FastForward\DevTools\Tests\Config\ComposerDependencyAnalyserConfig)
- Configure will return configuration
- Configure will ignore shadow dependencies by default
- Configure will keep shadow dependencies visible when requested
- Configure will apply repository ignores and invoke customization callback
- It will expose reusable packaged dependency defaults
- Apply packaged repository ignores will return the same configuration instance
- Apply ignores shadow dependencies will return the same configuration instance
Composer Funding Codec (FastForward\DevTools\Tests\Funding\ComposerFundingCodec)
- Parse will normalize supported and unsupported funding entries
- Dump will write supported funding and preserve unsupported entries
- Parse will ignore invalid entries and deduplicate supported values
- Parse will return empty profile when funding is not an array
- Parse will treat github entries without parsable url parts as unsupported
- Dump will remove funding when the profile has no entries
- Dump will insert funding immediately after support when present
Composer Json (FastForward\DevTools\Tests\Composer\Json\ComposerJson)
- Identification accessors will return configured data
- Type will default to library
- Metadata accessors will return configured data
- Metadata accessors will return defaults when optional fields are missing
- Get license will return resolved value
- Get authors will return normalized author entries
- Get authors with only first author will throw exception when no authors are defined
- Get support will return support object
- Get support will return empty support object when section is invalid
- Get funding will return funding entries
- Get funding will ignore invalid entries and invalid section types
- Get autoload will return configured mappings
- Get autoload will return empty array when section or requested mapping is invalid
- Get autoload dev will return configured mappings
- Get autoload dev will return empty array when section or requested mapping is invalid
- Get minimum stability will return configured value
- Get config will return values from config section
- Get scripts will return scripts section
- Get scripts will return empty array when section is invalid
- Get extra will return extra section or specific key
- Get extra will return empty array when section or requested value is invalid
- Get bin will return configured binaries
- Get bin will filter invalid entries and return empty array for invalid sections
- Get suggest will return package suggestions
- Get suggest will ignore invalid entries and invalid sections
- Get comments will return comment data
- Get comments will return empty array when section is invalid
- Get minimum stability and config will return normalized values
- Get minimum stability and config will return defaults for invalid sections
- Get bin will return scalar string when declared as single binary
Composer Self Update Runner (FastForward\DevTools\Tests\SelfUpdate\ComposerSelfUpdateRunner)
- Update will run project composer update
- Update will run global composer update
Composer Self Update Scope Resolver (FastForward\DevTools\Tests\SelfUpdate\ComposerSelfUpdateScopeResolver)
- Is global installation will return true when package lives under composer home
- Is global installation will return true when package lives under default composer home
- Is global installation will return false when package lives under project vendor
- Is global installation will return true when package lives under xdg composer home
Composer Version Checker (FastForward\DevTools\Tests\SelfUpdate\ComposerVersionChecker)
- Resolve latest stable version will return first stable composer version
- Resolve latest stable version will return null when composer show fails
Composite Context Processor (FastForward\DevTools\Tests\Console\Logger\Processor\CompositeContextProcessor)
- Process will apply processors sequentially
Composite Process Environment Configurator (FastForward\DevTools\Tests\Process\CompositeProcessEnvironmentConfigurator)
- Configure delegates to every configurator
Container Factory (FastForward\DevTools\Tests\Container\ContainerFactory)
- Create will return the shared container instance
- Get will resolve services from the shared container
- Has will return whether the shared container can resolve a service
- Set will override shared container entries
Copy Resource Command (FastForward\DevTools\Tests\Console\Command\CopyResourceCommand)
- Command will set expected name description and help
- Execute will copy directory contents into target
- Execute will fail when source or target are missing
- Execute will skip existing target by default
- Execute will show diff before overwriting changed file
- Execute will report unchanged overwrite as no op
- Execute will handle binary overwrite gracefully
- Execute will return failure in check mode when file would change
- Execute will return success in dry run mode when file would change
- Execute will skip replacing drifted file when interactive confirmation is declined
Coverage Summary (FastForward\DevTools\PhpUnit\Coverage\CoverageSummary)
- Executed lines returns value with data set #0
- Executed lines returns value with data set #1
- Executed lines returns value with data set #2
Coverage Summary Loader (FastForward\DevTools\Tests\PhpUnit\Coverage\CoverageSummaryLoader)
- Load will return line coverage summary from php unit coverage report
- Load with missing coverage report will throw runtime exception
- Load with invalid coverage report will throw runtime exception
Dependabot Changelog Entry Message Resolver (FastForward\DevTools\Tests\Changelog\DependabotChangelogEntryMessageResolver)
- Resolve will append the pull request number when the title has no suffix
- Resolve will preserve an existing pull request suffix
- Resolve will trim trailing punctuation before appending the suffix
Dependencies Command (FastForward\DevTools\Tests\Console\Command\DependenciesCommand)
- Execute will return success when preview and analyzers succeed
- Execute will fail when max outdated is not numeric
- Execute will ignore jack failures when max outdated is disabled
- Execute will suppress progress log when json is requested
- Composer dependency analyser process will hide shadow dependencies by default
- Composer dependency analyser process can report shadow dependencies
- Jack breakpoint process will use the resolved jack binary
- Open versions process will use the resolved jack binary
- Raise to installed process will use the resolved jack binary
Dev Tools (FastForward\DevTools\Tests\Console\DevTools)
- Do run will not render logo when raw output command is requested with data set #0
- Do run will not render logo when raw output command is requested with data set #1
- Get default commands will return framework defaults only
- Constructor will set application name and expose loader commands
- Constructor will register global runtime options
- Do run will render logo unless no logo option is provided
- Do run will not render logo when no logo option is set
- Do run will not render logo when running inside known agent environment
- Do run will not render logo when json option is provided
- Do run will not render logo when pretty json option is provided
- All will return loader commands with preserved keys
- Container factory will return a shared dev tools instance
- Is self update command will use self update command attribute names and aliases
- Is self update command will reject other commands
- Run auto update when requested will update global installation when current binary is global
- Configure workspace directory will expose workspace directory to managed workspace
Dev Tools Command Loader (FastForward\DevTools\Tests\Console\CommandLoader\DevToolsCommandLoader)
- Constructor will register only instantiable commands
- Constructor will register primary command from as command attribute
- Constructor will register aliases from as command attribute
- Constructor will fail when command name conflicts
- Constructor will skip classes without as command attribute
- Constructor will skip non instantiable and non command classes
Dev Tools Command Provider (FastForward\DevTools\Tests\Composer\Capability\DevToolsCommandProvider)
- Get commands will return empty array when no commands are registered
- Get commands will return composer proxy commands for registered symfony commands
- Get commands will ignore alias entries from application all registry
- Get commands will preserve safe aliases through composer plugin
- Get commands will not expose self update alias to composer
- Get commands will not expose commands owned by composer
Dev Tools Extension (FastForward\DevTools\Tests\PhpUnit\Runner\Extension\DevToolsExtension)
- It can be constructed with custom tracer and subscriber
- It can be constructed with defaults
Dev Tools Path Resolver (FastForward\DevTools\Tests\Path\DevToolsPathResolver)
- It will resolve runtime tool binary paths for repository and dependency installs with data set #0
- It will resolve runtime tool binary paths for repository and dependency installs with data set #1
- It will resolve runtime tool binary paths for repository and dependency installs with data set #2
- It will resolve runtime tool binary paths for repository and dependency installs with data set #3
- It will resolve runtime tool binary paths for repository and dependency installs with data set #4
- It will resolve runtime tool binary paths for repository and dependency installs with data set #5
- It will resolve runtime tool binary paths for repository and dependency installs with data set #6
- It will resolve runtime tool binary paths for repository and dependency installs with data set #7
- It will expose canonical package paths
- It will reject absolute package paths
- It will detect whether dev tools runs from vendor or repository checkout
- It will resolve runtime autoload and vendor paths for repository and dependency installs
- It will prefer project tool binaries when they exist
- It will fallback to runtime tool binaries when the project does not provide them
- It will prefer project vendor paths when they exist
- It will fallback to runtime vendor paths when the project does not provide them
Dev Tools Service Provider (FastForward\DevTools\Tests\ServiceProvider\DevToolsServiceProvider)
- Implements service provider interface
- Get extensions return empty array
- Get factories return factories
- File locator resolves working project path when the service is requested
Docs Command (FastForward\DevTools\Tests\Console\Command\DocsCommand)
- Execute will treat equivalent default guide sources as default with data set #0
- Execute will treat equivalent default guide sources as default with data set #1
- Execute will skip when guide and api sources are missing
- Execute will fail when custom guide source does not exist
- Execute will return success when process queue succeeds
- Execute will suppress progress log when json is requested
- Execute with no cache will skip php documentor cache folder
- Execute will generate guide only documentation when no api source is detected
ECSConfig (FastForward\DevTools\Tests\Config\ECSConfig)
- Configure will return e c s config builder
- It will expose reusable default skipped rules
- Apply default paths and skips will keep working with a builder
Environment (FastForward\DevTools\Tests\Environment\Environment)
- Get returns null for missing environment variable
- Get returns default for missing environment variable
- Get returns environment variable value
- Get without name returns current environment map
Event Tracer (FastForward\DevTools\Tests\PhpUnit\Event\EventTracer)
- Trace stores events by class with data set #0
- Trace stores events by class with data set #1
- Trace stores events by class with data set #2
- Trace stores events by class with data set #3
- Trace stores events by class with data set #4
- Count returns correct number of events with data set #0
- Count returns correct number of events with data set #1
- Count returns correct number of events with data set #2
- Count returns correct number of events with data set #3
- Count returns correct number of events with data set #4
Existence Checker (FastForward\DevTools\Tests\GitAttributes\ExistenceChecker)
- Exists will return true when path exists
- Exists will return false when path does not exist
- Filter existing will keep only existing paths
- Filter existing will return empty array when none exist
- Is directory will return true for directory
- Is directory will return false for file
- Is file will return true for file
- Is file will return false for directory
- Is directory will return false for non existent
- Is file will return false for non existent
Export Ignore Filter (FastForward\DevTools\Tests\GitAttributes\ExportIgnoreFilter)
- Filter will remove configured paths even with slash variants
- Filter will preserve original candidate order
- Filter will keep nested candidates when parent path is configured
Extension (FastForward\DevTools\Tests\Php\Extension)
- Is loaded returns native extension status
File Diff (FastForward\DevTools\Tests\Resource\FileDiff)
- Accessors and status helpers will reflect the diff state
File Differ (FastForward\DevTools\Tests\Resource\FileDiffer)
- Render will return changed result with unified diff
- Render will return unchanged result when contents match
- Render will return binary result when null bytes are detected
- Render will return unreadable result when contents cannot be read
- Render contents will use the injected differ without custom headers
- Colorize will wrap unified diff lines with console colors
- Format for console will return null when diff is missing
- Format for console will return plain diff when output is not decorated
- Format for console will return colorized diff when output is decorated
Filesystem (FastForward\DevTools\Tests\Filesystem\Filesystem)
- Get absolute path will return absolute for relative path
- Get absolute path will return absolute for multiple relative paths
- Get absolute path will use provided base path
- Get absolute path will resolve relative base paths against current working directory
- Basename will return correct basename
- Dirname will return correct dirname
- Make path relative will return relative path against base
- Dump file and read file will work with relative paths
- Mkdir will create directory with relative path
- Remove will delete relative path against current working directory
- Symlink and readlink will use absolute paths
- Symlink will preserve relative origins
- Copy will duplicate files using absolute paths
- Chmod will apply permissions to resolved paths
- Exists will accept iterables of relative paths
Finder Factory (FastForward\DevTools\Tests\Filesystem\FinderFactory)
- Create will return fresh finder instances
Funding (FastForward\DevTools\Tests\Composer\Json\Schema\Funding)
- Accessors will return values provided to constructor
Funding Command (FastForward\DevTools\Tests\Console\Command\FundingCommand)
- Execute will create composer funding from funding yaml
- Execute will create funding yaml from composer funding
- Execute will merge both sources without duplicating entries
- Execute will be idempotent when funding metadata already matches
- Execute will return success when composer file does not exist
- Execute will return failure in check mode when composer file would change
- Execute will not write managed files during dry run
- Execute will skip composer write when interactive confirmation is declined
- Execute will return failure when composer normalize fails
- Execute will pass working directory and alternate manifest to composer normalize
- Command will set expected name description and help
- Execute will skip funding file synchronization when no supported funding metadata exists
- Private helpers will prompt and normalize composer file arguments
Funding Profile (FastForward\DevTools\Tests\Funding\FundingProfile)
- Accessors will return normalized profile values
- Has yaml content will report whether yaml should exist
Funding Profile Merger (FastForward\DevTools\Tests\Funding\FundingProfileMerger)
- Merge will combine supported funding and preserve unsupported entries
Funding Yaml Codec (FastForward\DevTools\Tests\Funding\FundingYamlCodec)
- Parse will normalize supported and unsupported yaml entries
- Dump will render scalar and list funding keys
- Dump will render single custom url as list
- Parse will return empty profile for missing or invalid yaml payloads
- Parse will normalize lists and discard blank entries
- Parse will normalize scalar github and custom values
- Dump will collapse single github sponsor to scalar
- Private list helpers will normalize and denormalize values
Generator (FastForward\DevTools\Tests\License\Generator)
- Generate with unsupported license will return null
- Generate with missing license will return null
- Generate with valid license will create file
- Generate content will preserve literal author email angle brackets
- Generate will return null on template error
Git Attributes Command (FastForward\DevTools\Tests\Console\Command\GitAttributesCommand)
- Command will set expected name description and help
- Execute will return success and write merged gitattributes
- Execute will respect keep in export composer configuration
- Execute with no candidates will skip synchronization
- Execute will return failure in check mode when gitattributes would change
- Execute will return success in dry run mode when gitattributes would change
- Execute will skip writing when interactive confirmation is declined
- Configured keep in export paths will merge primary and compatibility keys
Git Client (FastForward\DevTools\Tests\Git\GitClient)
- Get config will build and run the expected git command
- Show will relativize absolute paths within the repository
- Show will keep paths that do not belong to the repository unchanged
- Get config will throw the trimmed error output when the queue fails
Git Hooks Command (FastForward\DevTools\Tests\Console\Command\GitHooksCommand)
- Command will set expected name description and help
- Execute will copy packaged hooks
- Execute will render managed grum php config into placeholder hooks
- Execute will skip existing hooks when no overwrite is requested
- Execute will return failure in check mode when hook would change
- Execute will skip replacing hook when interactive confirmation is declined
- Execute will remove drifted hook before replacing it
- Execute will report install failure when replacement still cannot be written
Git Ignore (FastForward\DevTools\Tests\GitIgnore\GitIgnore)
- Construct with path and entries
- Path returns file path
- Entries returns list of entries
- Get iterator returns array iterator
- From file with non existent file returns empty git ignore
- From file with existing file reads entries
- From file filters empty lines
Git Ignore Command (FastForward\DevTools\Tests\Console\Command\GitIgnoreCommand)
- Command will set expected name description and help
- Command will have expected options
- Execute will return success when merge succeeds
- Execute will return success when git ignore is already synchronized
- Execute will return failure in check mode when drift is detected
- Execute will return success in dry run mode when drift is detected
- Execute will skip writing when interactive confirmation is declined
Has Json Option (FastForward\DevTools\Tests\Console\Input\HasJsonOption)
- Is json output will use runtime environment when available
- Is json output will ignore fallback agent detection during php unit runs
Hook Content Renderer (FastForward\DevTools\Tests\GitHooks\HookContentRenderer)
- Render will replace the managed grum php config placeholder
Joli Notif Execution Finished Subscriber (FastForward\DevTools\Tests\PhpUnit\Event\TestSuite\JoliNotifExecutionFinishedSubscriber)
- Get title will report success when no issues were recorded
- Get body will summarize passed failed and errored tests
- Get passed tests will never return negative numbers
License Command (FastForward\DevTools\Tests\Console\Command\LicenseCommand)
- Command will set expected name description and help
- Execute will return success and write info
- Execute will skip when license file exists
- Execute will handle unsupported license
- Execute will return failure in check mode when license would change
- Execute will return success in dry run mode when license would change
- Execute will skip writing when interactive confirmation is declined
Log Level Output Formatter (FastForward\DevTools\Tests\Console\Formatter\LogLevelOutputFormatter)
- Constructor will enable decorated output and register expected styles
- Format will apply the registered info style
- Format will apply the registered alert style
Managed Config Path Synchronizer (FastForward\DevTools\Tests\GrumPhp\ManagedConfigPathSynchronizer)
- Synchronize will remove managed vendor config default paths
- Synchronize will remove current managed relative paths outside the project
- Synchronize will preserve consumer owned config default paths
- Synchronize will preserve non array legacy consumer configuration
Managed Workspace (FastForward\DevTools\Tests\Path\ManagedWorkspace)
- It will expose canonical repository managed paths
- It will normalize path separators when joining managed paths
- It will use configured relative workspace root
- It will use configured absolute workspace root
Markdown Renderer (FastForward\DevTools\Tests\Changelog\Renderer\MarkdownRenderer)
- Render will generate changelog with header and unreleased section
- Render will include published sections and references
- Render release body will omit the release heading
- Render will omit dangling release date separators when date is missing
- Render will not insert extra blank lines between rendered sections
- Render will keep only one blank line between an empty unreleased section and the next release
- Render will omit references when repository url is missing or blank
- Render will normalize ssh repository urls and trim trailing git suffix
- Render will omit references when only unreleased section exists
Merger (FastForward\DevTools\Tests\GitAttributes\Merger)
- Merge will create managed block when file is empty
- Merge will preserve custom entries
- Merge will deduplicate existing and generated entries
- Merge will remove existing export ignore rules for kept paths
- Merge will remove nested export ignore rules when parent path is kept
- Merge will sort export ignore entries with directories before files
- Merge will preserve comments
- Merge will normalize whitespace in existing entries
- Merge will deduplicate normalized entries
- Merge with empty existing content will create clean output
- Merge will handle glob patterns with export ignore
- Merge will sort directories before files
- Merge will handle multiple whitespace normalize
- Merge will remove duplicate non export ignore lines
- Merge will preserve leading whitespace in custom entries
- Private helpers will normalize and filter path metadata consistently
Merger (FastForward\DevTools\Tests\GitIgnore\Merger)
- Merge with empty entries
- Merge removes duplicates
- Merge sorts directories first
- Merge removes comments
- Merge removes empty entries
- Merge uses project path
- Merge returns git ignore instance
Metrics Command (FastForward\DevTools\Tests\Console\Command\MetricsCommand)
- Execute will return success when process queue succeeds
- Execute will return failure when process queue fails
- Execute will run php metrics in quiet mode when json is requested
- Execute will not run php metrics in quiet mode when progress is requested
- Configure will exclude custom relative workspace by default
- Execute will run even when no tests or php source exist
Output Capability Detector (FastForward\DevTools\Tests\Console\Output\OutputCapabilityDetector)
- Supports ansi when output is decorated
- Does not support ansi for plain non stream output
- Does not support ansi for plain non tty stream output
Output Format Logger (FastForward\DevTools\Tests\Console\Logger\OutputFormatLogger)
- Log will write interpolated info messages to standard output
- Log will write error messages to error output
- Log will write structured json when json output is requested
- Log will emit parseable json when json output is requested
- Log will write pretty printed json when pretty json output is requested
- Log will emit parseable json when pretty json output is requested
- Log will embed decoded structured command output instead of escaped json strings
- Log will write structured json when agent environment is detected
- Log will keep plain text output when agent environment is detected during composer tests
Packaged Directory Synchronizer (FastForward\DevTools\Tests\Sync\PackagedDirectorySynchronizer)
- Synchronize with missing package path will return failed result
- Synchronize with missing target dir will create it and create links
- Synchronize will preserve existing valid symlink
- Synchronize will repair broken symlink
- Synchronize will preserve existing non symlink directory
- Synchronize will create links for top level files
Packaged Hooks (FastForward\DevTools\Tests\GitHooks\PackagedHooks)
- Packaged pre commit hook will prefer project config and fallback to the managed placeholder
- Packaged commit msg hook will prefer project config and fallback to the managed placeholder
Php Doc Command (FastForward\DevTools\Tests\Console\Command\PhpDocCommand)
- Execute will create doc header and run php doc processes
- Execute with no cache will disable php cs fixer cache
- Execute will handle dump file exception and continue running processes
- Execute will request structured output and disable progress when json is requested
- Execute will enable progress when requested
Plugin (FastForward\DevTools\Tests\Composer\Plugin)
- Get capabilities will return dev tools command provider mapping
- Get subscribed events will return expected event mapping
- Activate will do nothing
- Is registered command will detect reserved command names
- Run sync command will execute dev tools sync
- Deactivate will do nothing
- Uninstall will do nothing
Process Builder (FastForward\DevTools\Tests\Process\ProcessBuilder)
- Constructor with default will create empty arguments
- Build with simple command will return process instance
- With argument without value will add argument to list
- With argument with value will format as key value pair
- With argument chaining will accumulate all arguments
- Build will return process instance with arguments
- Build will inject no logo argument for dev tools commands
- Build will inject no logo argument for dev tools command arrays
- Build will keep existing no logo argument when provided in arguments
- Build will not inject no logo argument for non dev tools commands
Process Queue (FastForward\DevTools\Tests\Process\ProcessQueue)
- Add will not enable pty for queued processes
- Run with empty queue returns success
- Run with successful blocking process returns success
- Run configures blocking process environment before execution
- Run wraps blocking process output in local section
- Run with failing blocking process returns failure
- Run with ignored failing blocking process returns success
- Run with null exit code returns failure
- Run blocking process exception returns failure
- Run detached process starts without blocking and waits at the end
- Run detached process start failure returns failure
- Run detached process start failure with ignore failure returns success
- Run will write blocking process output to standard and error outputs
- Wait will flush finished detached output without waiting for every process
Project Capabilities Resolver (FastForward\DevTools\Tests\Project\ProjectCapabilitiesResolver)
- Resolve will detect guide only repository capabilities
- Resolve will ignore tooling php files when detecting testable php source
- Resolve will detect php source from file based classmap entries
- Resolve will detect php package capabilities
Reader (FastForward\DevTools\Tests\GitAttributes\Reader)
- Read with non existent file will return empty string
- Read with existing file will return file contents
Reader (FastForward\DevTools\Tests\GitIgnore\Reader)
- Read with non existent file returns empty git ignore
- Read with existing file returns git ignore with entries
- Read returns git ignore interface instance
Rector Config (FastForward\DevTools\Tests\Config\RectorConfig)
- Configure will return callable
- Configure with custom callback will return callable
- Configure will apply the default rector configuration and customization callback
- It will expose reusable default sets and rules
- Apply safe migration set will be callable without the safe package installed
Refactor Command (FastForward\DevTools\Tests\Console\Command\RefactorCommand)
- Execute will return success when process queue succeeds
- Execute will return failure when process queue fails
- Execute will request json output and disable progress when json is requested
- Execute will enable progress when requested
Refresh Preview Pointer Action (FastForward\DevTools\Tests\GitHubActions\RefreshPreviewPointerAction)
- Refresh will publish the preview branch and expose the parent pointer change
- Refresh will skip publication when the preview pointer is already current
- Refresh will expose pointer change when the existing preview branch advanced
Remove Empty Doc Block Rector (FastForward\DevTools\Tests\Rector\RemoveEmptyDocBlockRector)
- Get rule definition will return configured definition
- Get node types will return class and class method node
- Refactor will return null if not class or class method node
- Refactor will return null if node has no doc comment
- Refactor will return null if doc comment is not empty
- Refactor will remove empty doc comment
- Refactor will remove single line empty doc comment
- Refactor will remove empty doc comment with spaces
- Refactor will return null for non supported nodes
- Is empty doc block will detect content after normalization
Reports Command (FastForward\DevTools\Tests\Console\Command\ReportsCommand)
- Execute will run reports and return success
- Execute will capture buffered output when json is requested
- Execute will forward progress to nested commands when requested
- Execute with cache will forward cache only to docs and tests
- Execute with no cache will forward no cache only to docs and tests
Reports Workflow (FastForward\DevTools\Tests\GitHubActions\ReportsWorkflow)
- Reports workflow will detect generated report surfaces
- Reports workflow will only verify generated artifacts
- Reports workflow will only comment and summarize generated artifacts
Resolve Predictable Conflicts Action (FastForward\DevTools\Tests\GitHubActions\ResolvePredictableConflictsAction)
- Gitlink resolver will stage the current branch pointer without materializing the submodule checkout
Resolver (FastForward\DevTools\Tests\License\Resolver)
- Resolve with m i t will return template filename
- Resolve with apache 2 will return apache 20 template
- Resolve with unknown license will return null
- Resolve with missing license will return null
- Resolve with empty license will return null
Retry Transient Failures Action (FastForward\DevTools\Tests\GitHubActions\RetryTransientFailuresAction)
- Action will skip gracefully when a failed job log cannot be downloaded
- Action will request a rerun when every failed job matches a transient signature
Runtime Environment (FastForward\DevTools\Tests\Environment\RuntimeEnvironment)
- Is enabled will return whether environment flag is truthy with data set "missing"
- Is enabled will return whether environment flag is truthy with data set "empty"
- Is enabled will return whether environment flag is truthy with data set "zero"
- Is enabled will return whether environment flag is truthy with data set "false"
- Is enabled will return whether environment flag is truthy with data set "one"
- Is enabled will return whether environment flag is truthy with data set "true"
- Is enabled will return whether environment flag is truthy with data set "yes"
- Is enabled will return whether environment flag is truthy with data set "on"
- Is github actions will return whether github actions flag is enabled
- Is ci will return true when github actions is enabled
- Is ci will return true when generic ci is enabled
- Is composer test run will return whether composer tests flag is enabled
- Is composer test run will return true during php unit runtime
- Is agent present will return whether known agent variables exist
Self Update Command (FastForward\DevTools\Tests\Console\Command\SelfUpdateCommand)
- Get command names will return attribute name and aliases
- Execute will update project installation
- Execute will return failure when update fails
- Execute will update global installation when current binary is global
Setup Composer Action (FastForward\DevTools\Tests\GitHubActions\SetupComposerAction)
- Detect runtime will prefer the consumer local installation
- Fallback install should not require composer lock file
- Detect runtime will fallback to the workflow source when the consumer does not install dev tools
- Detect runtime will prefer the workspace root repository checkout
- Detect runtime will ignore an unrelated workspace repository binary
- Detect runtime will ignore an unrelated installed binary
- Expose runtime will publish wrapper and environment variables for the workflow fallback
Skills Command (FastForward\DevTools\Tests\Console\Command\SkillsCommand)
- Execute will fail when packaged skills directory does not exist
- Execute will create skills directory when it does not exist
- Execute will return failure when synchronizer fails
Standards Command (FastForward\DevTools\Tests\Console\Command\StandardsCommand)
- Execute will run suite sequentially
- Execute will return failure when any command fails
- Execute with cache will forward cache only to cache aware nested commands
- Execute will suppress progress log when json is requested
- Execute with no cache will forward no cache only to cache aware nested commands
Support (FastForward\DevTools\Tests\Composer\Json\Schema\Support)
- Accessors will return values provided to constructor
- Constructor will initialize with empty strings by default
Sync Command (FastForward\DevTools\Tests\Console\Command\SyncCommand)
- Execute will queue dedicated synchronization commands
- Execute will disable detached mode when checking drift
- Execute will propagate json output format to sub commands
Synchronize Result (FastForward\DevTools\Tests\Sync\SynchronizeResult)
- Add created link will record the link name
- Add preserved link will record the link name
- Add removed broken link will record the link name
- Mark failed will set the failed flag
System Clock (FastForward\DevTools\Tests\Psr\Clock\SystemClock)
- Now will return current date time immutable
Unified Differ (FastForward\DevTools\Tests\Resource\UnifiedDiffer)
- Diff will return trimmed unified diff output
Unreleased Changelog Conflict Resolver (FastForward\DevTools\Tests\Changelog\Conflict\UnreleasedChangelogConflictResolver)
- Resolve will preserve both sides of unreleased drift
- Resolve will keep branch entries in current unreleased after a release moved main
- Resolve will deduplicate entries from multiple sources
Unreleased Entry Checker (FastForward\DevTools\Tests\Changelog\Checker\UnreleasedEntryChecker)
- Has pending changes will return false when the file cannot be read
- Has pending changes will return false when the unreleased section is empty
- Has pending changes will return true when unreleased section contains entries
- Has pending changes will compare against baseline reference
- Has pending changes will return true when baseline does not contain new entries
- Has pending changes will ignore entries only inherited from the base branch
- Has pending changes will still detect branch specific entries alongside inherited ones
- Has pending changes will return true when the baseline cannot be loaded
Update Composer Json Command (FastForward\DevTools\Tests\Console\Command\UpdateComposerJsonCommand)
- Command will set expected name description and help
- Execute will update composer json scripts and managed metadata
- Execute will remove only managed grum php config default path
- Execute will preserve consumer owned grum php config default path
- Execute will add readme metadata when readme exists and composer json does not declare readme
- Execute will preserve existing readme metadata
- Execute will skip readme metadata when readme does not exist
- Execute will return success when composer file does not exist
- Execute will return success without writing when comparison is unchanged
- Execute will return failure in check mode when composer json would change
- Execute will return success in dry run mode when composer json would change
- Execute will skip writing when interactive confirmation is declined
Version Check Notifier (FastForward\DevTools\Tests\SelfUpdate\VersionCheckNotifier)
- Notify will write warning when dev tools is outdated
- Notify will stay silent when check fails
- Notify will stay silent in ci
- Notify will stay silent when version check is disabled
Version Check Result (FastForward\DevTools\Tests\SelfUpdate\VersionCheckResult)
- Is outdated will return true when latest stable version is newer
- Is outdated will return false when versions match
Wiki Command (FastForward\DevTools\Tests\Console\Command\WikiCommand)
- Execute will treat equivalent default wiki targets as default with data set #0
- Execute will treat equivalent default wiki targets as default with data set #1
- Execute will return success when process queue succeeds
- Execute will suppress progress log when json is requested
- Execute with no cache will skip php documentor cache folder
- Execute will skip when wiki target does not exist
- Execute will generate when custom wiki target does not exist
- Execute will skip when no api directories are detected
- Execute with init will skip existing wiki submodule
Wiki Workflows (FastForward\DevTools\Tests\GitHubActions\WikiWorkflows)
- Wiki preview workflow will skip wiki operations when no wiki repository exists
- Wiki maintenance workflow will skip wiki operations when no wiki repository exists
Working Project Path Resolver (FastForward\DevTools\Tests\Path\WorkingProjectPathResolver)
- It will expose canonical repository root paths
- It will include custom relative workspace in tooling skip patterns
- It will normalize path separators when joining project paths
- It will expose relative tooling skip patterns by default
- It will expose tooling source paths ignoring excluded directories
- It will ignore custom workspace when resolving tooling source paths
- It will expose the current working project directory or paths under it
Writer (FastForward\DevTools\Tests\GitAttributes\Writer)
- Write will append trailing line feed
- Write will align attribute columns using the longest path spec
- Write will respect escaped whitespace inside the path spec
- Write will preserve empty lines
- Write will not add an extra blank line when content already ends with a line feed
- Write will normalize multiple spaces
- Write will preserve comments
- Write will handle multiple spaces between path and attribute
- Write will normalize content with extra whitespace characters
- Write will handle paths without attributes as raw entry
- Write will handle paths with only whitespace attribute as raw entry
- Write will align with tab separated entries
Writer (FastForward\DevTools\Tests\GitIgnore\Writer)
- Write dumps content to file
- Write with empty entries dumps empty string
- Write with multiple entries joins with newline
Xdebug Disabling Process Environment Configurator (FastForward\DevTools\Tests\Process\XdebugDisablingProcessEnvironmentConfigurator)
- Configure disables xdebug for non coverage process
- Configure does not override process xdebug mode
- Configure does not disable xdebug when parent allows composer xdebug
- Configure does not disable xdebug when parent already configured xdebug mode
- Configure does not disable xdebug for coverage when pcov is unavailable
- Configure disables xdebug for coverage when pcov is available
- Configure does not treat coverage summary as coverage driver requirement
- Configure does nothing when xdebug is not loaded