diff --git a/tests/Functional/.gitkeep b/tests/Functional/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/Functional/Comment/CommentTest.php b/tests/Functional/Comment/CommentTest.php new file mode 100644 index 00000000..100d2531 --- /dev/null +++ b/tests/Functional/Comment/CommentTest.php @@ -0,0 +1,80 @@ +setComment($comment); + + self::assertSame('/*' . $comment . '*/', (string) $subject); + } + + /** + * @test + */ + public function renderWithVirginOutputFormatRendersCommentEnclosedInCommentDelimiters(): void + { + $comment = 'There is no spoon.'; + $subject = new Comment(); + + $subject->setComment($comment); + + self::assertSame('/*' . $comment . '*/', $subject->render(new OutputFormat())); + } + + /** + * @test + */ + public function renderWithDefaultOutputFormatRendersCommentEnclosedInCommentDelimiters(): void + { + $comment = 'There is no spoon.'; + $subject = new Comment(); + + $subject->setComment($comment); + + self::assertSame('/*' . $comment . '*/', $subject->render(OutputFormat::create())); + } + + /** + * @test + */ + public function renderWithCompactOutputFormatRendersCommentEnclosedInCommentDelimiters(): void + { + $comment = 'There is no spoon.'; + $subject = new Comment(); + + $subject->setComment($comment); + + self::assertSame('/*' . $comment . '*/', $subject->render(OutputFormat::createCompact())); + } + + /** + * @test + */ + public function renderWithPrettyOutputFormatRendersCommentEnclosedInCommentDelimiters(): void + { + $comment = 'There is no spoon.'; + $subject = new Comment(); + + $subject->setComment($comment); + + self::assertSame('/*' . $comment . '*/', $subject->render(OutputFormat::createPretty())); + } +} diff --git a/tests/Unit/Comment/CommentTest.php b/tests/Unit/Comment/CommentTest.php index c9e07102..2bfe670c 100644 --- a/tests/Unit/Comment/CommentTest.php +++ b/tests/Unit/Comment/CommentTest.php @@ -6,7 +6,6 @@ use PHPUnit\Framework\TestCase; use Sabberworm\CSS\Comment\Comment; -use Sabberworm\CSS\OutputFormat; use Sabberworm\CSS\Renderable; /** @@ -78,30 +77,4 @@ public function getLineNoInitiallyReturnsLineNumberPassedToConstructor(): void self::assertSame($lineNumber, $subject->getLineNo()); } - - /** - * @test - */ - public function toStringRendersCommentEnclosedInCommentDelimiters(): void - { - $comment = 'There is no spoon.'; - $subject = new Comment(); - - $subject->setComment($comment); - - self::assertSame('/*' . $comment . '*/', (string) $subject); - } - - /** - * @test - */ - public function renderRendersCommentEnclosedInCommentDelimiters(): void - { - $comment = 'There is no spoon.'; - $subject = new Comment(); - - $subject->setComment($comment); - - self::assertSame('/*' . $comment . '*/', $subject->render(new OutputFormat())); - } }