Skip to content

Commit

Permalink
Clean up formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Dec 24, 2024
1 parent e9bee64 commit 5143c0b
Showing 1 changed file with 6 additions and 35 deletions.
41 changes: 6 additions & 35 deletions packages/framework/tests/Unit/ConsoleHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,50 +99,21 @@ public function testMultiselectSignatureMatchesLaravelPrompts()
$laravelParams = $reflectionLaravel->getParameters();
$helperParams = $reflectionHelper->getParameters();

// Test parameter count
$this->assertCount(count($laravelParams), $helperParams, 'Parameter count mismatch');

// Test each parameter
foreach ($laravelParams as $index => $laravelParam) {
$helperParam = $helperParams[$index];

$this->assertSame(
$laravelParam->getName(),
$helperParam->getName(),
"Parameter name mismatch at position {$index}"
);

$this->assertEquals(
$laravelParam->getType(),
$helperParam->getType(),
"Parameter type mismatch for '{$laravelParam->getName()}'"
);

$this->assertSame(
$laravelParam->isOptional(),
$helperParam->isOptional(),
"Parameter optionality mismatch for '{$laravelParam->getName()}'"
);
$this->assertSame($laravelParam->getName(), $helperParam->getName(), "Parameter name mismatch at position {$index}");
$this->assertEquals($laravelParam->getType(), $helperParam->getType(), "Parameter type mismatch for '{$laravelParam->getName()}'");
$this->assertSame($laravelParam->isOptional(), $helperParam->isOptional(), "Parameter optionality mismatch for '{$laravelParam->getName()}'");

if ($laravelParam->isDefaultValueAvailable()) {
$this->assertTrue(
$helperParam->isDefaultValueAvailable(),
"Default value availability mismatch for '{$laravelParam->getName()}'"
);

$this->assertEquals(
$laravelParam->getDefaultValue(),
$helperParam->getDefaultValue(),
"Default value mismatch for '{$laravelParam->getName()}'"
);
$this->assertTrue($helperParam->isDefaultValueAvailable(), "Default value availability mismatch for '{$laravelParam->getName()}'");
$this->assertEquals($laravelParam->getDefaultValue(), $helperParam->getDefaultValue(), "Default value mismatch for '{$laravelParam->getName()}'");
}
}

// Test return type
$this->assertEquals(
$reflectionLaravel->getReturnType(),
$reflectionHelper->getReturnType(),
'Return type mismatch'
);
$this->assertEquals($reflectionLaravel->getReturnType(), $reflectionHelper->getReturnType(), 'Return type mismatch');
}
}

0 comments on commit 5143c0b

Please sign in to comment.