Skip to content

Commit 240ceed

Browse files
author
Vincent Langlet
committed
🚨 Fix tests
1 parent 899f567 commit 240ceed

File tree

7 files changed

+27
-31
lines changed

7 files changed

+27
-31
lines changed

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

Symfony3Custom/Sniffs/Objects/ObjectInstantiationSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
6767
T_NS_SEPARATOR,
6868
T_VARIABLE,
6969
T_STATIC,
70+
T_SELF,
7071
);
7172

7273
$object = $stackPtr;

Symfony3Custom/Tests/Commenting/FunctionCommentUnitTest.inc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<?php
22

33
/**
4-
* @param string $test
4+
* @param string $test Test Argument
55
*/
6-
function test($test)
6+
function functionTest($test)
77
{
88
return 42;
99
}
1010

1111
/**
12-
* @param string $test
12+
* @param string $test Test Argument
1313
*
1414
* @return int
1515
*/
16-
function test($test)
16+
function functionTest($test)
1717
{
1818
return 42;
1919
}
2020

2121
/**
22-
* @param array $tab
22+
* @param array $tab Test Argument
2323
*/
24-
function testWithCallBack($tab)
24+
function functionTestWithCallBack($tab)
2525
{
2626
$thing = array_map(function ($t) {
2727
return $t[0];

Symfony3Custom/Tests/Objects/ObjectInstantiationUnitTest.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ new $foo($this->foo);
2626
new static();
2727
new static(true);
2828
new static($this->foo);
29+
new self();
30+
new self(true);
31+
new self($this->foo);

build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ composer.path = ${basedir}/composer.phar
55
#PHP Code Sniffer
66
phpcs.standard = PEAR
77
phpcs.dir = ${basedir}/vendor/squizlabs/php_codesniffer
8-
phpcs.symlink.path = vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Symfony2
8+
phpcs.symlink.path = vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Symfony3Custom

build.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<project name="Symfony2-coding-standard" default="test">
1+
<project name="Symfony3-custom-coding-standard" default="test">
22
<property file="build.properties" />
33
<available property="composer.exists" file="${composer.path}" />
44
<available property="symlink.exists" file="${phpcs.symlink.path}" />
55

66
<target name="test" depends="vendor,lint,phpunit,phpcs" />
7-
<target name="travis" depends="vendor,lint,phpunit" />
7+
<target name="ci" depends="vendor,lint,phpunit" />
88

99
<target name="prepare" depends="clean" description="Prepare for build">
1010
<mkdir dir="${basedir}/build/coverage" />
@@ -36,12 +36,12 @@
3636
</target>
3737

3838
<target name="symlink-this-coding-standard" description="Symlink this coding standard" unless="symlink.exists">
39-
<symlink link="${basedir}/${phpcs.symlink.path}" resource="${basedir}/Symfony2"/>
39+
<symlink link="${basedir}/${phpcs.symlink.path}" resource="${basedir}/Symfony3Custom"/>
4040
</target>
4141

4242
<target name="phpunit" depends="symlink-this-coding-standard" description="Run unit tests with PHPUnit">
4343
<exec executable="phpunit" failonerror="true" >
44-
<arg value="--filter=Symfony2_*" />
44+
<arg value="--filter=Symfony3Custom_*" />
4545
<arg value="${phpcs.dir}/tests/AllTests.php" />
4646
</exec>
4747
</target>

circle.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
machine:
2+
pre:
3+
- sudo apt-get update; USE_PRECOMPILE=true sudo -E circleci-install php 7.1.0
4+
php:
5+
version: 7.1.0
6+
7+
test:
8+
pre:
9+
- composer global require "phpunit/phpunit=5.7.*"
10+
11+
override:
12+
- ant ci

0 commit comments

Comments
 (0)