1 | <?php |
||
17 | class ScaffoldTest extends \PHPUnit_Framework_TestCase |
||
18 | { |
||
19 | /** |
||
20 | * The test subject |
||
21 | * @var Scaffold |
||
22 | */ |
||
23 | protected $scaffold; |
||
24 | |||
25 | /** |
||
26 | * Initiate the test subject |
||
27 | */ |
||
28 | public function setUp() |
||
32 | |||
33 | /** |
||
34 | * Test that a Symfony Console Application is created, as well as the SilverStripe and Configuration Loaders |
||
35 | * |
||
36 | * @covers \SilverLeague\Console\Framework\ConsoleBase |
||
37 | * @covers ::setSilverStripeLoader |
||
38 | * @covers ::getSilverStripeLoader |
||
39 | * @covers ::setConfigurationLoader |
||
40 | * @covers ::getConfigurationLoader |
||
41 | */ |
||
42 | public function testConstructor() |
||
48 | |||
49 | /** |
||
50 | * Test that YAML configuration is loaded from the ConfigurationLoader in array format (YAML ~2.7 is |
||
51 | * locked into the SilverStripe framework) |
||
52 | * |
||
53 | * @covers ::setConfiguration |
||
54 | * @covers ::getConfiguration |
||
55 | * @covers ::getConfigurationLoader |
||
56 | * @covers \SilverLeague\Console\Framework\Loader\ConfigurationLoader |
||
57 | */ |
||
58 | public function testLoadConfiguration() |
||
66 | |||
67 | /** |
||
68 | * Test that the bootstrap method was called, initiating Bootstrap which defines this constant |
||
69 | * |
||
70 | * @covers ::bootstrap |
||
71 | * @covers \SilverLeague\Console\Framework\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 |