-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into try-to-fix-codecov-again
- Loading branch information
Showing
11 changed files
with
434 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/framework/resources/views/components/navigation/theme-toggle-button.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/framework/src/Framework/Features/BuildTasks/BuildTaskSkippedException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Hyde\Framework\Features\BuildTasks; | ||
|
||
use RuntimeException; | ||
|
||
class BuildTaskSkippedException extends RuntimeException | ||
{ | ||
public function __construct(string $message = 'Task was skipped', int $code = 0) | ||
{ | ||
parent::__construct($message, $code); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
packages/framework/tests/Unit/BuildTaskSkippedExceptionTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Hyde\Framework\Testing\Unit; | ||
|
||
use Hyde\Framework\Features\BuildTasks\BuildTaskSkippedException; | ||
use Hyde\Testing\UnitTestCase; | ||
|
||
/** | ||
* @covers \Hyde\Framework\Features\BuildTasks\BuildTaskSkippedException | ||
*/ | ||
class BuildTaskSkippedExceptionTest extends UnitTestCase | ||
{ | ||
public function testItCanBeInstantiated() | ||
{ | ||
$exception = new BuildTaskSkippedException(); | ||
|
||
$this->assertInstanceOf(BuildTaskSkippedException::class, $exception); | ||
} | ||
|
||
public function testItThrowsAnExceptionWithDefaultMessage() | ||
{ | ||
$this->expectException(BuildTaskSkippedException::class); | ||
$this->expectExceptionMessage('Task was skipped'); | ||
|
||
throw new BuildTaskSkippedException(); | ||
} | ||
|
||
public function testItThrowsAnExceptionWithCustomMessage() | ||
{ | ||
$this->expectException(BuildTaskSkippedException::class); | ||
$this->expectExceptionMessage('Custom message'); | ||
|
||
throw new BuildTaskSkippedException('Custom message'); | ||
} | ||
|
||
public function testDefaultExceptionCode() | ||
{ | ||
$exception = new BuildTaskSkippedException(); | ||
|
||
$this->assertSame(0, $exception->getCode()); | ||
} | ||
|
||
public function testCustomExceptionCode() | ||
{ | ||
$exception = new BuildTaskSkippedException('Custom message', 123); | ||
|
||
$this->assertSame(123, $exception->getCode()); | ||
} | ||
} |
Oops, something went wrong.