FlankTest.php 1.2 KB

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