Skip to content

Commit

Permalink
Merge pull request #32 from hmazter/laravel-60
Browse files Browse the repository at this point in the history
Support Laravel 6.0
  • Loading branch information
hmazter authored Sep 8, 2019
2 parents 7b60b7c + 00cef51 commit 28f14ec
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 27 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
language: php

php:
- 7.1
- 7.2
- 7.3

env:
- ILLUMINATE_VERSION=5.6.* PHPUNIT_VERSION=7.* ORCHESTRA_TESTBENCH_VERSION=3.6
- ILLUMINATE_VERSION=5.7.* PHPUNIT_VERSION=7.* ORCHESTRA_TESTBENCH_VERSION=3.7
- ILLUMINATE_VERSION=5.8.* PHPUNIT_VERSION=7.* ORCHESTRA_TESTBENCH_VERSION=3.8
- ILLUMINATE_VERSION=5.8.* PHPUNIT_VERSION=8.* ORCHESTRA_TESTBENCH_VERSION=3.8
- ILLUMINATE_VERSION=6.0.* PHPUNIT_VERSION=8.* ORCHESTRA_TESTBENCH_VERSION=4.0

cache:
directories:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [] - Unreleased
### Breaking
- Drop support for PHP 7.1 (It is EOL)
### Other
- Support Laravel 6.0

## [1.2.1] - 2019-02-27
### Other
- Support Laravel 5.8
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
}
],
"require": {
"php": "^7.1.3",
"illuminate/support": "5.6.*|5.7.*|5.8.*",
"illuminate/console": "5.6.*|5.7.*|5.8.*",
"php": "^7.2",
"illuminate/support": "5.6.*|5.7.*|5.8.*|6.0.*",
"illuminate/console": "5.6.*|5.7.*|5.8.*|6.0.*",
"dragonmantank/cron-expression": "^2.0"
},
"require-dev": {
"phpunit/phpunit": "^7.0",
"phpunit/phpunit": "^8.3",
"orchestra/testbench": "~3.6"
},
"autoload": {
Expand Down
42 changes: 21 additions & 21 deletions tests/Integration/ListSchedulerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,42 @@ public function testListSchedulerCommand_withTasksAndTableStyle()
$consoleOutput = explode("\n", trim(\Illuminate\Support\Facades\Artisan::output()));
$cron = \Cron\CronExpression::factory('0 10 * * *');

self::assertContains('test:command:name', $consoleOutput[3]);
self::assertContains('Description of event', $consoleOutput[3]);
self::assertContains('0 10 * * *', $consoleOutput[3]);
self::assertContains($cron->getNextRunDate()->format('Y-m-d H:i:s'), $consoleOutput[3]);
self::assertStringContainsString('test:command:name', $consoleOutput[3]);
self::assertStringContainsString('Description of event', $consoleOutput[3]);
self::assertStringContainsString('0 10 * * *', $consoleOutput[3]);
self::assertStringContainsString($cron->getNextRunDate()->format('Y-m-d H:i:s'), $consoleOutput[3]);

// get description from the command class
self::assertContains('test:command:two', $consoleOutput[4]);
self::assertContains('Description of test command', $consoleOutput[4]);
self::assertStringContainsString('test:command:two', $consoleOutput[4]);
self::assertStringContainsString('Description of test command', $consoleOutput[4]);

self::assertContains('ls -lah', $consoleOutput[5]);
self::assertStringContainsString('ls -lah', $consoleOutput[5]);

self::assertContains('0 13 * * *', $consoleOutput[6]);
self::assertContains('Closure', $consoleOutput[6]);
self::assertContains('A description for a scheduled callback', $consoleOutput[6]);
self::assertStringContainsString('0 13 * * *', $consoleOutput[6]);
self::assertStringContainsString('Closure', $consoleOutput[6]);
self::assertStringContainsString('A description for a scheduled callback', $consoleOutput[6]);

self::assertContains('0 14 * * *', $consoleOutput[7]);
self::assertContains('Closure', $consoleOutput[7]);
self::assertContains('TestJob', $consoleOutput[7]);
self::assertStringContainsString('0 14 * * *', $consoleOutput[7]);
self::assertStringContainsString('Closure', $consoleOutput[7]);
self::assertStringContainsString('TestJob', $consoleOutput[7]);
}

public function testListSchedulerCommand_withTasksAndCronStyle()
{
\Illuminate\Support\Facades\Artisan::call('schedule:list', ['--cron' => true]);
$consoleOutput = explode("\n", trim(\Illuminate\Support\Facades\Artisan::output()));

self::assertContains('test:command:name', $consoleOutput[0]);
self::assertContains('artisan', $consoleOutput[0]);
self::assertContains('0 10 * * *', $consoleOutput[0]);
self::assertContains((DIRECTORY_SEPARATOR === '\\') ? 'NUL' : '/dev/null', $consoleOutput[0]);
self::assertStringContainsString('test:command:name', $consoleOutput[0]);
self::assertStringContainsString('artisan', $consoleOutput[0]);
self::assertStringContainsString('0 10 * * *', $consoleOutput[0]);
self::assertStringContainsString((DIRECTORY_SEPARATOR === '\\') ? 'NUL' : '/dev/null', $consoleOutput[0]);

self::assertContains('test:command:two', $consoleOutput[1]);
self::assertStringContainsString('test:command:two', $consoleOutput[1]);

self::assertContains('ls -lah', $consoleOutput[2]);
self::assertStringContainsString('ls -lah', $consoleOutput[2]);

self::assertContains('Closure', $consoleOutput[3]);
self::assertStringContainsString('Closure', $consoleOutput[3]);

self::assertContains('Closure', $consoleOutput[4]);
self::assertStringContainsString('Closure', $consoleOutput[4]);
}
}

0 comments on commit 28f14ec

Please sign in to comment.