Skip to content

Commit

Permalink
Merge pull request #123 from cedricziel/travis
Browse files Browse the repository at this point in the history
Fix travis build
  • Loading branch information
ipf authored Jan 20, 2017
2 parents 00ecd8d + f44b47c commit 1778bad
Show file tree
Hide file tree
Showing 18 changed files with 214 additions and 84 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.DS_Store
vendor/*
/composer.lock
/.Build
80 changes: 56 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,63 @@
language: php
php:
- 5.5
- 5.6
- hhvm
- nightly
env:
matrix:
- DB=mysql TYPO3=TYPO3_6-2
- DB=mysql TYPO3=master
global:
secure: EOWpYQfg4r6lH9jkeG3IbMmAhfIFSy1tqvolzBOaA5+PwzX2nIM1t2UFA7sRRy+0r9UZK1AJuMjdeIMsHqWzhBg9rQi9LGaqh/aWZFB655jdMGTZvcuE6CV3mdh1w56oROpif0X1px4s/phUK/qO05iG5D5koLeLQ95bXqw527w=

matrix:
fast_finish: true
include:
- php: 5.5
env: TYPO3_VERSION=^7.6
- php: 5.6
env: TYPO3_VERSION=^7.6
- php: 7.0
env: TYPO3_VERSION=^7.6
- php: 7.1
env: TYPO3_VERSION=^7.6
- php: 7.1
env: TYPO3_VERSION=^8
- php: 7.0
env: TYPO3_VERSION=^8
- php: 7.1
env: TYPO3_VERSION=dev-master
- php: 7.0
env: TYPO3_VERSION=dev-master
- php: nightly
env: TYPO3_VERSION=dev-master
allow_failures:
- env: TYPO3_VERSION=dev-master
- php: nightly

addons:
apt:
packages:
- parallel

sudo: false

cache:
directories:
- "$HOME/.composer/cache"
before_script:
- cd ..
- mkdir parallel && cd parallel && wget http://ftp.gnu.org/gnu/parallel/parallel-latest.tar.bz2 && tar xvf parallel-latest.tar.bz2 -C . --strip-components=1 && ./configure && make && cd ..
- git clone --single-branch --branch $TYPO3 --depth 1 https://github.com/TYPO3/TYPO3.CMS.git typo3_core
- mv typo3_core/* .
- if [ "$GITHUB_COMPOSER_AUTH" ]; then composer config -g github-oauth.github.com $GITHUB_COMPOSER_AUTH; fi

before_install:
- composer self-update
- composer install
- mkdir -p uploads typo3temp typo3conf/ext
- mv typo3-find typo3conf/ext/find
- cd typo3conf/ext/find
- composer install
- cd ../../../
- composer --version

install:
- composer require --no-update "typo3/cms:$TYPO3_VERSION"
- composer require --no-update "solarium/solarium"
- if [[ "$TYPO3_VERSION" == "^8" ]]; then composer require --no-update "phpunit/phpunit:^5.0"; fi
- composer install --prefer-dist
- export TYPO3_PATH_WEB=$PWD/.Build/Web

script:
- "./bin/phpunit -c typo3/sysext/core/Build/UnitTests.xml typo3conf/ext/find/Tests/Unit/;"
- >
echo;
echo "Running php lint";
find . -name \*.php ! -path "./.Build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
- >
echo;
echo "Running unit tests";
if [[ "$TYPO3_VERSION" == "dev-master" ]];
then
.Build/bin/phpunit --colors -c .Build/vendor/typo3/cms/components/testing_framework/core/Build/UnitTests.xml Tests/Unit/
else
.Build/bin/phpunit --colors -c .Build/vendor/typo3/cms/typo3/sysext/core/Build/UnitTests.xml Tests/Unit/
fi
2 changes: 1 addition & 1 deletion Tests/Unit/Service/SolrServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SolrServiceProviderTest extends BaseTestCase

public function setUp()
{
$this->fixture = $this->getAccessibleMock(SolrServiceProvider::class, ['dummy'], [[]]);
$this->fixture = $this->getAccessibleMock(SolrServiceProvider::class, ['dummy'], ['default', []]);
}

/**
Expand Down
7 changes: 3 additions & 4 deletions Tests/Unit/ViewHelpers/Data/ArrayFirstViewHelperTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Subugoe\find\Tests\Unit\ViewHelpers\Data;
namespace Subugoe\Find\Tests\Unit\ViewHelpers\Data;

/* * *************************************************************
* Copyright notice
Expand All @@ -26,12 +26,12 @@
* ************************************************************* */

use Subugoe\Find\ViewHelpers\Data\ArrayFirstViewHelper;
use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
use TYPO3\CMS\Core\Tests\BaseTestCase;

