1 | <?php |
||
18 | class ScaffoldTest extends \PHPUnit_Framework_TestCase |
||
19 | { |
||
20 | /** |
||
21 | * The test subject |
||
22 | * @var Scaffold |
||
23 | */ |
||
24 | protected $scaffold; |
||
25 | |||
26 | /** |
||
27 | * Initiate the test subject |
||
28 | */ |
||
29 | public function setUp() |
||
33 | |||
34 | /** |
||
35 | * Test that a Symfony Console Application is created, as well as the SilverStripe and Configuration Loaders |
||
36 | * |
||
37 | * @covers \SilverLeague\Console\Framework\ConsoleBase |
||
38 | * @covers ::setSilverStripeLoader |
||
39 | * @covers ::getSilverStripeLoader |
||
40 | * @covers ::setConfigurationLoader |
||
41 | * @covers ::getConfigurationLoader |
||
42 | */ |
||
43 | public function testConstructor() |
||
49 | |||
50 | /** |
||
51 | * Test that YAML configuration is loaded from the ConfigurationLoader in array format (YAML ~2.7 is |
||
52 | * locked into the SilverStripe framework) |
||
53 | * |
||
54 | * @covers ::setConfiguration |
||
55 | * @covers ::getConfiguration |
||
56 | * @covers ::getConfigurationLoader |
||
57 | * @covers \SilverLeague\Console\Framework\Loader\ConfigurationLoader |
||
58 | */ |
||
59 | public function testLoadConfiguration() |
||
67 | |||
68 | /** |
||
69 | * Test that the bootstrap method was called, initiating Bootstrap which defines this constant |
||
70 | * |
||
71 | * @covers ::bootstrap |
||
72 | */ |
||
73 | public function testBootstrapWasCalled() |
||
77 | |||
78 | /** |
||
79 | * Test that the run method will run the Symfony Application |
||
80 | * |
||
81 | * @covers ::run |
||
82 | */ |
||
83 | public function testRun() |
||
97 | |||
98 | /** |
||
99 | * Test that scaffoldApplication sets the name and version of the SilverStripe Console application, adds |
||
100 | * Commands and the "flush" InputOption |
||
101 | * |
||
102 | * @covers ::scaffoldApplication |
||
103 | * @covers ::addCommands |
||
104 | */ |
||
105 | public function testApplicationIsScaffolded() |
||
115 | } |
||
116 |