Skip to content

Commit

Permalink
Merge pull request #25 from ARCANESOFT/develop
Browse files Browse the repository at this point in the history
Updating the package for Laravel 5.5
  • Loading branch information
arcanedev-maroc authored Sep 2, 2017
2 parents f5820eb + 86074f2 commit 9539c96
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 34 deletions.
16 changes: 8 additions & 8 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/_docs export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/phpunit.xml export-ignore
/_docs export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ language: php
sudo: false

php:
- 5.6
- 7.0
- 7.1
- nightly
Expand All @@ -13,7 +12,7 @@ matrix:
- php: nightly

env:
- TESTBENCH_VERSION=3.4.*
- TESTBENCH_VERSION=3.5.*

before_script:
- travis_retry composer self-update
Expand All @@ -25,5 +24,5 @@ script:
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ] && [ "$TRAVIS_PHP_VERSION" != "7.1" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ] && [ "$TRAVIS_PHP_VERSION" != "7.1" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
19 changes: 7 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"type": "library",
"license": "MIT",
"require": {
"php": ">=5.6.4",
"php": ">=7.0",
"arcanedev/gravatar": "~2.0",
"arcanedev/laravel-auth": "~3.0",
"arcanedev/laravel-impersonator": "^1.1",
"arcanesoft/core": "~2.4"
"arcanedev/laravel-auth": "~4.0",
"arcanedev/laravel-impersonator": "~1.1",
"arcanesoft/core": "~2.6"
},
"require-dev": {
"phpunit/phpcov": "~3.0",
"phpunit/phpunit": "~5.0",
"phpunit/phpcov": "~4.0",
"phpunit/phpunit": "~6.0",
"laravel/socialite": "~3.0"
},
"autoload": {
Expand All @@ -38,11 +38,6 @@
}
},
"scripts": {
"testbench": "composer require --dev \"orchestra/testbench=~3.4.0\""
},
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
}
"testbench": "composer require --dev \"orchestra/testbench=~3.5.0\""
}
}
3 changes: 3 additions & 0 deletions phpunit.xml → phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@
<log type="coverage-text" target="build/logs/coverage.txt"/>
<log type="coverage-html" target="build/logs/coverage" charset="UTF-8" yui="true" highlight="true"/>
</logging>
<php>
<env name="DB_CONNECTION" value="testing"/>
</php>
</phpunit>
11 changes: 7 additions & 4 deletions tests/Console/PublishCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@
*/
class PublishCommandTest extends TestCase
{
/* ------------------------------------------------------------------------------------------------
| Test Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Tests
| -----------------------------------------------------------------
*/

/** @test */
public function it_can_publish()
{
$this->artisan('auth:publish');
$this->assertSame(0, $this->artisan('auth:publish'));

// TODO: Adding more assertions ??
}
}
15 changes: 14 additions & 1 deletion tests/Console/SetupCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,22 @@
*/
class SetupCommandTest extends TestCase
{
/* -----------------------------------------------------------------
| Tests
| -----------------------------------------------------------------
*/

/** @test */
public function it_can_setup()
{
// $this->artisan('auth:setup');
$this->artisan('migrate', ['--database' => 'testing']);
$this->artisan('auth:install');

$this->assertDatabaseHas('auth_users', [
'username' => 'admin',
'first_name' => 'Super',
'last_name' => 'ADMIN',
'email' => '[email protected]',
]);
}
}
16 changes: 11 additions & 5 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
*/
abstract class TestCase extends BaseTestCase
{
/* ------------------------------------------------------------------------------------------------
| Package Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Get package providers.
*
Expand Down Expand Up @@ -45,10 +46,15 @@ protected function getPackageAliases($app)
/**
* Define environment setup.
*
* @param \Illuminate\Foundation\Application $app
* @param \Illuminate\Foundation\Application $app
*/
protected function getEnvironmentSetUp($app)
{
//
$app['config']->set('database.default', 'testing');
$app['config']->set('database.connections.testing', [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
]);
}
}

0 comments on commit 9539c96

Please sign in to comment.