Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit bd21c38

Browse files
committed
Do not run functional tests on HHVM
1 parent 156e77b commit bd21c38

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ before_script:
4141

4242
script:
4343
- phpunit --coverage-text
44-
- ./vendor/symfony-cmf/testing/bin/server &
45-
- ./vendor/bin/behat
44+
- ./Tests/Resources/bin/runtests.sh
4645

4746
notifications:
4847
irc: "irc.freenode.org#symfony-cmf"

Resources/config/enhancer.sonata_admin.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,3 @@
1818

1919
</services>
2020
</container>
21-
22-

Serializer/Jms/Handler/ResourceHandler.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ private function doSerializeResource(Resource $resource, $depth = 0)
7979
$data['repository_alias'] = $repositoryAlias;
8080
$data['repository_type'] = $this->registry->getRepositoryType($resource->getRepository());
8181
$data['payload_alias'] = $this->payloadAliasRegistry->getPayloadAlias($resource);
82+
$data['payload_type'] = null;
8283

8384
if ($resource instanceof CmfResource) {
8485
$data['payload_type'] = $resource->getPayloadType();

Tests/Resources/bin/runtests.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
echo "<?php exit(defined('HHVM_VERSION') ? 1 : 0);" > /tmp/ishhvm.php
4+
5+
php /tmp/ishhvm.php
6+
7+
if [[ $? == 1 ]]; then
8+
echo "HHVM detected - skipping tests that require the built-in webserver"
9+
else
10+
echo "PHP detected"
11+
./vendor/symfony-cmf/testing/bin/server &
12+
./vendor/bin/behat
13+
fi

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
"minimum-stability": "dev",
1313
"require": {
1414
"symfony-cmf/resource-bundle": "~1.0",
15-
"willdurand/hateoas-bundle": "~1.0"
15+
"jms/serializer-bundle": "~0.13"
1616
},
1717
"require-dev": {
1818
"symfony-cmf/testing": "~1.1",
19-
"symfony/serializer": "~2.7",
2019
"phpspec/prophecy-phpunit": "~1.0.0",
2120
"behat/behat": "~3.0.0",
2221
"behat/web-api-extension" : "~1.0",

0 commit comments

Comments
 (0)