Skip to content

Commit 2609531

Browse files
committed
Modify tests
1 parent a6162aa commit 2609531

26 files changed

+277
-309
lines changed

composer.json

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
{
2-
"name": "itvisionsy/laravel-modules",
3-
"description": "Laravel 5.1 library to allow modules structure. Each module can have its routes, controllers, views, config, ...",
4-
"type": "library",
5-
"keywords": [
6-
"modules",
7-
"laravel"
8-
],
9-
"require": {
10-
"php": ">=5.5.9",
11-
"laravel/framework": "5.1.*",
12-
"nette/reflection": "^2.4"
13-
},
14-
"license": "MIT",
15-
"authors": [
16-
{
17-
"name": "Muhannad Shelleh",
18-
"email": "muhannad.shelleh@gmail.com"
19-
}
20-
],
21-
"autoload": {
22-
"psr-4": {
23-
"ItvisionSy\\Laravel\\Modules\\": "src"
24-
}
25-
},
26-
"autoload-dev": {
27-
"classmap": [
28-
"tests/LaravelModulesTestCase.php"
2+
"name": "itvisionsy/laravel-modules",
3+
"description": "Laravel 5.1 library to allow modules structure. Each module can have its routes, controllers, views, config, ...",
4+
"type": "library",
5+
"keywords": [
6+
"modules",
7+
"laravel"
8+
],
9+
"require": {
10+
"php": ">=5.5.9",
11+
"laravel/framework": "5.1.*",
12+
"nette/reflection": "^2.4"
13+
},
14+
"license": "MIT",
15+
"authors": [
16+
{
17+
"name": "Muhannad Shelleh",
18+
"email": "muhannad.shelleh@gmail.com"
19+
}
2920
],
30-
"psr-4": {
31-
"ItvisionSy\\Laravel\\Modules\\Tests\\": "tests/",
32-
"App\\": "app/"
21+
"autoload": {
22+
"psr-4": {
23+
"ItvisionSy\\Laravel\\Modules\\": "src"
24+
}
25+
},
26+
"autoload-dev": {
27+
"classmap": [
28+
"tests/LaravelModulesTestCase.php"
29+
],
30+
"psr-4": {
31+
"ItvisionSy\\Laravel\\Modules\\Tests\\": "tests/",
32+
"App\\": "app/"
33+
}
34+
},
35+
"require-dev": {
36+
"laravel/laravel": "^5.1",
37+
"phpunit/phpunit": "^5.7"
3338
}
34-
},
35-
"require-dev": {
36-
"laravel/laravel": "^5.1",
37-
"phpunit/phpunit": "^5.7"
38-
}
3939
}

tests/Cases/StoreHandlersTest.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -70,40 +70,6 @@ public function testSimpleDbStoreHandler() {
7070
$this->assertEquals(0, count(Modules::enabled()));
7171
$this->assertEquals(1, count(Modules::disabled()));
7272

73-
//test module store
74-
$this->artisan('make:module', ["id" => "Test3", "name" => "Test3 Module", "--url" => "test"]);
75-
file_put_contents(rtrim(Modules::modulesDirectory(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . "Test3" . DIRECTORY_SEPARATOR . "Module.php", <<<'PHP'
76-
<?php
77-
78-
namespace App\Modules\Test3;
79-
80-
use ItvisionSy\Laravel\Modules\Module as BaseModule;
81-
82-
class Module extends BaseModule
83-
{
84-
85-
static protected $moduleId='Test3';
86-
static protected $moduleName='Test3 Module';
87-
static protected $moduleRouteNamePrefix='test';
88-
static protected $moduleUrlPrefix='test';
89-
90-
public static function valueSet($value){
91-
static::setStoreValue('testing',$value);
92-
}
93-
94-
public static function valueGet(){
95-
return static::getStoreValue('testing');
96-
}
97-
98-
}
99-
PHP
100-
);
101-
$this->loadModuleFiles("Test3");
102-
Modules::enableModule(new \App\Modules\Test3\Module());
103-
Modules::refreshModules();
104-
\App\Modules\Test3\Module::valueSet(123);
105-
$this->assertEquals(123, \App\Modules\Test3\Module::valueGet());
106-
10773
//clean up
10874
static::rm($this->appPath('/database.sqlite'));
10975
}

tests/codeCoverage/Commands/InitiateDatabaseTable.php.html

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

tests/codeCoverage/Commands/MakeModule.php.html

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

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 7:07:20 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 9:03:25 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 7:07:20 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 9:03:25 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 7:07:20 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 9:03:25 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 7:07:20 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 9:03:25 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 7:07:20 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 9:03:25 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 7:07:20 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 9:03:25 UTC 2017.</small>
141141
</p>
142142
</footer>
143143
</div>

0 commit comments

Comments
 (0)