Skip to content

Commit d147c57

Browse files
committed
Fix tests
1 parent 4fe3c91 commit d147c57

25 files changed

+34
-30
lines changed

tests/Cases/GenericTest.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ public function testInvalidHandlerSet() {
7373
}
7474

7575
public function testDeletedModuleFiles() {
76-
$this->artisan('make:module', ["id" => "Test2", "name" => "Test Module"]);
7776

7877
//Deleted
78+
$this->artisan('make:module', ["id" => "Test2", "name" => "Test Module"]);
7979
$this->rm(rtrim(Modules::modulesDirectory(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . "Test2" . DIRECTORY_SEPARATOR . "Module.php");
8080
$this->loadModuleFiles("Test2");
8181
$this->refreshApplication();
@@ -87,19 +87,23 @@ public function testDeletedModuleFiles() {
8787
}
8888

8989
//No class defined
90-
file_put_contents(rtrim(Modules::modulesDirectory(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . "Test2" . DIRECTORY_SEPARATOR . "Module.php", "<?php ");
90+
$this->artisan('make:module', ["id" => "Test3", "name" => "Test Module"]);
91+
file_put_contents(rtrim(Modules::modulesDirectory(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . "Test3" . DIRECTORY_SEPARATOR . "Module.php", "<?php ");
92+
$this->loadModuleFiles('Test3');
9193
Modules::refreshModules();
9294
try {
93-
Modules::get('Test2');
95+
Modules::get('Test3');
9496
} catch (Exception $e) {
95-
$this->assertEquals("Module not found: Test2", $e->getMessage());
97+
$this->assertEquals("Module not found: Test3", $e->getMessage());
9698
}
9799

98100
//incorrect module class inheritence
99101
$this->expectException(Exception::class);
100-
file_put_contents(rtrim(Modules::modulesDirectory(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . "Test2" . DIRECTORY_SEPARATOR . "Module.php", "<?php namespace App\\Modules\\Test2; class Module { }");
102+
$this->artisan('make:module', ["id" => "Test4", "name" => "Test Module"]);
103+
file_put_contents(rtrim(Modules::modulesDirectory(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . "Test4" . DIRECTORY_SEPARATOR . "Module.php", "<?php namespace App\\Modules\\Test4; class Module { }");
104+
$this->loadModuleFiles('Test4');
101105
Modules::refreshModules();
102-
Modules::get('Test2');
106+
Modules::get('Test4');
103107
}
104108

105109
}

tests/codeCoverage/Commands/InitiateDatabaseTable.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ <h4>Legend</h4>
199199
<span class="warning"><strong>Dead Code</strong></span>
200200
</p>
201201
<p>
202-
<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 Sun Apr 2 11:13:33 UTC 2017.</small>
202+
<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 Sun Apr 2 11:20:54 UTC 2017.</small>
203203
</p>
204204
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
205205
</footer>

tests/codeCoverage/Commands/MakeModule.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ <h4>Legend</h4>
306306
<span class="warning"><strong>Dead Code</strong></span>
307307
</p>
308308
<p>
309-
<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 Sun Apr 2 11:13:33 UTC 2017.</small>
309+
<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 Sun Apr 2 11:20:54 UTC 2017.</small>
310310
</p>
311311
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
312312
</footer>

tests/codeCoverage/Commands/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ <h3>Project Risks</h3>
141141
<footer>
142142
<hr/>
143143
<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 Sun Apr 2 11:13:33 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 Sun Apr 2 11:20:54 UTC 2017.</small>
145145
</p>
146146
</footer>
147147
</div>

tests/codeCoverage/Commands/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 Sun Apr 2 11:13:33 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 Sun Apr 2 11:20:54 UTC 2017.</small>
141141
</p>
142142
</footer>
143143
</div>

tests/codeCoverage/Controller.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ <h4>Legend</h4>
210210
<span class="warning"><strong>Dead Code</strong></span>
211211
</p>
212212
<p>
213-
<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 Sun Apr 2 11:13:33 UTC 2017.</small>
213+
<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 Sun Apr 2 11:20:54 UTC 2017.</small>
214214
</p>
215215
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
216216
</footer>

tests/codeCoverage/Interfaces/KeyValueStoreInterface.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ <h4>Legend</h4>
9090
<span class="warning"><strong>Dead Code</strong></span>
9191
</p>
9292
<p>
93-
<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 Sun Apr 2 11:13:33 UTC 2017.</small>
93+
<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 Sun Apr 2 11:20:54 UTC 2017.</small>
9494
</p>
9595
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
9696
</footer>

tests/codeCoverage/Interfaces/StaticAndInstanceAccessInterface.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ <h4>Legend</h4>
9393
<span class="warning"><strong>Dead Code</strong></span>
9494
</p>
9595
<p>
96-
<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 Sun Apr 2 11:13:33 UTC 2017.</small>
96+
<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 Sun Apr 2 11:20:54 UTC 2017.</small>
9797
</p>
9898
<a title="Back to the top" id="toplink" href="#"><span class="glyphicon glyphicon-arrow-up"></span></a>
9999
</footer>

tests/codeCoverage/Interfaces/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ <h3>Project Risks</h3>
137137
<footer>
138138
<hr/>
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 Sun Apr 2 11:13:33 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 Sun Apr 2 11:20:54 UTC 2017.</small>
141141
</p>
142142
</footer>
143143
</div>

tests/codeCoverage/Interfaces/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ <h4>Legend</h4>
9292
<span class="success"><strong>High</strong>: 90% to 100%</span>
9393
</p>
9494
<p>
95-
<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 Sun Apr 2 11:13:33 UTC 2017.</small>
95+
<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 Sun Apr 2 11:20:54 UTC 2017.</small>
9696
</p>
9797
</footer>
9898
</div>

0 commit comments

Comments
 (0)