File tree 5 files changed +41
-12
lines changed
5 files changed +41
-12
lines changed Original file line number Diff line number Diff line change 20
20
" database"
21
21
],
22
22
"psr-4" : {
23
- "App\\ " : " app/"
23
+ "App\\ " : " app/" ,
24
+ "Tests\\ " : " tests/"
24
25
}
25
26
},
26
- "autoload-dev" : {
27
- "classmap" : [
28
- " tests/TestCase.php"
29
- ]
30
- },
31
27
"scripts" : {
32
28
"post-root-package-install" : [
33
29
" php -r \" file_exists('.env') || copy('.env.example', '.env');\" "
Original file line number Diff line number Diff line change 9
9
processIsolation =" false"
10
10
stopOnFailure =" false" >
11
11
<testsuites >
12
- <testsuite name =" Application Test Suite" >
13
- <directory suffix =" Test.php" >./tests</directory >
12
+ <testsuite name =" Feature Tests" >
13
+ <directory suffix =" Test.php" >./tests/Feature</directory >
14
+ </testsuite >
15
+
16
+ <testsuite name =" Unit Tests" >
17
+ <directory suffix =" Test.php" >./tests/Unit</directory >
14
18
</testsuite >
15
19
</testsuites >
16
20
<filter >
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ namespace Tests \Feature ;
4
+
5
+ use Tests \TestCase ;
3
6
use Illuminate \Foundation \Testing \WithoutMiddleware ;
4
7
use Illuminate \Foundation \Testing \DatabaseMigrations ;
5
8
use Illuminate \Foundation \Testing \DatabaseTransactions ;
6
9
7
10
class ExampleTest extends TestCase
8
11
{
9
12
/**
10
- * A basic functional test example.
13
+ * A basic test example.
11
14
*
12
15
* @return void
13
16
*/
14
- public function testBasicExample ()
17
+ public function testBasicTest ()
15
18
{
16
19
$ this ->visit ('/ ' )
17
20
->see ('Laravel ' );
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- abstract class TestCase extends Illuminate \Foundation \Testing \TestCase
3
+ namespace Tests ;
4
+
5
+ use Illuminate \Contracts \Console \Kernel ;
6
+ use Illuminate \Foundation \Testing \TestCase as BaseTestCase ;
7
+
8
+ abstract class TestCase extends BaseTestCase
4
9
{
5
10
/**
6
11
* The base URL to use while testing the application.
@@ -18,7 +23,7 @@ public function createApplication()
18
23
{
19
24
$ app = require __DIR__ .'/../bootstrap/app.php ' ;
20
25
21
- $ app ->make (Illuminate \ Contracts \ Console \ Kernel::class)->bootstrap ();
26
+ $ app ->make (Kernel::class)->bootstrap ();
22
27
23
28
return $ app ;
24
29
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Tests \Unit ;
4
+
5
+ use Tests \TestCase ;
6
+ use Illuminate \Foundation \Testing \WithoutMiddleware ;
7
+ use Illuminate \Foundation \Testing \DatabaseMigrations ;
8
+ use Illuminate \Foundation \Testing \DatabaseTransactions ;
9
+
10
+ class ExampleTest extends TestCase
11
+ {
12
+ /**
13
+ * A basic test example.
14
+ *
15
+ * @return void
16
+ */
17
+ public function testBasicTest ()
18
+ {
19
+ $ this ->assertTrue (true );
20
+ }
21
+ }
You can’t perform that action at this time.
0 commit comments