FlankTest.php 1.2 KB

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