Skip to content

Commit bbd52af

Browse files
committed
Modify tests
1 parent f957e54 commit bbd52af

25 files changed

+1435
-1342
lines changed

tests/Cases/ControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class ControllerTest extends LaravelModulesTestCase
2222
public function testController()
2323
{
2424
//registeration
25-
$this->artisan('modules:make', ["id" => "Test", "name" => "Test Module", "--url" => "test"]);
25+
$this->artisan('make:module', ["id" => "Test", "name" => "Test Module", "--url" => "test"]);
2626
$this->loadModuleFiles("Test");
2727
\App\Modules\Test\Module::make()->registerFrameworkResources($this->app);
2828

tests/Cases/GenericTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testFailedPublicAccess()
3232

3333
public function testModulesServiceProvider()
3434
{
35-
$this->artisan('modules:make', ["id" => "Test", "name" => "Test Module"]);
35+
$this->artisan('make:module', ["id" => "Test", "name" => "Test Module"]);
3636
$this->loadModuleFiles("Test");
3737
$this->refreshApplication();
3838
Modules::get('Test');

tests/Cases/StoreHandlersTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function testDummyStoreHandler()
2525
Config::set('modules.store_handler', DummyStoreHandler::class);
2626

2727
//registeration
28-
$this->artisan('modules:make', ["id" => "Test", "name" => "Test Module", "--url" => "test"]);
28+
$this->artisan('make:module', ["id" => "Test", "name" => "Test Module", "--url" => "test"]);
2929
$this->loadModuleFiles("Test");
3030

3131
//test
@@ -41,7 +41,7 @@ public function testSimpleDbStoreHandler()
4141
{
4242

4343
//module
44-
$this->artisan('modules:make', ["id" => "Test", "name" => "Test Module", "--url" => "test"]);
44+
$this->artisan('make:module', ["id" => "Test", "name" => "Test Module", "--url" => "test"]);
4545
$this->loadModuleFiles("Test");
4646

4747
//config

tests/codeCoverage/Commands/InitiateDatabaseTable.php.html

Lines changed: 26 additions & 26 deletions
Large diffs are not rendered by default.

tests/codeCoverage/Commands/MakeModule.php.html

Lines changed: 127 additions & 126 deletions
Large diffs are not rendered by default.

tests/codeCoverage/Commands/dashboard.html

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ <h3>Insufficient Coverage</h3>
5959
</tr>
6060
</thead>
6161
<tbody>
62-
<tr><td><a href="InitiateDatabaseTable.php.html#9">InitiateDatabaseTable</a></td><td class="text-right">80%</td></tr>
62+
<tr><td><a href="MakeModule.php.html#8">MakeModule</a></td><td class="text-right">7%</td></tr>
63+
<tr><td><a href="InitiateDatabaseTable.php.html#9">InitiateDatabaseTable</a></td><td class="text-right">20%</td></tr>
6364

6465
</tbody>
6566
</table>
@@ -76,7 +77,8 @@ <h3>Project Risks</h3>
7677
</tr>
7778
</thead>
7879
<tbody>
79-
<tr><td><a href="InitiateDatabaseTable.php.html#9">InitiateDatabaseTable</a></td><td class="text-right">4</td></tr>
80+
<tr><td><a href="MakeModule.php.html#8">MakeModule</a></td><td class="text-right">58</td></tr>
81+
<tr><td><a href="InitiateDatabaseTable.php.html#9">InitiateDatabaseTable</a></td><td class="text-right">12</td></tr>
8082

8183
</tbody>
8284
</table>
@@ -114,7 +116,11 @@ <h3>Insufficient Coverage</h3>
114116
</tr>
115117
</thead>
116118
<tbody>
117-
<tr><td><a href="InitiateDatabaseTable.php.html#28"><abbr title="InitiateDatabaseTable::handle">handle</abbr></a></td><td class="text-right">75%</td></tr>
119+
<tr><td><a href="MakeModule.php.html#83"><abbr title="MakeModule::anonymous function">anonymous function</abbr></a></td><td class="text-right">0%</td></tr>
120+
<tr><td><a href="MakeModule.php.html#80"><abbr title="MakeModule::copyStub">copyStub</abbr></a></td><td class="text-right">0%</td></tr>
121+
<tr><td><a href="MakeModule.php.html#73"><abbr title="MakeModule::makeDirectory">makeDirectory</abbr></a></td><td class="text-right">0%</td></tr>
122+
<tr><td><a href="MakeModule.php.html#38"><abbr title="MakeModule::handle">handle</abbr></a></td><td class="text-right">0%</td></tr>
123+
<tr><td><a href="InitiateDatabaseTable.php.html#28"><abbr title="InitiateDatabaseTable::handle">handle</abbr></a></td><td class="text-right">0%</td></tr>
118124

119125
</tbody>
120126
</table>
@@ -131,7 +137,10 @@ <h3>Project Risks</h3>
131137
</tr>
132138
</thead>
133139
<tbody>
134-
<tr><td><a href="InitiateDatabaseTable.php.html#28"><abbr title="InitiateDatabaseTable::handle">handle</abbr></a></td><td class="text-right">3</td></tr>
140+
<tr><td><a href="InitiateDatabaseTable.php.html#28"><abbr title="InitiateDatabaseTable::handle">handle</abbr></a></td><td class="text-right">12</td></tr>
141+
<tr><td><a href="MakeModule.php.html#80"><abbr title="MakeModule::copyStub">copyStub</abbr></a></td><td class="text-right">6</td></tr>
142+
<tr><td><a href="MakeModule.php.html#38"><abbr title="MakeModule::handle">handle</abbr></a></td><td class="text-right">6</td></tr>
143+
<tr><td><a href="MakeModule.php.html#73"><abbr title="MakeModule::makeDirectory">makeDirectory</abbr></a></td><td class="text-right">6</td></tr>
135144

136145
</tbody>
137146
</table>
@@ -141,7 +150,7 @@ <h3>Project Risks</h3>
141150
<footer>
142151
<hr/>
143152
<p>
144-
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 13:16:39 UTC 2017.</small>
153+
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 13:21:23 UTC 2017.</small>
145154
</p>
146155
</footer>
147156
</div>
@@ -162,7 +171,7 @@ <h3>Project Risks</h3>
162171
.yAxis.tickFormat(d3.format('d'));
163172

164173
d3.select('#classCoverageDistribution svg')
165-
.datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,0,1,1,0], "Class Coverage"))
174+
.datum(getCoverageDistributionData([0,1,0,1,0,0,0,0,0,0,0,0], "Class Coverage"))
166175
.transition().duration(500).call(chart);
167176

