Skip to content

Commit

Permalink
Merge branch '6.13' into 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Jul 16, 2018
2 parents a3d65bf + 6c34c58 commit b0c9201
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -62,6 +62,9 @@ branches:
before_script:
# Disable memory_limit for composer
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
# Install igbinary & lzf PHP extensions if necessary
- if [ "$ENABLE_IGBINARY" = true ] ; then pecl install igbinary ; fi
- if [ "$ENABLE_LZF" = true ] ; then printf "no\n" | pecl install lzf ; fi
# Prepare system
- if [ "$TEST_CONFIG" != "" ] ; then ./bin/.travis/prepare_unittest.sh ; fi
- if [ "$BEHAT_OPTS" != "" ] || [ "$REST_TEST_CONFIG" != "" ] ; then ./bin/.travis/prepare_behat.sh ; fi
Expand Down
Expand Up @@ -473,8 +473,8 @@ private function handleSiteAccessesRelation(ContainerBuilder $container)

/**
* @param array $config
* @param ContainerBuilder $container
* @param FileLoader $loader
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
* @param \Symfony\Component\DependencyInjection\Loader\FileLoader $loader
*/
private function handleImage(array $config, ContainerBuilder $container, FileLoader $loader)
{
Expand Down
Expand Up @@ -22,17 +22,30 @@ protected function setUp()
parent::setUp();
}

/**
* Tests that invalid path string provided for subtree criterion result in exception.
*
* @dataProvider searchContentQueryWithInvalidDataProvider
* @expectedException \InvalidArgumentException
*/
public function testSearchContentSubtreeShouldThrowException($pathString)
{
$query = new Query(
array(
'filter' => new Criterion\Subtree($pathString),
)
);

$result = $this->getRepository()->getSearchService()->findContent($query);
}

/**
* Tests that path string provided for subtree criterion is valid.
*
* @dataProvider searchContentQueryProvider
*/
public function testSearchContentSubtree($pathString, $expectedException = null)
public function testSearchContentSubtree($pathString)
{
if ($expectedException) {
$this->expectException($expectedException);
}

$query = new Query(
array(
'filter' => new Criterion\Subtree($pathString),
Expand All @@ -47,27 +60,27 @@ public function searchContentQueryProvider()
return array(
array(
'/1/2/',
null,
),
array(
array('/1/2/', '/1/2/4/'),
null,
),
array(
'/1/2',
'InvalidArgumentException',
'/1/id0/',
),
);
}

public function searchContentQueryWithInvalidDataProvider()
{
return array(
array(
array('/1/2/', '/1/2/4'),
'InvalidArgumentException',
'/1/2',
),
array(
'/1/id0/',
null,
array('/1/2/', '/1/2/4'),
),
array(
'/1/id0',
'InvalidArgumentException',
),
);
}
Expand Down
Expand Up @@ -31,6 +31,8 @@ class ObjectStateLimitationTest extends BaseLimitationTest
* @see eZ\Publish\API\Repository\Values\User\Limitation\ObjectStateLimitation
*
* @throws \ErrorException
*
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
*/
public function testObjectStateLimitationAllow()
{
Expand Down Expand Up @@ -84,7 +86,6 @@ public function testObjectStateLimitationAllow()
$contentService->deleteContent($draft->contentInfo);
/* END: Use Case */

$this->expectException('\\eZ\\Publish\\API\\Repository\\Exceptions\\NotFoundException');
$contentService->loadContent($draft->id);
}

Expand Down
Expand Up @@ -27,6 +27,8 @@ class OwnerLimitationTest extends BaseLimitationTest
* @see \eZ\Publish\API\Repository\Values\User\Limitation\OwnerLimitation
*
* @throws \ErrorException
*
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException
*/
public function testOwnerLimitationAllow()
{
Expand Down Expand Up @@ -82,9 +84,6 @@ public function testOwnerLimitationAllow()
);
/* END: Use Case */

$this->expectException(
'\\eZ\\Publish\\API\\Repository\\Exceptions\\NotFoundException'
);
$contentService->loadContent($content->id);
}

Expand Down
2 changes: 0 additions & 2 deletions eZ/Publish/Core/settings/tests/integration_legacy_core.yml
Expand Up @@ -3,8 +3,6 @@ parameters:
-
var/ezdemo_site/storage/images/design/plain-site/172-2-eng-US/eZ-Publish-Demo-Design-without-demo-content1.png

ezpublish.signalslot.signal_dispatcher.factory.class: eZ\Publish\Core\Base\Container\ApiLoader\SignalSlot\SignalDispatcherFactory

services:
ezpublish.signalslot.signal_dispatcher.factory:
class: "%ezpublish.signalslot.signal_dispatcher.factory.class%"
Expand Down

0 comments on commit b0c9201

Please sign in to comment.