Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
language: php

php:
- 7.1
- 7.2
- 7.3
- 7.4

before_script:
- curl -s http://getcomposer.org/installer | php
Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
],
"license": "MIT",
"require": {
"php" : ">=7.1.3",
"illuminate/support": "5.8.*",
"illuminate/session": "5.8.*"
"illuminate/support": "5.8.*|^6.0|^7.0",
"illuminate/session": "5.8.*|^6.0|^7.0"
},
"require-dev": {
"mockery/mockery": "~0.9",
"phpunit/phpunit": "~5.7"
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^8.0"
},
"autoload": {
"psr-0": {
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Package Test Suite">
Expand Down
8 changes: 7 additions & 1 deletion src/Krucas/Notification/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ public function __construct($items = [])
*/
public function add($item)
{
$this->queue->insert($item, is_null($item->getPosition()) ? null : -$item->getPosition());
if (is_array($item)) {
$position = $item['position'];
} else {
$position = $item->getPosition();
}

$this->queue->insert($item, is_null($position) ? null : -$position);

$this->copyQueue(clone $this->queue);

Expand Down
4 changes: 2 additions & 2 deletions tests/CollectionTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;

class CollectionTest extends PHPUnit_Framework_TestCase
class CollectionTest extends TestCase
{
public function testCollectionConstructor()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/MessageTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;

class MessageTest extends PHPUnit_Framework_TestCase
class MessageTest extends TestCase
{
public function testMessageConstructor()
{
Expand Down
10 changes: 5 additions & 5 deletions tests/Middleware/NotificationMiddlewareTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;

class NotificationMiddlewareTest extends PHPUnit_Framework_TestCase
class NotificationMiddlewareTest extends TestCase
{
public function tearDown()
{
m::close();
}
use MockeryPHPUnitIntegration;


public function testOnBoot()
{
Expand Down
10 changes: 5 additions & 5 deletions tests/NotificationBagTest.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;

require_once 'Mocks/NotificationsBagMock.php';

class NotificationBagTest extends PHPUnit_Framework_TestCase
class NotificationBagTest extends TestCase
{
public function tearDown()
{
m::close();
}
use MockeryPHPUnitIntegration;


public function testIsConstructed()
{
Expand Down
10 changes: 5 additions & 5 deletions tests/NotificationTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;

class NotificationTest extends PHPUnit_Framework_TestCase
class NotificationTest extends TestCase
{
public function tearDown()
{
m::close();
}
use MockeryPHPUnitIntegration;


public function testIsConstructed()
{
Expand Down
10 changes: 5 additions & 5 deletions tests/SubscriberTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

use Mockery as m;
use PHPUnit\Framework\TestCase;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;

class SubscriberTest extends PHPUnit_Framework_TestCase
class SubscriberTest extends TestCase
{
public function tearDown()
{
m::close();
}
use MockeryPHPUnitIntegration;


public function testIsConstructed()
{
Expand Down