Skip to content

Commit

Permalink
Merge b7bafec into b8c8ef0
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI authored Jan 5, 2020
2 parents b8c8ef0 + b7bafec commit 1782fba
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_extends: dev-kit
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ branches:
language: php

php:
- '7.1'
- '7.2'
- '7.3'
- '7.4snapshot'
- '7.4'
- nightly

services:
Expand Down Expand Up @@ -46,7 +45,7 @@ matrix:
env: TARGET=docs
- php: '7.3'
env: TARGET=lint
- php: '7.1'
- php: '7.2'
env: COMPOSER_FLAGS="--prefer-lowest"
- php: '7.3'
env: SYMFONY=3.4.*
Expand Down
5 changes: 2 additions & 3 deletions .travis/before_install_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ composer require "alcaeus/mongo-php-adapter"

sed --in-place "s/\"dev-master\":/\"dev-${TRAVIS_COMMIT}\":/" composer.json

if [ "$SYMFONY" != "" ]; then composer require "symfony/symfony:$SYMFONY" --no-update; fi;
if [ "$SONATA_ADMIN" != "" ]; then composer require "sonata-project/admin-bundle:$SONATA_ADMIN" --no-update; fi;

if [ "$SYMFONY" != "" ]; then composer require "symfony/symfony:$SYMFONY" --no-update; fi;
if [ "$SONATA_ADMIN" != "" ]; then composer require "sonata-project/admin-bundle:$SONATA_ADMIN" --no-update; fi;
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"sonata-project/admin-bundle": "^3.31",
"sonata-project/core-bundle": "^3.14",
"sonata-project/datagrid-bundle": "^2.3",
"sonata-project/doctrine-extensions": "^1.1.3",
"sonata-project/doctrine-extensions": "^1.5.1",
"sonata-project/doctrine-orm-admin-bundle": "^3.4",
"sonata-project/easy-extends-bundle": "^2.5",
"symfony/config": "^3.4 || ^4.2",
Expand Down
6 changes: 4 additions & 2 deletions tests/Entity/CategoryManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
use Sonata\ClassificationBundle\Entity\BaseCategory;
use Sonata\ClassificationBundle\Entity\CategoryManager;
use Sonata\ClassificationBundle\Model\ContextManagerInterface;
use Sonata\Doctrine\Test\EntityManagerMockFactory;
use Sonata\Doctrine\Test\EntityManagerMockFactoryTrait;

class CategoryManagerTest extends TestCase
{
use EntityManagerMockFactoryTrait;

public function testGetPager()
{
$self = $this;
Expand Down Expand Up @@ -273,7 +275,7 @@ public function testGetRootCategoriesSplitByContexts()

protected function getCategoryManager($qbCallback, $createQueryResult = null)
{
$em = EntityManagerMockFactory::create($this, $qbCallback, []);
$em = $this->createEntityManagerMock($qbCallback, []);

if (null !== $createQueryResult) {
$query = $this->createMock(AbstractQuery::class);
Expand Down
6 changes: 4 additions & 2 deletions tests/Entity/CollectionManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
use PHPUnit\Framework\TestCase;
use Sonata\ClassificationBundle\Entity\BaseCollection;
use Sonata\ClassificationBundle\Entity\CollectionManager;
use Sonata\Doctrine\Test\EntityManagerMockFactory;
use Sonata\Doctrine\Test\EntityManagerMockFactoryTrait;

class CollectionManagerTest extends TestCase
{
use EntityManagerMockFactoryTrait;

public function testGetPager()
{
$self = $this;
Expand Down Expand Up @@ -63,7 +65,7 @@ public function testGetPagerWithDisabledCollections()

protected function getCollectionManager($qbCallback)
{
$em = EntityManagerMockFactory::create($this, $qbCallback, []);
$em = $this->createEntityManagerMock($qbCallback, []);

$registry = $this->getMockForAbstractClass(ManagerRegistry::class);
$registry->expects($this->any())->method('getManagerForClass')->willReturn($em);
Expand Down
6 changes: 4 additions & 2 deletions tests/Entity/ContextManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
use PHPUnit\Framework\TestCase;
use Sonata\ClassificationBundle\Entity\BaseContext;
use Sonata\ClassificationBundle\Entity\ContextManager;
use Sonata\Doctrine\Test\EntityManagerMockFactory;
use Sonata\Doctrine\Test\EntityManagerMockFactoryTrait;

class ContextManagerTest extends TestCase
{
use EntityManagerMockFactoryTrait;

public function testGetPager()
{
$self = $this;
Expand Down Expand Up @@ -63,7 +65,7 @@ public function testGetPagerWithDisabledContexts()

protected function getContextManager($qbCallback)
{
$em = EntityManagerMockFactory::create($this, $qbCallback, []);
$em = $this->createEntityManagerMock($qbCallback, []);

$registry = $this->getMockForAbstractClass(ManagerRegistry::class);
$registry->expects($this->any())->method('getManagerForClass')->willReturn($em);
Expand Down
6 changes: 4 additions & 2 deletions tests/Entity/TagManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
use PHPUnit\Framework\TestCase;
use Sonata\ClassificationBundle\Entity\BaseTag;
use Sonata\ClassificationBundle\Entity\TagManager;
use Sonata\Doctrine\Test\EntityManagerMockFactory;
use Sonata\Doctrine\Test\EntityManagerMockFactoryTrait;

class TagManagerTest extends TestCase
{
use EntityManagerMockFactoryTrait;

public function testGetPager()
{
$self = $this;
Expand Down Expand Up @@ -63,7 +65,7 @@ public function testGetPagerWithDisabledTags()

protected function getTagManager($qbCallback)
{
$em = EntityManagerMockFactory::create($this, $qbCallback, []);
$em = $this->createEntityManagerMock($qbCallback, []);

$registry = $this->getMockForAbstractClass(ManagerRegistry::class);
$registry->expects($this->any())->method('getManagerForClass')->willReturn($em);
Expand Down

0 comments on commit 1782fba

Please sign in to comment.