aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilly Micieli <micieli@laposte.net>2019-08-18 12:48:30 +0200
committerWilly Micieli <micieli@laposte.net>2019-08-18 12:48:30 +0200
commit2c4b6e1d6e499b8488400b886588c3b138388530 (patch)
tree1f9da529cd8801c1bedec9a98569841f540820d1
parentdfaaaa34badb12a5c5feaa2640e85bf3cb5f487a (diff)
downloadshaolin-2c4b6e1d6e499b8488400b886588c3b138388530.zip
shaolin-2c4b6e1d6e499b8488400b886588c3b138388530.tar.gz
clean repo
-rw-r--r--.gitignore2
-rw-r--r--.phpunit.result.cache1
-rw-r--r--Design/js/app.js3
-rw-r--r--Design/sass/app.scss3
-rw-r--r--app/Console/Sample.php2
-rw-r--r--app/Controllers/WelcomeController.php2
-rw-r--r--app/Routes/routes.sqlite3bin20480 -> 20480 bytes
-rw-r--r--composer.json6
-rw-r--r--config.rb26
-rw-r--r--phinx.php2
-rw-r--r--phpunit.xml27
-rw-r--r--tests/Feature/ExampleFeatureTest.php26
-rw-r--r--tests/Unit/ExampleUnitTest.php17
-rw-r--r--web/css/app.css1
14 files changed, 101 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index eae70c5..aceb347 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,5 @@
tmp
cache
.idea
+.phpunit.result.cache
+.sass-cache \ No newline at end of file
diff --git a/.phpunit.result.cache b/.phpunit.result.cache
new file mode 100644
index 0000000..6957a26
--- /dev/null
+++ b/.phpunit.result.cache
@@ -0,0 +1 @@
+C:37:"PHPUnit\Runner\DefaultTestResultCache":215:{a:2:{s:7:"defects";a:1:{s:45:"Testing\Feature\ExampleFeatureTest::test_root";i:4;}s:5:"times";a:2:{s:41:"Tests\Unit\ExampleUnitTest::testBasicTest";d:0;s:45:"Testing\Feature\ExampleFeatureTest::test_root";d:0.053;}}} \ No newline at end of file
diff --git a/Design/js/app.js b/Design/js/app.js
new file mode 100644
index 0000000..8e224cc
--- /dev/null
+++ b/Design/js/app.js
@@ -0,0 +1,3 @@
+$(function () {
+
+}); \ No newline at end of file
diff --git a/Design/sass/app.scss b/Design/sass/app.scss
new file mode 100644
index 0000000..c2a635b
--- /dev/null
+++ b/Design/sass/app.scss
@@ -0,0 +1,3 @@
+body{
+ background-color: #fff;
+} \ No newline at end of file
diff --git a/app/Console/Sample.php b/app/Console/Sample.php
index c81a449..69901be 100644
--- a/app/Console/Sample.php
+++ b/app/Console/Sample.php
@@ -22,7 +22,7 @@
}
public function execute(InputInterface $input, OutputInterface $output)
{
- $output->writeln('<info>Welcome at Shaolin ! </info>');
+ $output->writeln('<info>Welcome at Shaolin !</info>');
return 0;
}
diff --git a/app/Controllers/WelcomeController.php b/app/Controllers/WelcomeController.php
index 3f33c8d..e5f5b1a 100644
--- a/app/Controllers/WelcomeController.php
+++ b/app/Controllers/WelcomeController.php
@@ -48,7 +48,7 @@ namespace App\Controllers {
*/
public function welcome(): Response
{
-
+
return $this->view('@welcome/welcome');
}
diff --git a/app/Routes/routes.sqlite3 b/app/Routes/routes.sqlite3
index d3e8715..bc09076 100644
--- a/app/Routes/routes.sqlite3
+++ b/app/Routes/routes.sqlite3
Binary files differ
diff --git a/composer.json b/composer.json
index 3a2c731..8330dfd 100644
--- a/composer.json
+++ b/composer.json
@@ -28,5 +28,11 @@
"@php shaolin route:generate",
"@php shaolin hello"
]
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^8.3",
+ "codedungeon/phpunit-result-printer": "^0.26.2",
+ "filp/whoops": "^2.5",
+ "symfony/var-dumper": "^4.3"
}
}
diff --git a/config.rb b/config.rb
new file mode 100644
index 0000000..8ce4db3
--- /dev/null
+++ b/config.rb
@@ -0,0 +1,26 @@
+require 'compass/import-once/activate'
+# Require any additional compass plugins here.
+
+# Set this to the root of your project when deployed:
+http_path = "/"
+css_dir = "web/css"
+sass_dir = "Design/sass"
+images_dir = "web/img"
+javascripts_dir = "web/js"
+
+# You can select your preferred output style here (can be overridden via the command line):
+# output_style = :expanded or :nested or :compact or :compressed
+output_style = :compressed
+
+# To enable relative paths to assets via compass helper functions. Uncomment:
+# relative_assets = true
+
+# To disable debugging comments that display the original location of your selectors. Uncomment:
+line_comments = false
+
+
+# If you prefer the indented syntax, you might want to regenerate this
+# project again passing --syntax sass, or you can uncomment this:
+# preferred_syntax = :sass
+# and then run:
+# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
diff --git a/phinx.php b/phinx.php
index 60682ce..6affcf7 100644
--- a/phinx.php
+++ b/phinx.php
@@ -22,7 +22,7 @@ return
"name" => $x->base(),
"user" => $x->user(),
"pass" => $x->password(),
- "port" => db('port'),
+ "port" => db('port'),
]
]
];
diff --git a/phpunit.xml b/phpunit.xml
index 7ba92c2..6d04d9b 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -9,19 +9,18 @@
processIsolation="false"
stopOnFailure="true"
printerClass="Codedungeon\PHPUnitPrettyResultPrinter\Printer">
+ <testsuites>
+ <testsuite name="Unit">
+ <directory suffix="Test.php">./tests/Unit</directory>
+ </testsuite>
- <testsuites>
- <testsuite name="Unit">
- <directory suffix="Test.php">./tests/Unit</directory>
- </testsuite>
-
- <testsuite name="Feature">
- <directory suffix="Test.php">./tests/Feature</directory>
- </testsuite>
- </testsuites>
- <filter>
- <whitelist processUncoveredFilesFromWhitelist="true">
- <directory suffix=".php">./app</directory>
- </whitelist>
- </filter>
+ <testsuite name="Feature">
+ <directory suffix="Test.php">./tests/Feature</directory>
+ </testsuite>
+ </testsuites>
+ <filter>
+ <whitelist processUncoveredFilesFromWhitelist="true">
+ <directory suffix=".php">app/</directory>
+ </whitelist>
+ </filter>
</phpunit>
diff --git a/tests/Feature/ExampleFeatureTest.php b/tests/Feature/ExampleFeatureTest.php
new file mode 100644
index 0000000..b6a1153
--- /dev/null
+++ b/tests/Feature/ExampleFeatureTest.php
@@ -0,0 +1,26 @@
+<?php
+
+ namespace Testing\Feature;
+
+ use DI\DependencyException;
+ use DI\NotFoundException;
+ use Imperium\Exception\Kedavra;
+ use Imperium\Testing\Unit;
+
+ class ExampleFeatureTest extends Unit
+ {
+
+ /**
+ * A basic test example.
+ *
+ * @throws DependencyException
+ * @throws NotFoundException
+ * @throws Kedavra
+ * @return void
+ */
+ public function test_root()
+ {
+ $response = $this->visit('/');
+ $this->assertEquals(200,$response->call()->getStatusCode());
+ }
+ } \ No newline at end of file
diff --git a/tests/Unit/ExampleUnitTest.php b/tests/Unit/ExampleUnitTest.php
new file mode 100644
index 0000000..6fd335b
--- /dev/null
+++ b/tests/Unit/ExampleUnitTest.php
@@ -0,0 +1,17 @@
+<?php
+
+ namespace Tests\Unit;
+ use Imperium\Testing\Unit;
+
+ class ExampleUnitTest extends Unit
+ {
+ /**
+ * A basic test example.
+ *
+ * @return void
+ */
+ public function testBasicTest()
+ {
+ $this->assertTrue(true);
+ }
+ } \ No newline at end of file
diff --git a/web/css/app.css b/web/css/app.css
index e69de29..653ef80 100644
--- a/web/css/app.css
+++ b/web/css/app.css
@@ -0,0 +1 @@
+body{background-color:#fff}