Skip to content

Commit a4cffc9

Browse files
committed
Squashed commit of the following:
commit 887ab31 Author: Socheat <[email protected]> Date: Thu Apr 18 23:01:41 2019 +0700 Update required php version to 7.2 commit 3814134 Author: Socheat <[email protected]> Date: Thu Apr 18 23:00:56 2019 +0700 composer.json, split autoload for test to autoload-dev commit 8446f7d Author: Socheat <[email protected]> Date: Thu Apr 18 22:55:54 2019 +0700 Remove getPackageAliases from TestCase commit f580f60 Author: Socheat <[email protected]> Date: Thu Apr 18 22:45:12 2019 +0700 Update Test User model and Repository Test commit 5cb22f9 Author: Socheat <[email protected]> Date: Thu Apr 18 22:38:27 2019 +0700 Remove PHP 7.1 from .travis.yml commit 16e0d78 Author: Socheat <[email protected]> Date: Thu Apr 18 22:36:18 2019 +0700 Update .travis.yml, add .vscode/settings.json commit 5800ac8 Author: Socheat <[email protected]> Date: Thu Apr 18 22:35:55 2019 +0700 Remove unuse Class from PPSpaces\Tests\App\User model
1 parent 2352971 commit a4cffc9

File tree

6 files changed

+14
-27
lines changed

6 files changed

+14
-27
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: php
22

33
php:
4-
- 7.1
54
- 7.2
65
- 7.3
76

@@ -10,6 +9,7 @@ dist: trusty
109
install:
1110
- composer self-update
1211
- composer install
12+
- composer dump-autoload
1313

1414
script:
1515
- "./vendor/bin/phpunit --testdox --coverage-text"

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"travis.username": "pp-spaces",
3+
"travis.repository": "laravel-repository"
4+
}

composer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"repository-pattern"
2121
],
2222
"require": {
23-
"php": ">=7.0",
23+
"php": ">=7.2",
2424
"illuminate/console": "~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0",
2525
"illuminate/contracts": "~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0",
2626
"illuminate/support": "~5.3.0|~5.4.0|~5.5.0|~5.6.0|~5.7.0|~5.8.0"
@@ -33,7 +33,11 @@
3333
},
3434
"autoload": {
3535
"psr-4": {
36-
"PPSpaces\\": "src/",
36+
"PPSpaces\\": "src/"
37+
}
38+
},
39+
"autoload-dev": {
40+
"psr-4": {
3741
"PPSpaces\\Tests\\": "tests/"
3842
}
3943
},

tests/Feature/App/RepositoryTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
use PPSpaces\Tests\App\User;
66
use PPSpaces\Tests\TestCase;
77
use PPSpaces\Tests\App\Http\Repositories\UserRepository;
8-
use Illuminate\Container\Container as App;
98

109
/**
1110
* Class DatabaseTest
1211
*/
1312
class RepositoryTest extends TestCase
1413
{
15-
public function test_it_get_datas_from_repository()
14+
public function test_it_get_all_data_from_repository()
1615
{
1716
// When we have 50 users
1817
$users = factory(User::class, 50)->create();

tests/TestCase.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,4 @@ protected function getPackageProviders($app)
2222
{
2323
return ['PPSpaces\RepositoryServiceProvider'];
2424
}
25-
26-
/**
27-
* Get package aliases. In a normal app environment these would be added to
28-
* the 'aliases' array in the config/app.php file. If your package exposes an
29-
* aliased facade, you should add the alias here, along with aliases for
30-
* facades upon which your package depends, e.g. Cartalyst/Sentry.
31-
*
32-
* @param \Illuminate\Foundation\Application $app
33-
*
34-
* @return array
35-
*/
36-
protected function getPackageAliases($app)
37-
{
38-
return [
39-
'PPSpaces' => 'PPSpaces\Facade'
40-
];
41-
}
4225
}

tests/app/User.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22

33
namespace PPSpaces\Tests\App;
44

5-
use Illuminate\Notifications\Notifiable;
6-
use Illuminate\Contracts\Auth\MustVerifyEmail;
7-
use Illuminate\Foundation\Auth\User as Authenticatable;
5+
use Illuminate\Database\Eloquent\Model;
86

9-
class User extends Authenticatable
7+
class User extends Model
108
{
11-
use Notifiable;
129

1310
/**
1411
* The attributes that are mass assignable.

0 commit comments

Comments
 (0)