Skip to content

Commit

Permalink
Merge pull request #26 from cacing69/analysis-7WYaQN
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
cacing69 authored Sep 16, 2023
2 parents 3d489c1 + d59325c commit 452393e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Cquery.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ public function save($path, $writer = CSVWriter::class)
{
$writer = new $writer();
$writer->setData($this->get());

return $writer->save($path);
}
}
4 changes: 2 additions & 2 deletions tests/SampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1511,9 +1511,9 @@ public function testSaveWithCsvWriter()
'h1 as title',
'1.9 as static_number'
)
->save(".cached/test_write.csv");
->save('.cached/test_write.csv');

$this->assertFileExists(".cached/test_write.csv");
$this->assertFileExists('.cached/test_write.csv');
}

public function testWithFilterNested()
Expand Down
5 changes: 3 additions & 2 deletions tests/WriterTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

use Cacing69\Cquery\Cquery;
use Cacing69\Cquery\Writer\CSVWriter;
use PHPUnit\Framework\TestCase;
Expand All @@ -25,8 +26,8 @@ public function testCsvWriter()

$writer->setData($result);

$writer->save(".cached/output.csv");
$writer->save('.cached/output.csv');

$this->assertFileExists(".cached/output.csv");
$this->assertFileExists('.cached/output.csv');
}
}

0 comments on commit 452393e

Please sign in to comment.