Skip to content

Commit

Permalink
Add a setUp method and assertTrue method call
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed Feb 9, 2024
1 parent c52974c commit 77f7f47
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/TestMethodsResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,16 @@ public function resolve(string $class): array
{
$reflectionClass = new ReflectionClass($class);

$methods = [];

$staticCallGenerator = new StaticCallGenerator('self', 'markTestSkipped', ['Not implemented yet.']);

$assertTrue = new StaticCallGenerator('self', 'assertTrue', ['true']);

$methods = [
'setUp' => new MethodGenerator('setUp', 'void', [], [], [
$staticCallGenerator,
], [], false, false, false, true, false, false),
];

foreach ($reflectionClass->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {
$testMethodName = $this->testMethodNameNormalizer->normalize($method->getName());

Expand Down Expand Up @@ -118,7 +124,7 @@ class_exists($type)
'void',
[],
$parameters,
[$staticCallGenerator],
[$assertTrue],
$attributes,
$method->isStatic(),
$method->isFinal(),
Expand Down

0 comments on commit 77f7f47

Please sign in to comment.