Skip to content

Commit

Permalink
Merge unit tests into single feature test
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed May 31, 2022
1 parent 4fdab6e commit c455d1c
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Hyde\Framework\Contracts\MarkdownShortcodeContract;

/**
* @see \Tests\Feature\ColoredBlockquoteShortcodesTest
*/
abstract class AbstractColoredBlockquote implements MarkdownShortcodeContract
{
protected static string $signature = '>color';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Hyde\Framework\Services\Markdown\Shortcodes;

/**
* @see \Tests\Unit\Markdown\Shortcodes\DangerColoredBlockquoteTest
* @see \Tests\Feature\ColoredBlockquoteShortcodesTest
*/
class DangerColoredBlockquote extends AbstractColoredBlockquote
{
Expand Down
2 changes: 1 addition & 1 deletion src/Services/Markdown/Shortcodes/InfoColoredBlockquote.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Hyde\Framework\Services\Markdown\Shortcodes;

/**
* @see \Tests\Unit\Markdown\Shortcodes\InfoColoredBlockquoteTest
* @see \Tests\Feature\ColoredBlockquoteShortcodesTest
*/
class InfoColoredBlockquote extends AbstractColoredBlockquote
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Hyde\Framework\Services\Markdown\Shortcodes;

/**
* @see \Tests\Unit\Markdown\Shortcodes\SuccessColoredBlockquoteTest
* @see \Tests\Feature\ColoredBlockquoteShortcodesTest
*/
class SuccessColoredBlockquote extends AbstractColoredBlockquote
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Hyde\Framework\Services\Markdown\Shortcodes;

/**
* @see \Tests\Unit\Markdown\Shortcodes\WarningColoredBlockquoteTest
* @see \Tests\Feature\ColoredBlockquoteShortcodesTest
*/
class WarningColoredBlockquote extends AbstractColoredBlockquote
{
Expand Down
48 changes: 48 additions & 0 deletions tests/Feature/ColoredBlockquoteShortcodesTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

namespace Tests\Feature;

use Tests\TestCase;

use Hyde\Framework\Services\Markdown\Shortcodes\DangerColoredBlockquote;
use Hyde\Framework\Services\Markdown\Shortcodes\SuccessColoredBlockquote;
use Hyde\Framework\Services\Markdown\Shortcodes\InfoColoredBlockquote;
use Hyde\Framework\Services\Markdown\Shortcodes\WarningColoredBlockquote;


/**
* Class ColoredBlockquoteShortcodesTest.
*
* @covers \Hyde\Framework\Services\Markdown\Shortcodes\AbstractColoredBlockquote
* @covers \Hyde\Framework\Services\Markdown\Shortcodes\DangerColoredBlockquote
* @covers \Hyde\Framework\Services\Markdown\Shortcodes\SuccessColoredBlockquote
* @covers \Hyde\Framework\Services\Markdown\Shortcodes\InfoColoredBlockquote
* @covers \Hyde\Framework\Services\Markdown\Shortcodes\WarningColoredBlockquote
*/
class ColoredBlockquoteShortcodesTest extends TestCase
{
public function test_resolve_danger()
{
$this->assertEquals('<blockquote class="danger">foo</blockquote>',
DangerColoredBlockquote::resolve('>danger foo'));
}

public function test_resolve_success()
{
$this->assertEquals('<blockquote class="success">foo</blockquote>',
SuccessColoredBlockquote::resolve('>success foo'));
}

public function test_resolve_info()
{
$this->assertEquals('<blockquote class="info">foo</blockquote>',
InfoColoredBlockquote::resolve('>info foo'));
}

public function test_resolve_warning()
{
$this->assertEquals('<blockquote class="warning">foo</blockquote>',
WarningColoredBlockquote::resolve('>warning foo'));
}

}
18 changes: 0 additions & 18 deletions tests/Unit/Markdown/Shortcodes/DangerColoredBlockquoteTest.php

This file was deleted.

18 changes: 0 additions & 18 deletions tests/Unit/Markdown/Shortcodes/InfoColoredBlockquoteTest.php

This file was deleted.

18 changes: 0 additions & 18 deletions tests/Unit/Markdown/Shortcodes/SuccessColoredBlockquoteTest.php

This file was deleted.

18 changes: 0 additions & 18 deletions tests/Unit/Markdown/Shortcodes/WarningColoredBlockquoteTest.php

This file was deleted.

0 comments on commit c455d1c

Please sign in to comment.