168177
nv.utils.windowResize(chart.update);
@@ -180,7 +189,7 @@ <h3>Project Risks</h3>
180189
.yAxis.tickFormat(d3.format('d'));
181190

182191
d3.select('#methodCoverageDistribution svg')
183-
.datum(getCoverageDistributionData([0,0,0,0,0,0,0,0,1,0,0,6], "Method Coverage"))
192+
.datum(getCoverageDistributionData([5,0,0,0,0,0,0,0,0,0,0,2], "Method Coverage"))
184193
.transition().duration(500).call(chart);
185194

186195
nv.utils.windowResize(chart.update);
@@ -230,7 +239,7 @@ <h3>Project Risks</h3>
230239
chart.yAxis.axisLabel('Cyclomatic Complexity');
231240

232241
d3.select('#classComplexity svg')
233-
.datum(getComplexityData([[80,4,"<a href=\"InitiateDatabaseTable.php.html#9\">InitiateDatabaseTable<\/a>"],[94.594594594595,8,"<a href=\"MakeModule.php.html#8\">MakeModule<\/a>"]], 'Class Complexity'))
242+
.datum(getComplexityData([[20,4,"<a href=\"InitiateDatabaseTable.php.html#9\">InitiateDatabaseTable<\/a>"],[7.8947368421053,8,"<a href=\"MakeModule.php.html#8\">MakeModule<\/a>"]], 'Class Complexity'))
234243
.transition()
235244
.duration(500)
236245
.call(chart);
@@ -254,7 +263,7 @@ <h3>Project Risks</h3>
254263
chart.yAxis.axisLabel('Method Complexity');
255264

