FlankTest.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace League\CLImate\Tests;
  3. class FlankTest extends TestBase
  4. {
  5. /** @test */
  6. public function it_can_output_a_basic_flank()
  7. {
  8. $this->shouldWrite("\e[m### Flank me! ###\e[0m");
  9. $this->shouldHavePersisted();
  10. $this->cli->flank('Flank me!');
  11. }
  12. /** @test */
  13. public function it_can_output_a_flank_with_a_different_character()
  14. {
  15. $this->shouldWrite("\e[m--- Flank me! ---\e[0m");
  16. $this->shouldHavePersisted();
  17. $this->cli->flank('Flank me!', '-');
  18. }
  19. /** @test */
  20. public function it_can_output_a_flank_with_a_different_length()
  21. {
  22. $this->shouldWrite("\e[m##### Flank me! #####\e[0m");
  23. $this->shouldHavePersisted();
  24. $this->cli->flank('Flank me!', null, 5);
  25. }
  26. /** @test */
  27. public function it_can_output_a_flank_with_a_character_and_different_length()
  28. {
  29. $this->shouldWrite("\e[m----- Flank me! -----\e[0m");
  30. $this->shouldHavePersisted();
  31. $this->cli->flank('Flank me!', '-', 5);
  32. }
  33. }