/**
* Test for ArrayFirst ViewHelper
*/
class ArrayFirstViewHelperTest extends ViewHelperBaseTestcase
class ArrayFirstViewHelperTest extends BaseTestCase
{
/**
* @var \Subugoe\Find\ViewHelpers\Data\ArrayFirstViewHelper
Expand All @@ -42,7 +42,6 @@ public function setUp()
{
parent::setUp();
$this->fixture = $this->getAccessibleMock(ArrayFirstViewHelper::class, ['renderChildren']);
$this->injectDependenciesIntoViewHelper($this->fixture);
$this->fixture->initializeArguments();
}

Expand Down
7 changes: 3 additions & 4 deletions Tests/Unit/ViewHelpers/Data/IsArrayViewHelperTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Subugoe\find\Tests\Unit\ViewHelpers\Data;
namespace Subugoe\Find\Tests\Unit\ViewHelpers\Data;

/* * *************************************************************
* Copyright notice
Expand All @@ -26,12 +26,12 @@
* ************************************************************* */

use Subugoe\Find\ViewHelpers\Data\IsArrayViewHelper;
use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
use TYPO3\CMS\Core\Tests\BaseTestCase;

/**
* Test for IsArray ViewHelper
*/
class IsArrayViewHelperTest extends ViewHelperBaseTestcase
class IsArrayViewHelperTest extends BaseTestCase
{
/**
* @var \Subugoe\Find\ViewHelpers\Data\IsArrayViewHelper
Expand All @@ -42,7 +42,6 @@ public function setUp()
{
parent::setUp();
$this->fixture = $this->getAccessibleMock(IsArrayViewHelper::class, ['renderChildren']);
$this->injectDependenciesIntoViewHelper($this->fixture);
$this->fixture->initializeArguments();
}

Expand Down
7 changes: 3 additions & 4 deletions Tests/Unit/ViewHelpers/Data/NewArrayViewHelperTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Subugoe\find\Tests\Unit\ViewHelpers\Data;
namespace Subugoe\Find\Tests\Unit\ViewHelpers\Data;

/* * *************************************************************
* Copyright notice
Expand All @@ -26,12 +26,12 @@
* ************************************************************* */

use Subugoe\Find\ViewHelpers\Data\NewArrayViewHelper;
use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
use TYPO3\CMS\Core\Tests\BaseTestCase;

/**
* Test for NewArray ViewHelper
*/
class NewArrayViewHelperTest extends ViewHelperBaseTestcase
class NewArrayViewHelperTest extends BaseTestCase
{
/**
* @var \Subugoe\Find\ViewHelpers\Data\NewArrayViewHelper
Expand All @@ -42,7 +42,6 @@ public function setUp()
{
parent::setUp();
$this->fixture = $this->getAccessibleMock(NewArrayViewHelper::class, ['renderChildren']);
$this->injectDependenciesIntoViewHelper($this->fixture);
$this->fixture->initializeArguments();
}

Expand Down
14 changes: 10 additions & 4 deletions Tests/Unit/ViewHelpers/Data/SplitViewHelperTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Subugoe\find\Tests\Unit\ViewHelpers\Data;
namespace Subugoe\Find\Tests\Unit\ViewHelpers\Data;

/* * *************************************************************
* Copyright notice
Expand All @@ -26,13 +26,16 @@
* ************************************************************* */

use Subugoe\Find\ViewHelpers\Data\SplitViewHelper;
use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
use TYPO3\CMS\Core\Tests\BaseTestCase;
use Subugoe\Find\Tests\Unit\ViewHelpers\MockRenderingContextTrait;

/**
* Test for Split ViewHelper
*/
class SplitViewHelperTest extends ViewHelperBaseTestcase
class SplitViewHelperTest extends BaseTestCase
{
use MockRenderingContextTrait;

/**
* @var \Subugoe\Find\ViewHelpers\Data\SplitViewHelper
*/
Expand All @@ -41,9 +44,12 @@ class SplitViewHelperTest extends ViewHelperBaseTestcase
public function setUp()
{
parent::setUp();

$this->fixture = $this->getAccessibleMock(SplitViewHelper::class, ['renderChildren']);
$this->injectDependenciesIntoViewHelper($this->fixture);
$this->fixture->initializeArguments();

$this->createRenderingContextMock();
$this->inject($this->fixture, 'renderingContext', $this->renderingContextMock);
}

/**
Expand Down
15 changes: 11 additions & 4 deletions Tests/Unit/ViewHelpers/Data/TransposeViewHelperTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Subugoe\find\Tests\Unit\ViewHelpers\Data;
namespace Subugoe\Find\Tests\Unit\ViewHelpers\Data;

/* * *************************************************************
* Copyright notice
Expand All @@ -26,23 +26,28 @@
* ************************************************************* */

use Subugoe\Find\ViewHelpers\Data\TransposeViewHelper;
use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
use TYPO3\CMS\Core\Tests\BaseTestCase;
use TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer;

/**
* Test for Transpose ViewHelper
*/
class TransposeViewHelperTest extends ViewHelperBaseTestcase
class TransposeViewHelperTest extends BaseTestCase
{
/**
* @var \Subugoe\Find\ViewHelpers\Data\TransposeViewHelper
*/
public $fixture;

/**
* @var TemplateVariableContainer
*/
public $templateVariableContainer;

public function setUp()
{
parent::setUp();
$this->fixture = $this->getAccessibleMock(TransposeViewHelper::class, ['renderChildren']);
$this->injectDependenciesIntoViewHelper($this->fixture);
$this->fixture->initializeArguments();
}

Expand Down Expand Up @@ -70,8 +75,10 @@ public function arrayIsTransposed()
];

$this->fixture->setArguments($arguments);
$this->templateVariableContainer = $this->getAccessibleMock(TemplateVariableContainer::class, ['add', 'remove']);
$this->templateVariableContainer->expects($this->at(0))->method('add')->with('hrdr', $expected);
$this->templateVariableContainer->expects($this->at(1))->method('remove')->with('hrdr');
$this->inject($this->fixture, 'templateVariableContainer', $this->templateVariableContainer);

$this->fixture->render();
}
Expand Down
14 changes: 10 additions & 4 deletions Tests/Unit/ViewHelpers/Data/ValueForKeyViewHelperTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Subugoe\find\Tests\Unit\ViewHelpers\Data;
namespace Subugoe\Find\Tests\Unit\ViewHelpers\Data;

/* * *************************************************************
* Copyright notice
Expand All @@ -25,14 +25,17 @@
* This copyright notice MUST APPEAR in all copies of the script!
* ************************************************************* */

use Subugoe\Find\Tests\Unit\ViewHelpers\MockRenderingContextTrait;
use Subugoe\Find\ViewHelpers\Data\ValueForKeyViewHelper;
use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
use TYPO3\CMS\Core\Tests\BaseTestCase;

/**
* Test for ValueForKey ViewHelper
*/
class ValueForKeyViewHelperTest extends ViewHelperBaseTestcase
class ValueForKeyViewHelperTest extends BaseTestCase
{
use MockRenderingContextTrait;

/**
* @var \Subugoe\Find\ViewHelpers\Data\ValueForKeyViewHelper
*/
Expand All @@ -41,9 +44,12 @@ class ValueForKeyViewHelperTest extends ViewHelperBaseTestcase
public function setUp()
{
parent::setUp();

$this->fixture = $this->getAccessibleMock(ValueForKeyViewHelper::class, ['renderChildren']);
$this->injectDependenciesIntoViewHelper($this->fixture);
$this->fixture->initializeArguments();

$this->createRenderingContextMock();
$this->inject($this->fixture, 'renderingContext', $this->renderingContextMock);
}

/**
Expand Down
5 changes: 2 additions & 3 deletions Tests/Unit/ViewHelpers/Find/FacetIsActiveViewHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
* This copyright notice MUST APPEAR in all copies of the script!
* ************************************************************* */
use Subugoe\Find\ViewHelpers\Find\FacetIsActiveViewHelper;
use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
use TYPO3\CMS\Core\Tests\BaseTestCase;

/**
* Test for FacetIsActive ViewHelper
*/
class FacetIsActiveViewHelperTest extends ViewHelperBaseTestcase
class FacetIsActiveViewHelperTest extends BaseTestCase
{
/**
* @var \Subugoe\Find\ViewHelpers\Find\FacetIsActiveViewHelper
Expand All @@ -41,7 +41,6 @@ public function setUp()
{
parent::setUp();
$this->fixture = $this->getAccessibleMock(FacetIsActiveViewHelper::class, ['renderChildren']);
$this->injectDependenciesIntoViewHelper($this->fixture);
$this->fixture->initializeArguments();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
* This copyright notice MUST APPEAR in all copies of the script!
* ************************************************************* */
use Subugoe\Find\ViewHelpers\Find\FacetLinkArgumentsViewHelper;
use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
use TYPO3\CMS\Core\Tests\BaseTestCase;

/**
* Test for FacetLinkArguments ViewHelper
*/
class FacetLinkArgumentsViewHelperTest extends ViewHelperBaseTestcase
class FacetLinkArgumentsViewHelperTest extends BaseTestCase
{
/**
* @var \Subugoe\Find\ViewHelpers\Find\FacetLinkArgumentsViewHelper
Expand All @@ -41,7 +41,6 @@ public function setUp()
{
parent::setUp();
$this->fixture = $this->getAccessibleMock(FacetLinkArgumentsViewHelper::class, ['renderChildren']);
$this->injectDependenciesIntoViewHelper($this->fixture);
$this->fixture->initializeArguments();
}

Expand Down
5 changes: 2 additions & 3 deletions Tests/Unit/ViewHelpers/Find/HighlightFieldViewHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
* ************************************************************* */

use Subugoe\Find\ViewHelpers\Find\HighlightFieldViewHelper;
use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
use TYPO3\CMS\Core\Tests\BaseTestCase;

/**
* Test for HighlightField ViewHelper
*/
class HighlightFieldViewHelperTest extends ViewHelperBaseTestcase
class HighlightFieldViewHelperTest extends BaseTestCase
{
/**
* @var \Subugoe\Find\ViewHelpers\Find\HighlightFieldViewHelper
Expand All @@ -47,7 +47,6 @@ public function setUp()
parent::setUp();

$this->fixture = $this->getAccessibleMock(HighlightFieldViewHelper::class, ['renderChildren']);
$this->injectDependenciesIntoViewHelper($this->fixture);
$this->fixture->initializeArguments();
}

Expand Down
Loading

0 comments on commit 1778bad

Please sign in to comment.