256265
d3.select('#methodComplexity svg')
257-
.datum(getComplexityData([[100,1,"<a href=\"InitiateDatabaseTable.php.html#18\">InitiateDatabaseTable::__construct<\/a>"],[75,3,"<a href=\"InitiateDatabaseTable.php.html#28\">InitiateDatabaseTable::handle<\/a>"],[100,1,"<a href=\"MakeModule.php.html#27\">MakeModule::__construct<\/a>"],[100,2,"<a href=\"MakeModule.php.html#38\">MakeModule::handle<\/a>"],[100,2,"<a href=\"MakeModule.php.html#72\">MakeModule::makeDirectory<\/a>"],[100,2,"<a href=\"MakeModule.php.html#79\">MakeModule::copyStub<\/a>"],[100,1,"<a href=\"MakeModule.php.html#82\">MakeModule::anonymous function<\/a>"]], 'Method Complexity'))
266+
.datum(getComplexityData([[100,1,"<a href=\"InitiateDatabaseTable.php.html#18\">InitiateDatabaseTable::__construct<\/a>"],[0,3,"<a href=\"InitiateDatabaseTable.php.html#28\">InitiateDatabaseTable::handle<\/a>"],[100,1,"<a href=\"MakeModule.php.html#27\">MakeModule::__construct<\/a>"],[0,2,"<a href=\"MakeModule.php.html#38\">MakeModule::handle<\/a>"],[0,2,"<a href=\"MakeModule.php.html#73\">MakeModule::makeDirectory<\/a>"],[0,2,"<a href=\"MakeModule.php.html#80\">MakeModule::copyStub<\/a>"],[0,1,"<a href=\"MakeModule.php.html#83\">MakeModule::anonymous function<\/a>"]], 'Method Complexity'))
258267
.transition()
259268
.duration(500)
260269
.call(chart);

tests/codeCoverage/Commands/index.html

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,23 @@
4242
</thead>
4343
<tbody>
4444
<tr>
45-
<td class="success">Total</td>
46-
<td class="success big"> <div class="progress">
47-
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="91.49" aria-valuemin="0" aria-valuemax="100" style="width: 91.49%">
48-
<span class="sr-only">91.49% covered (success)</span>
45+
<td class="danger">Total</td>
46+
<td class="danger big"> <div class="progress">
47+
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="10.42" aria-valuemin="0" aria-valuemax="100" style="width: 10.42%">
48+
<span class="sr-only">10.42% covered (danger)</span>
4949
</div>
5050
</div>
5151
</td>
52-
<td class="success small"><div align="right">91.49%</div></td>
53-
<td class="success small"><div align="right">43&nbsp;/&nbsp;47</div></td>
54-
<td class="warning big"> <div class="progress">
55-
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="85.71" aria-valuemin="0" aria-valuemax="100" style="width: 85.71%">
56-
<span class="sr-only">85.71% covered (warning)</span>
52+
<td class="danger small"><div align="right">10.42%</div></td>
53+
<td class="danger small"><div align="right">5&nbsp;/&nbsp;48</div></td>
54+
<td class="danger big"> <div class="progress">
55+
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="28.57" aria-valuemin="0" aria-valuemax="100" style="width: 28.57%">
56+
<span class="sr-only">28.57% covered (danger)</span>
5757
</div>
5858
</div>
5959
</td>
60-
<td class="warning small"><div align="right">85.71%</div></td>
61-
<td class="warning small"><div align="right">6&nbsp;/&nbsp;7</div></td>
60+
<td class="danger small"><div align="right">28.57%</div></td>
61+
<td class="danger small"><div align="right">2&nbsp;/&nbsp;7</div></td>
6262
<td class="danger big"> <div class="progress">
6363
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="0.00" aria-valuemin="0" aria-valuemax="100" style="width: 0.00%">
6464
<span class="sr-only">0.00% covered (danger)</span>
@@ -70,15 +70,15 @@
7070
</tr>
7171

