Skip to content

Commit

Permalink
Update master to output generated at
Browse files Browse the repository at this point in the history
  • Loading branch information
abenevaut committed Jan 25, 2025
1 parent fbef603 commit 56e1264
Show file tree
Hide file tree
Showing 135 changed files with 1,802 additions and 1,601 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
phpunit.xml.test
phpunit.xml
.phpunit.result.cache
xdebug-errors.log
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM ghcr.io/abenevaut/vapor-ci:php83

RUN docker-php-ext-install exif
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# phpunit-slicer

![demo](https://raw.githubusercontent.com/abenevaut/phpunit-slicer/refs/heads/master/demo.gif)

[Wiki](https://github.com/abenevaut/phpunit-slicer/wiki)

## Licensing
Expand Down
21 changes: 10 additions & 11 deletions app/Commands/SliceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,16 @@ class SliceCommand extends Command
public function handle()
{
$validator = Validator::make([
'number-tests-suites' => $this->argument('number-tests-suites'),
'phpunit-configuration' => $this->argument('phpunit-configuration'),
'phpunit-configuration-destination' => $this->argument('phpunit-configuration-destination'),
'tests-directory' => $this->argument('tests-directory'),
], [
'number-tests-suites' => 'integer|min:1',
'phpunit-configuration' => [new FileExistsRule],
'phpunit-configuration-destination' => 'required',
'tests-directory' => [new DirectoryExistsRule],
]
);
'number-tests-suites' => $this->argument('number-tests-suites'),
'phpunit-configuration' => $this->argument('phpunit-configuration'),
'phpunit-configuration-destination' => $this->argument('phpunit-configuration-destination'),
'tests-directory' => $this->argument('tests-directory'),
], [
'number-tests-suites' => 'integer|min:1',
'phpunit-configuration' => [new FileExistsRule()],
'phpunit-configuration-destination' => 'required',
'tests-directory' => [new DirectoryExistsRule()],
]);

if ($validator->errors()->any() === true) {
foreach ($validator->errors()->all() as $errorMessage) {
Expand Down
10 changes: 8 additions & 2 deletions app/Services/PHPUnitConfigurationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@ public function generateTestsSuites(string $testsDirectory, int $numberTestsSuit
->getElementsByTagName('testsuites')
->item(0);

throw_if(!$phpunit, new \Exception('There is no <phpunit /> section in your phpunit configuration file.'));
throw_if(!$phpunitTestSuitesNode, new \Exception('There is no <testsuites /> section in your phpunit configuration file.'));
throw_if(
!$phpunit,
new \Exception('There is no <phpunit /> section in your phpunit configuration file.')
);
throw_if(
!$phpunitTestSuitesNode,
new \Exception('There is no <testsuites /> section in your phpunit configuration file.')
);

$testSuites = $this
->configurationFile
Expand Down
Binary file modified builds/phpunit-slicer
Binary file not shown.
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"require": {
"php": "^8.1",
"abenevaut/laravel-infrastructure": "^0.2.2",
"abenevaut/laravel-infrastructure": "^0.4.0",
"illuminate/translation": "^10.9",
"illuminate/validation": "^10.9",
"nunomaduro/termwind": "^1.15"
Expand All @@ -26,7 +26,9 @@
"laravel-zero/framework": "^10.0",
"mockery/mockery": "^1.5.0",
"pestphp/pest": "^2.6.0",
"pestphp/pest-plugin-faker": "^2.0"
"pestphp/pest-plugin-faker": "^2.0",
"phpstan/phpstan": "^2.0",
"squizlabs/php_codesniffer": "^3.11"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit 56e1264

Please sign in to comment.