Skip to content

Commit f8cdd22

Browse files
authored
Merge pull request #8 from mhh1422/master
tests modified
2 parents e596e76 + de92e6e commit f8cdd22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+7317
-128
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ bootstrap/cache/
1616
# Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer
1717
.rocketeer/
1818
.idea/
19+
nbproject/

phpunit.xml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="tests/bootstrap.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false">
2+
<phpunit
3+
backupGlobals="false"
4+
backupStaticAttributes="false"
5+
cacheTokens="false"
6+
bootstrap="tests/bootstrap.php"
7+
colors="true"
8+
convertErrorsToExceptions="true"
9+
convertNoticesToExceptions="true"
10+
convertWarningsToExceptions="true"
11+
forceCoversAnnotation="false"
12+
processIsolation="false"
13+
stopOnError="false"
14+
stopOnFailure="false"
15+
stopOnIncomplete="false"
16+
stopOnSkipped="false"
17+
strict="false"
18+
verbose="false"
19+
>
1120
<testsuites>
1221
<testsuite name="Application Test Suite">
1322
<directory suffix="Test.php">./tests/Cases</directory>
1423
</testsuite>
1524
</testsuites>
25+
<logging>
26+
<log type="coverage-html" target="./tests/codeCoverage" charset="UTF-8"/>
27+
</logging>
1628
<filter>
17-
<whitelist processUncoveredFilesFromWhitelist="true">
29+
<whitelist>
1830
<directory suffix=".php">./src</directory>
1931
</whitelist>
20-
<blacklist>
21-
<directory>./vendor</directory>
22-
<directory>./config</directory>
23-
<directory>./tests</directory>
24-
</blacklist>
2532
</filter>
2633
<php>
2734
<env name="APP_ENV" value="testing"/>

src/Commands/MakeModule.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
class MakeModule extends \Illuminate\Console\Command implements SelfHandling
99
{
1010

11-
protected $signature = 'modules:make
12-
{id : the ID of the module. Should be unique across modules}
11+
protected $signature = 'make:module
12+
{id : the ID of the module. Should be unique across modules}
1313
{name : the display name of the module}
1414
{--url= : the URL/route-names part for the module}
1515
';
@@ -58,6 +58,7 @@ public function handle()
5858

5959
$this->makeDirectory($path);
6060
$this->makeDirectory("{$path}Views");
61+
$this->makeDirectory("{$path}Migrations");
6162
$this->makeDirectory("{$path}Models");
6263
$this->makeDirectory("{$path}Http{$ds}Controllers");
6364
$this->copyStub("Module.php.stub", "{$path}{$className}.php", $stubData + []);

src/Commands/stubs/MakeModule/Module.php.stub

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ use ItvisionSy\Laravel\Modules\Module as BaseModule;
77
class {{class}} extends BaseModule
88
{
99

10-
protected $moduleId='{{id}}';
11-
protected $moduleName='{{name}}';
12-
protected $moduleRouteNamePrefix='{{url_name}}';
13-
protected $moduleUrlPrefix='{{url_name}}';
10+
static protected $moduleId='{{id}}';
11+
static protected $moduleName='{{name}}';
12+
static protected $moduleRouteNamePrefix='{{url_name}}';
13+
static protected $moduleUrlPrefix='{{url_name}}';
1414

1515
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<?php /** @var {{namespace}}\{{id}}\{{class}} $this_module */ ?>
1+
<?php /* @var $this_module {{namespace}}\{{id}}\{{class}} */ ?>
22
Module {{$this_module->name()}}

0 commit comments

Comments
 (0)