Skip to content

Commit

Permalink
Merge branch '2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
kmadejski committed Sep 12, 2018
2 parents 02416ff + 1284272 commit 1a746c7
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 12 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Expand Up @@ -9,11 +9,10 @@ cache:
matrix:
fast_finish: true
include:
- php: 7.2
- php: 7.1
- php: 7.0
- php: 5.6
- php: 5.5
- php: 5.4
env: SYMFONY_VERSION="~2.7.0"

# test only master (+ Pull requests)
branches:
Expand Down
2 changes: 1 addition & 1 deletion Tests/eZ/Publish/Slot/AbstractPersistenceAwareBaseTest.php
Expand Up @@ -12,7 +12,7 @@ abstract class AbstractPersistenceAwareBaseTest extends AbstractSlotTest

public function setUp()
{
$this->persistenceHandler = $this->getMock('\eZ\Publish\SPI\Persistence\Handler');
$this->persistenceHandler = $this->getMockBuilder('\eZ\Publish\SPI\Persistence\Handler')->getMock();

parent::setUp();
}
Expand Down
5 changes: 4 additions & 1 deletion Tests/eZ/Publish/Slot/AbstractSlotTest.php
Expand Up @@ -6,9 +6,12 @@
namespace EzSystems\RecommendationBundle\Tests\eZ\Publish\Slot;

use PHPUnit\Framework\TestCase;
use eZ\Publish\Core\Base\Tests\PHPUnit5CompatTrait;

abstract class AbstractSlotTest extends TestCase
{
use PHPUnit5CompatTrait;

/** @var \EzSystems\RecommendationBundle\Client\RecommendationClient|\PHPUnit_Framework_MockObject_MockObject */
protected $client;

Expand All @@ -17,7 +20,7 @@ abstract class AbstractSlotTest extends TestCase

public function setUp()
{
$this->client = $this->getMock('\EzSystems\RecommendationBundle\Client\RecommendationClient');
$this->client = $this->getMockBuilder('\EzSystems\RecommendationBundle\Client\RecommendationClient')->getMock();
$this->slot = $this->createSlot();
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/eZ/Publish/Slot/CopySubtreeTest.php
Expand Up @@ -14,7 +14,7 @@ public function testReceiveSignal()
{
$signal = $this->createSignal();

$locationHandler = $this->getMock('\eZ\Publish\SPI\Persistence\Content\Location\Handler');
$locationHandler = $this->getMockBuilder('\eZ\Publish\SPI\Persistence\Content\Location\Handler')->getMock();
$locationHandler
->expects($this->once())
->method('loadSubtreeIds')
Expand Down
2 changes: 1 addition & 1 deletion Tests/eZ/Publish/Slot/MoveSubtreeTest.php
Expand Up @@ -16,7 +16,7 @@ public function testReceiveSignal()
{
$signal = $this->createSignal();

$locationHandler = $this->getMock('\eZ\Publish\SPI\Persistence\Content\Location\Handler');
$locationHandler = $this->getMockBuilder('\eZ\Publish\SPI\Persistence\Content\Location\Handler')->getMock();
$locationHandler
->expects($this->once())
->method('loadSubtreeIds')
Expand Down
2 changes: 1 addition & 1 deletion Tests/eZ/Publish/Slot/PublishVersionTest.php
Expand Up @@ -14,7 +14,7 @@ class PublishVersionTest extends AbstractPersistenceAwareBaseTest

public function testReceiveSignal()
{
$contentHandler = $this->getMock('\eZ\Publish\SPI\Persistence\Content\Handler');
$contentHandler = $this->getMockBuilder('\eZ\Publish\SPI\Persistence\Content\Handler')->getMock();
$contentHandler
->expects($this->once())
->method('loadReverseRelations')
Expand Down
4 changes: 2 additions & 2 deletions Tests/eZ/Publish/Slot/RecoverTest.php
Expand Up @@ -18,14 +18,14 @@ public function testReceiveSignal()
{
$signal = $this->createSignal();

$locationHandler = $this->getMock('\eZ\Publish\SPI\Persistence\Content\Location\Handler');
$locationHandler = $this->getMockBuilder('\eZ\Publish\SPI\Persistence\Content\Location\Handler')->getMock();
$locationHandler
->expects($this->once())
->method('loadSubtreeIds')
->with($signal->newLocationId)
->willReturn($this->getSubtreeIds());

$contentHandler = $this->getMock('\eZ\Publish\SPI\Persistence\Content\Handler');
$contentHandler = $this->getMockBuilder('\eZ\Publish\SPI\Persistence\Content\Handler')->getMock();
$contentHandler
->expects($this->once())
->method('loadReverseRelations')
Expand Down
2 changes: 1 addition & 1 deletion Tests/eZ/Publish/Slot/TrashTest.php
Expand Up @@ -15,7 +15,7 @@ class TrashTest extends AbstractPersistenceAwareBaseTest

public function testReceiveSignal()
{
$contentHandler = $this->getMock('\eZ\Publish\SPI\Persistence\Content\Handler');
$contentHandler = $this->getMockBuilder('\eZ\Publish\SPI\Persistence\Content\Handler')->getMock();
$contentHandler
->expects($this->once())
->method('loadReverseRelations')
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -16,7 +16,7 @@
"symfony/symfony": "^2.7.7 || ^3.3"
},
"require-dev": {
"phpunit/phpunit": "~4.7",
"phpunit/phpunit": "~4.7 || ^5.7",
"friendsofphp/php-cs-fixer": "~2.7.1"
},
"autoload": {
Expand Down

0 comments on commit 1a746c7

Please sign in to comment.