Skip to content

Commit

Permalink
Merge pull request #23 from vossik/input_path
Browse files Browse the repository at this point in the history
fixed input path
  • Loading branch information
peldax authored Jun 2, 2021
2 parents 0dd385b + be417b3 commit 6f40270
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Command/SqlGeneratorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ private function getForeignKey(\ReflectionProperty $property) : ?string
private function getBeans(string $destination) : array
{
$robotLoader = new \Nette\Loaders\RobotLoader();
$robotLoader->addDirectory(__DIR__ . $destination);
$robotLoader->addDirectory($destination);
$robotLoader->rebuild();

$foundClasses = \array_keys($robotLoader->getIndexedClasses());
Expand Down
8 changes: 4 additions & 4 deletions tests/Unit/Command/SqlGeneratorCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function testSimple() : void

$result = $commandTester->execute([
'command' => 'sqlGenerator',
'source' => '/../../tests/Unit/TestBean/',
'source' => __DIR__ . '/../TestBean/',
]);

self::assertSame(0, $result);
Expand Down Expand Up @@ -149,7 +149,7 @@ public function testDuplicateColumns() : void

$commandTester->execute([
'command' => 'sqlGenerator',
'source' => '/../../tests/Unit/InvalidBean/DuplicateColumns/',
'source' => __DIR__ . '/../InvalidBean/DuplicateColumns/',
]);
}

Expand All @@ -166,7 +166,7 @@ public function testUndefinedProperty() : void

$commandTester->execute([
'command' => 'sqlGenerator',
'source' => '/../../tests/Unit/InvalidBean/UndefinedProperty/',
'source' => __DIR__ . '/../InvalidBean/UndefinedProperty/',
]);
}

Expand All @@ -183,7 +183,7 @@ public function testColumnCount() : void

$commandTester->execute([
'command' => 'sqlGenerator',
'source' => '/../../tests/Unit/InvalidBean/ColumnCount/',
'source' => __DIR__ . '/../InvalidBean/ColumnCount/',
]);
}
}

0 comments on commit 6f40270

Please sign in to comment.