7272
<tr>
73-
<td class="warning"><span class="glyphicon glyphicon-file"></span> <a href="InitiateDatabaseTable.php.html">InitiateDatabaseTable.php</a></td>
74-
<td class="warning big"> <div class="progress">
75-
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="80.00" aria-valuemin="0" aria-valuemax="100" style="width: 80.00%">
76-
<span class="sr-only">80.00% covered (warning)</span>
73+
<td class="danger"><span class="glyphicon glyphicon-file"></span> <a href="InitiateDatabaseTable.php.html">InitiateDatabaseTable.php</a></td>
74+
<td class="danger big"> <div class="progress">
75+
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="20.00" aria-valuemin="0" aria-valuemax="100" style="width: 20.00%">
76+
<span class="sr-only">20.00% covered (danger)</span>
7777
</div>
7878
</div>
7979
</td>
80-
<td class="warning small"><div align="right">80.00%</div></td>
81-
<td class="warning small"><div align="right">8&nbsp;/&nbsp;10</div></td>
80+
<td class="danger small"><div align="right">20.00%</div></td>
81+
<td class="danger small"><div align="right">2&nbsp;/&nbsp;10</div></td>
8282
<td class="danger big"> <div class="progress">
8383
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="50.00" aria-valuemin="0" aria-valuemax="100" style="width: 50.00%">
8484
<span class="sr-only">50.00% covered (danger)</span>
@@ -98,23 +98,23 @@
9898
</tr>
9999

100100
<tr>
101-
<td class="success"><span class="glyphicon glyphicon-file"></span> <a href="MakeModule.php.html">MakeModule.php</a></td>
102-
<td class="success big"> <div class="progress">
103-
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="94.59" aria-valuemin="0" aria-valuemax="100" style="width: 94.59%">
104-
<span class="sr-only">94.59% covered (success)</span>
101+
<td class="danger"><span class="glyphicon glyphicon-file"></span> <a href="MakeModule.php.html">MakeModule.php</a></td>
102+
<td class="danger big"> <div class="progress">
103+
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="7.89" aria-valuemin="0" aria-valuemax="100" style="width: 7.89%">
104+
<span class="sr-only">7.89% covered (danger)</span>
105105
</div>
106106
</div>
107107
</td>
108-
<td class="success small"><div align="right">94.59%</div></td>
109-
<td class="success small"><div align="right">35&nbsp;/&nbsp;37</div></td>
110-
<td class="success big"> <div class="progress">
111-
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="100.00" aria-valuemin="0" aria-valuemax="100" style="width: 100.00%">
112-
<span class="sr-only">100.00% covered (success)</span>
108+
<td class="danger small"><div align="right">7.89%</div></td>
109+
<td class="danger small"><div align="right">3&nbsp;/&nbsp;38</div></td>
110+
<td class="danger big"> <div class="progress">
111+
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="20.00" aria-valuemin="0" aria-valuemax="100" style="width: 20.00%">
112+
<span class="sr-only">20.00% covered (danger)</span>
113113
</div>
114114
</div>
115115
</td>
116-
<td class="success small"><div align="right">100.00%</div></td>
117-
<td class="success small"><div align="right">5&nbsp;/&nbsp;5</div></td>
116+
<td class="danger small"><div align="right">20.00%</div></td>
117+
<td class="danger small"><div align="right">1&nbsp;/&nbsp;5</div></td>
118118
<td class="danger big"> <div class="progress">
119119
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="0.00" aria-valuemin="0" aria-valuemax="100" style="width: 0.00%">
120120
<span class="sr-only">0.00% covered (danger)</span>
@@ -137,7 +137,7 @@ <h4>Legend</h4>
137137
<span class="success"><strong>High</strong>: 90% to 100%</span>
138138
</p>
139139
<p>
140-
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 13:16:39 UTC 2017.</small>
140+
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage 4.0.7</a> using <a href="https://secure.php.net/" target="_top">PHP 5.6.29</a> with <a href="https://xdebug.org/">Xdebug 2.2.5</a> and <a href="https://phpunit.de/">PHPUnit 5.7.16</a> at Sat Apr 1 13:21:23 UTC 2017.</small>
141141
</p>
142142
</footer>
143143
</div>

0 commit comments

Comments
 (0)