Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Mar 3, 2025
1 parent ea2a71f commit 7a81993
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/Concerns/InteractsWithTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ public static function usesTestingFeature($attribute, int $flag = Attribute::TAR
return;
}

/** @var class-string<TTestingFeature> $name */
$name = \get_class($attribute);

if ($flag & Attribute::TARGET_CLASS) {
static::$testCaseTestingFeatures[] = [
'key' => $attribute::class,
Expand Down
5 changes: 1 addition & 4 deletions src/PHPUnit/AttributeParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,7 @@ protected static function resolveAttribute(ReflectionAttribute $attribute): arra
return [null, null];
}

/** @var class-string<TTestingFeature> $name */
$name = \get_class($instance);

return [$name, $instance];
return [$instance::class, $instance];
}, [null, null], false);
}
}
2 changes: 1 addition & 1 deletion src/Workbench/Workbench.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public static function discoverRoutes(ApplicationContract $app, ConfigContract $
$factoryNamespace = static::detectNamespace('database/factories') ?? 'Workbench\\Database\\Factories\\';

$namespacedFactoryBasename = Str::replaceLast(
'Factory', '', Str::replaceFirst($factoryNamespace, '', \get_class($factory))
'Factory', '', Str::replaceFirst($factoryNamespace, '', $factory::class)
);

$factoryBasename = Str::replaceLast('Factory', '', class_basename($factory));
Expand Down

0 comments on commit 7a81993

Please sign in to comment.