Skip to content

Commit de92e6e

Browse files
committed
Fix bug in service provider
1 parent bbd52af commit de92e6e

25 files changed

+1353
-1447
lines changed

src/ServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function boot() {
6868
}
6969
}
7070

71-
protected function thisLoadMigrationsFrom($path) {
71+
protected function thisLoadMigrationsFrom($paths) {
7272
if (method_exists($this, 'loadMigrationsFrom')) {
7373
$this->loadMigrationsFrom($path);
7474
} else {

tests/Cases/MakeModuleTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class MakeModuleTest extends LaravelModulesTestCase
99

1010
public function testSimpleCommand()
1111
{
12-
$this->artisan('modules:make', ["id" => "Test", "name" => "Test Module"]);
12+
$this->artisan('make:module', ["id" => "Test", "name" => "Test Module"]);
1313
$this->loadModuleFiles("Test");
1414
$this->assertDirectoryExists($this->modulesPath());
1515
$this->assertDirectoryExists($this->modulesPath('Test/'));
@@ -28,7 +28,7 @@ public function testSimpleCommand()
2828

2929
public function testCompoundName()
3030
{
31-
$this->artisan('modules:make', ["id" => "TestModule", "name" => "Test Module"]);
31+
$this->artisan('make:module', ["id" => "TestModule", "name" => "Test Module"]);
3232
$this->loadModuleFiles("TestModule");
3333
$this->assertDirectoryExists($this->modulesPath('TestModule/'));
3434
$this->assertFileExists($this->modulesPath('TestModule/' . config('modules.class_name') . '.php'));
@@ -40,7 +40,7 @@ public function testCompoundName()
4040

4141
public function testCustomUrl()
4242
{
43-
$this->artisan('modules:make', ["id" => "TestModuleWithUrl", "name" => "Test Module", "--url" => "test-module"]);
43+
$this->artisan('make:module', ["id" => "TestModuleWithUrl", "name" => "Test Module", "--url" => "test-module"]);
4444
$this->loadModuleFiles("TestModuleWithUrl");
4545
$this->assertDirectoryExists($this->modulesPath('TestModuleWithUrl/'));
4646
$this->assertFileExists($this->modulesPath('TestModuleWithUrl/' . config('modules.class_name') . '.php'));

tests/Cases/ModulePropertiesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ModulePropertiesTest extends LaravelModulesTestCase
1515

1616
public function testModuleProperties()
1717
{
18-
$this->artisan('modules:make', ["id" => "Test", "name" => "Test Module"]);
18+
$this->artisan('make:module', ["id" => "Test", "name" => "Test Module"]);
1919
$this->loadModuleFiles("Test");
2020
$module = \App\Modules\Test\Module::make();
2121
$this->assertEquals('Test', $module->id());

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: 113 additions & 113 deletions
Large diffs are not rendered by default.

tests/codeCoverage/Commands/dashboard.html

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

6564
</tbody>
6665
</table>
@@ -77,8 +76,7 @@ <h3>Project Risks</h3>
7776
</tr>
7877
</thead>
7978
<tbody>
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>
79+
<tr><td><a href="InitiateDatabaseTable.php.html#9">InitiateDatabaseTable</a></td><td class="text-right">4</td></tr>
8280

8381
</tbody>
8482
</table>
@@ -116,11 +114,7 @@ <h3>Insufficient Coverage</h3>
116114
</tr>
117115
</thead>
118116
<tbody>
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>
117+
<tr><td><a href="InitiateDatabaseTable.php.html#28"><abbr title="InitiateDatabaseTable::handle">handle</abbr></a></td><td class="text-right">75%</td></tr>
124118

125119
</tbody>
126120
</table>
@@ -137,10 +131,7 @@ <h3>Project Risks</h3>
137131
</tr>
138132
</thead>
139133
<tbody>
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>
134+
<tr><td><a href="InitiateDatabaseTable.php.html#28"><abbr title="InitiateDatabaseTable::handle">handle</abbr></a></td><td class="text-right">3</td></tr>
144135

145136
</tbody>
146137
</table>
@@ -150,7 +141,7 @@ <h3>Project Risks</h3>
150141
<footer>
151142
<hr/>
152143
<p>
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>
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:23:59 UTC 2017.</small>
154145
</p>
155146
</footer>
156147
</div>
@@ -171,7 +162,7 @@ <h3>Project Risks</h3>
171162
.yAxis.tickFormat(d3.format('d'));
172163

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

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

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

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

241232
d3.select('#classComplexity svg')
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'))
233+
.datum(getComplexityData([[80,4,"<a href=\"InitiateDatabaseTable.php.html#9\">InitiateDatabaseTable<\/a>"],[94.736842105263,8,"<a href=\"MakeModule.php.html#8\">MakeModule<\/a>"]], 'Class Complexity'))
243234
.transition()
244235
.duration(500)
245236
.call(chart);
@@ -263,7 +254,7 @@ <h3>Project Risks</h3>
263254
chart.yAxis.axisLabel('Method Complexity');
264255

265256
d3.select('#methodComplexity svg')
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'))
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#73\">MakeModule::makeDirectory<\/a>"],[100,2,"<a href=\"MakeModule.php.html#80\">MakeModule::copyStub<\/a>"],[100,1,"<a href=\"MakeModule.php.html#83\">MakeModule::anonymous function<\/a>"]], 'Method Complexity'))
267258
.transition()
268259
.duration(500)
269260
.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="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>
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.67" aria-valuemin="0" aria-valuemax="100" style="width: 91.67%">
48+
<span class="sr-only">91.67% covered (success)</span>
4949
</div>
5050
</div>
5151
</td>
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>
52+
<td class="success small"><div align="right">91.67%</div></td>
53+
<td class="success small"><div align="right">44&nbsp;/&nbsp;48</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>
5757
</div>
5858
</div>
5959
</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>
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>
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="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>
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>
7777
</div>
7878
</div>
7979
</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>
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>
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="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>
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.74" aria-valuemin="0" aria-valuemax="100" style="width: 94.74%">
104+
<span class="sr-only">94.74% covered (success)</span>
105105
</div>
106106
</div>
107107
</td>
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>
108+
<td class="success small"><div align="right">94.74%</div></td>
109+
<td class="success small"><div align="right">36&nbsp;/&nbsp;38</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>
113113
</div>
114114
</div>
115115
</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>
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>
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:21:23 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:23:59 UTC 2017.</small>
141141
</p>
142142
</footer>
143143
</div>

0 commit comments

Comments
 (0)