Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#166: Automatically add .json extension #172

Closed
wants to merge 1 commit into from

Conversation

yogyrton
Copy link
Contributor

@@ -54,6 +54,7 @@ trait FixturesTrait
protected array $prepareSequencesExceptTables = ['migrations', 'password_resets'];

protected string $dumpFileName = 'dump.sql';
protected string $extension = '.json';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's make const instead

@@ -96,7 +97,7 @@ public function getFixture(string $fixtureName, $failIfNotExists = true): string

public function getJsonFixture(string $fixtureName, $assoc = true)
{
return json_decode($this->getFixture($fixtureName), $assoc);
return json_decode($this->getFixture($fixtureName . $this->extension), $assoc);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to add extension ONLY if it not set

@@ -36,7 +36,7 @@ public function testOpenNotExistsFile()

public function testParseColumns()
{
$header = $this->getJsonFixture('header.json');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all presented test changes will become useless after correct implementation of task

@DenTray DenTray assigned yogyrton and unassigned DenTray Dec 23, 2024
@yogyrton yogyrton closed this Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants