-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Piotr Walków
committed
Jan 9, 2017
1 parent
7204c8c
commit 960bf42
Showing
6 changed files
with
176 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace spec\PhpSpec\NyanFormattersExtension; | ||
|
||
use PhpSpec\NyanFormattersExtension\Extension; | ||
use PhpSpec\Extension as PhpSpecExtension; | ||
use PhpSpec\ObjectBehavior; | ||
use PhpSpec\ServiceContainer; | ||
|
||
/** | ||
* @author Piotr Walków <[email protected]> | ||
*/ | ||
class ExtensionSpec extends ObjectBehavior | ||
{ | ||
function it_is_initializable() | ||
{ | ||
$this->shouldHaveType(Extension::class); | ||
$this->shouldImplement(PhpSpecExtension::class); | ||
} | ||
|
||
function it_loads_formatters( | ||
ServiceContainer $container | ||
) { | ||
$this->load($container, []); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
spec/PhpSpec/NyanFormattersExtension/Formatter/DeadRatFormatterSpec.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace spec\PhpSpec\NyanFormattersExtension\Formatter; | ||
|
||
use PhpSpec\Console\ConsoleIO; | ||
use PhpSpec\Formatter\Presenter\Presenter; | ||
use PhpSpec\Listener\StatisticsCollector; | ||
use PhpSpec\NyanFormattersExtension\Formatter\DeadRatFormatter; | ||
use PhpSpec\ObjectBehavior; | ||
|
||
/** | ||
* DeadRatFormatterSpec | ||
* | ||
* @package spec\PhpSpec\NyanFormattersExtension\Formatter | ||
* | ||
* @author Piotr Walków <[email protected]> | ||
*/ | ||
class DeadRatFormatterSpec extends ObjectBehavior | ||
{ | ||
function let( | ||
Presenter $presenter, | ||
ConsoleIO $io, | ||
StatisticsCollector $stats | ||
) { | ||
$this->beConstructedWith($presenter, $io, $stats); | ||
} | ||
|
||
function it_is_initializable() | ||
{ | ||
$this->shouldHaveType(DeadRatFormatter::class); | ||
} | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
spec/PhpSpec/NyanFormattersExtension/Formatter/RatFormatterSpec.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace spec\PhpSpec\NyanFormattersExtension\Formatter; | ||
|
||
use PhpSpec\Console\ConsoleIO; | ||
use PhpSpec\Formatter\Presenter\Presenter; | ||
use PhpSpec\Listener\StatisticsCollector; | ||
use PhpSpec\NyanFormattersExtension\Formatter\RatFormatter; | ||
use PhpSpec\ObjectBehavior; | ||
|
||
/** | ||
* RatFormatterSpec | ||
* | ||
* @package spec\PhpSpec\NyanFormattersExtension\Formatter | ||
* | ||
* @author Piotr Walków <[email protected]> | ||
*/ | ||
class RatFormatterSpec extends ObjectBehavior | ||
{ | ||
function let( | ||
Presenter $presenter, | ||
ConsoleIO $io, | ||
StatisticsCollector $stats | ||
) { | ||
$this->beConstructedWith($presenter, $io, $stats); | ||
} | ||
|
||
function it_is_initializable() | ||
{ | ||
$this->shouldHaveType(RatFormatter::class); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/PhpSpec/NyanFormattersExtension/Formatter/DeadRatFormatter.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace PhpSpec\NyanFormattersExtension\Formatter; | ||
|
||
/** | ||
* DeadRatFormatter | ||
* | ||
* @package NyanFormattersExtension | ||
* | ||
* @author Piotr Walków <[email protected]> | ||
*/ | ||
class DeadRatFormatter extends NyanFormatter | ||
{ | ||
protected $states = | ||
array( | ||
array( | ||
'~ ~ ~ ', | ||
' ~ ~ ', | ||
' _ ~ ~ ~ ~', | ||
'/ \ M___M__ ', | ||
'\__/_} _} >', | ||
' \____/ȣȣ ', | ||
), | ||
array( | ||
' ~ ~ ', | ||
' ~ ~ ~ ~', | ||
'~_ ~ ~ ', | ||
'/ \ M___M__ ', | ||
'\__/_} _} >', | ||
' \____/ȣȣ ', | ||
), | ||
array( | ||
' ~ ~ ~ ~', | ||
'~ ~ ~ ', | ||
' _ ~ ', | ||
'/ \ M___M__ ', | ||
'\__/_} _} >', | ||
' \____/ȣȣ ', | ||
) | ||
); | ||
} |
41 changes: 41 additions & 0 deletions
41
src/PhpSpec/NyanFormattersExtension/Formatter/RatFormatter.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace PhpSpec\NyanFormattersExtension\Formatter; | ||
|
||
/** | ||
* RatFormatter | ||
* | ||
* @package NyanFormattersExtension | ||
* | ||
* @author Piotr Walków <[email protected]> | ||
*/ | ||
class RatFormatter extends NyanFormatter | ||
{ | ||
protected $states = | ||
array( | ||
array( | ||
' ~ ~ ', | ||
' ~ ', | ||
' ~ ___ ~ ~', | ||
' __/_ \☊☊_ ', | ||
'/ \_}__}__>', | ||
'\__ W W ' | ||
), | ||
array( | ||
' ~ ', | ||
' ~ ~ ~', | ||
'~ ~ ___ ~ ', | ||
' __/_ \☊☊_ ', | ||
'/ \_}__}__>', | ||
'\_/ M M ' | ||
), | ||
array( | ||
' ~ ~ ~', | ||
'~ ~ ~ ~ ', | ||
' ___ ~', | ||
' __/_ \☊☊_ ', | ||
'/ \_}__}__>', | ||
'\__ W W ' | ||
) | ||
); | ||
} |