Skip to content

Commit

Permalink
add another test
Browse files Browse the repository at this point in the history
  • Loading branch information
daltonbennett04 committed Jul 23, 2024
1 parent 3c3366f commit 550cb95
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions tests/units/Output/XUnitOutputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
class XUnitOutputTest extends TestCase {

/**
* @dataProvider shouldEmitProvider
* @dataProvider shouldEmitIgnoreProvider
*/
public function testShouldEmitIgnoreArray($fileName, $expected) : void {
$emitList = [
[
'ignore' => ['**/app/BambooHR/Silo/Benefits/Shared/**/*'],
'ignore' => ['**/app/BambooHR/Controller/TimeOff/**/*', '**/app/BambooHR/Silo/Benefits/Shared/**/*'],
]
];
$config = new TestConfig('', $emitList);
Expand All @@ -25,11 +25,33 @@ public function testShouldEmitIgnoreArray($fileName, $expected) : void {
self::assertEquals($expected, $actual);
}

public function shouldEmitProvider() {
public function shouldEmitIgnoreProvider() {
return [
['app/BambooHR/Silo/Benefits/Shared/BenefitCalculator/Settings/GroupPlanCalculatorSetting/RateSplittableGroupPlanCalculatorSetting.php', false],
['app/BambooHR/Controller/SomeTestOne.php', true]
];
}

/**
* @dataProvider shouldEmitGlobProvider
*/
public function testShouldEmitGlobArray($fileName, $expected) : void {
$emitList = [
[
'glob' => ['**/app/BambooHR/Silo/Benefits/Shared/**/*'],
]
];
$config = new TestConfig('', $emitList);
$output = new XUnitOutput($config);
$actual = $output->shouldEmit($fileName, '', 0);
self::assertEquals($expected, $actual);
}

public function shouldEmitGlobProvider() {
return [
['app/BambooHR/Silo/Benefits/Shared/BenefitCalculator/Settings/GroupPlanCalculatorSetting/RateSplittableGroupPlanCalculatorSetting.php', true],
['app/BambooHR/Controller/SomeTestOne.php', false]
];
}

}

0 comments on commit 550cb95

Please sign in to comment.