Skip to content

Commit

Permalink
Ensure we support filenames without extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
duncan3dc committed Nov 24, 2019
1 parent 029f781 commit e30dca5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ASCII/php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__
____ / /_ ____
/ __ \/ __ \/ __ \
/ /_/ / / / / /_/ /
/ .___/_/ /_/ .___/
/_/ /_/
17 changes: 17 additions & 0 deletions tests/DrawTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,23 @@ public function testAddArt1()
}


/**
* Ensure we can draw files without extensions.
*/
public function testDraw1()
{
$this->shouldWrite("\e[m __\e[0m");
$this->shouldWrite("\e[m ____ / /_ ____\e[0m");
$this->shouldWrite("\e[m / __ \\/ __ \\/ __ \\\e[0m");
$this->shouldWrite("\e[m / /_/ / / / / /_/ /\e[0m");
$this->shouldWrite("\e[m / .___/_/ /_/ .___/\e[0m");
$this->shouldWrite("\e[m/_/ /_/\e[0m");
$this->shouldHavePersisted();

$this->cli->draw("php");
}


/**
* Ensure we don't draw an image unless the filename matches exactly.
* https://github.com/thephpleague/climate/issues/155
Expand Down

0 comments on commit e30dca5

Please sign in to comment.