Skip to content

Commit

Permalink
Merge pull request #52 from hydephp/analysis-3wgPJ1
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
caendesilva authored Mar 30, 2022
2 parents d7b6fd4 + e1683a2 commit a2f1c81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
11 changes: 5 additions & 6 deletions tests/Feature/BuildServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/
class BuildServiceTest extends TestCase
{

/** @throws Exception */
public function testDetermineModelCanFindMarkdownPost()
{
Expand Down Expand Up @@ -62,14 +61,13 @@ public function testDetermineModelThrowsExceptionWhenSuppliedWithUnknownPath()
public function testExecute()
{
$path = '_posts/test-f01cae99-29ca-481e-b977-6acf9ee364d3.md';
copy(Hyde::path('vendor/hyde/framework/tests/stubs/_posts/my-new-post.md'),
copy(Hyde::path('vendor/hyde/framework/tests/stubs/_posts/my-new-post.md'),
Hyde::path($path)
);
$service = new BuildService('_posts/test-f01cae99-29ca-481e-b977-6acf9ee364d3.md');
$service->execute();
$this->assertNotNull($service->model);
unlink(Hyde::path($path));

}

/** @throws Exception */
Expand All @@ -82,9 +80,10 @@ public function testHandle()
}

/** @throws Exception */
private function runHandleTest(string $prefix, string $suffix = '.md') {
$path = $prefix . '/test-f01cae99-29ca-481e-b977-6acf9ee364d3'. $suffix;
copy(Hyde::path('vendor/hyde/framework/tests/stubs/_posts/my-new-post.md'),
private function runHandleTest(string $prefix, string $suffix = '.md')
{
$path = $prefix.'/test-f01cae99-29ca-481e-b977-6acf9ee364d3'.$suffix;
copy(Hyde::path('vendor/hyde/framework/tests/stubs/_posts/my-new-post.md'),
Hyde::path($path)
);
$service = new BuildService($path);
Expand Down
7 changes: 3 additions & 4 deletions tests/Feature/Commands/HydeRebuildStaticSiteCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Commands;

use Hyde\Framework\Commands\HydeRebuildStaticSiteCommand;
use Hyde\Framework\Hyde;
use Tests\TestCase;

Expand All @@ -13,9 +12,9 @@ class HydeRebuildStaticSiteCommandTest extends TestCase

public function testHandleIsSuccessfulWithValidPath()
{
copy(Hyde::path(static::$stub),Hyde::path(static::$path));
copy(Hyde::path(static::$stub), Hyde::path(static::$path));

$this->artisan('rebuild ' . static::$path)
$this->artisan('rebuild '.static::$path)
->assertExitCode(0);

$outputPath = '_site/test-07239181-403e-443b-94f3-f912a031f31a.html';
Expand All @@ -28,7 +27,7 @@ public function testHandleIsSuccessfulWithValidPath()
public function testValidateCatchesBadSourceDirectory()
{
$this->artisan('rebuild foo/bar')
->expectsOutput("Path [foo/bar] is not in a valid source directory.")
->expectsOutput('Path [foo/bar] is not in a valid source directory.')
->assertExitCode(400);
}

Expand Down

0 comments on commit a2f1c81

Please sign in to comment.