Skip to content

Commit

Permalink
moved compiler test snaphosts alongside fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubkulhan committed May 29, 2024
1 parent 8ecaa94 commit 45e995a
Show file tree
Hide file tree
Showing 68 changed files with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions data-access-kit/test/Repository/CompilerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,20 +194,18 @@ private static function provideRepositoryClasses(array $classes): iterable
{
foreach ($classes as $class) {
$p = strrpos($class, "\\");
yield lcfirst(str_replace("RepositoryInterface", "", substr($class, $p + 1))) => [$class];
yield str_replace("Interface", "", substr($class, $p + 1)) => [$class];
}
}

protected function getSnapshotDirectory(): string
{
return dirname((new ReflectionClass($this))->getFileName()) . "/Snapshot";
return dirname((new ReflectionClass($this))->getFileName()) . "/Fixture";
}

protected function getSnapshotId(): string
{
return (new ReflectionClass($this))->getShortName() . '.' .
$this->name() . '.' .
$this->dataName();
return $this->dataName() . '.snapshot';
}

}

0 comments on commit 45e995a

Please sign in to comment.