Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

merged branch hason/travis (PR #633)

Commits
-------

e109233 set travis-ci icon to master
623fac0 Fixed test for "dump" function if xdebug>2.2 is loaded
bd89ec8 Added travis build file

Discussion
----------

Added travis build file

---------------------------------------------------------------------------

by stealth35 at 2012-02-14T14:23:44Z

you could add the twig extension install script

---------------------------------------------------------------------------

by stof at 2012-02-14T14:35:30Z

yeah, there should be 2 builds in the matrix, one with the C extension and one without

---------------------------------------------------------------------------

by hason at 2012-02-15T14:46:30Z

I created build file with matrix of builds. One with the C extension and one without. But I don't know why the C extension is not loaded for PHP 5.2.

---------------------------------------------------------------------------

by hason at 2012-02-16T10:29:02Z

@fabpot All tests passed [![Build Status](https://secure.travis-ci.org/hason/Twig.png?branch=travis)](http://travis-ci.org/hason/Twig)

---------------------------------------------------------------------------

by stof at 2012-04-01T10:30:01Z

@fabpot any reason not to merge it ?

---------------------------------------------------------------------------

by drak at 2012-04-02T02:01:44Z

+1, this helps with QA

---------------------------------------------------------------------------

by nikic at 2012-04-02T09:20:07Z

+1

---------------------------------------------------------------------------

by fabpot at 2012-04-20T09:41:50Z

Can you inline the .sh scripts into the travis file directly?

---------------------------------------------------------------------------

by hason at 2012-04-23T21:57:26Z

done
  • Loading branch information...
commit 833f3597d6683f053331d525c784caac149290e3 2 parents a512973 + e109233
@fabpot authored
View
14 .travis.yml
@@ -0,0 +1,14 @@
+language: php
+
+php:
+ - 5.2
+ - 5.3
+ - 5.4
+
+env:
+ - TWIG_EXT=no
+ - TWIG_EXT=yes
+
+before_script:
+ - if [ "$TWIG_EXT" == "yes" ]; then sh -c "cd ext/twig && phpize && ./configure --enable-twig && make && sudo make install"; fi
+ - if [ "$TWIG_EXT" == "yes" ]; then echo "extension=twig.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi
View
4 README.markdown
@@ -1,6 +1,8 @@
Twig, the flexible, fast, and secure template language for PHP
==============================================================
+[![Build Status](https://secure.travis-ci.org/fabpot/Twig.png?branch=master)](http://travis-ci.org/fabpot/Twig)
+
Twig is a template language for PHP, released under the new BSD license (code
and documentation).
@@ -12,4 +14,4 @@ More Information
Read the [documentation][1] for more information.
-[1]: http://twig.sensiolabs.org/documentation
+[1]: http://twig.sensiolabs.org/documentation
View
10 test/Twig/Tests/Fixtures/functions/dump.test
@@ -1,7 +1,6 @@
--TEST--
"dump" function
--TEMPLATE--
-{{ dump() }}
{{ dump('foo') }}
{{ dump('foo', 'bar') }}
--DATA--
@@ -9,15 +8,6 @@ return array('foo' => 'foo', 'bar' => 'bar')
--CONFIG--
return array('debug' => true, 'autoescape' => false);
--EXPECT--
-array(3) {
- ["foo"]=>
- string(3) "foo"
- ["bar"]=>
- string(3) "bar"
- ["global"]=>
- string(6) "global"
-}
-
string(3) "foo"
string(3) "foo"
View
19 test/Twig/Tests/Fixtures/functions/dump_array.test
@@ -0,0 +1,19 @@
+--TEST--
+"dump" function, xdebug is not loaded or xdebug <2.2-dev is loaded
+--CONDITION--
+!extension_loaded('xdebug') || (($r = new ReflectionExtension('xdebug')) && version_compare($r->getVersion(), '2.2-dev', '<'))
+--TEMPLATE--
+{{ dump() }}
+--DATA--
+return array('foo' => 'foo', 'bar' => 'bar')
+--CONFIG--
+return array('debug' => true, 'autoescape' => false);
+--EXPECT--
+array(3) {
+ ["foo"]=>
+ string(3) "foo"
+ ["bar"]=>
+ string(3) "bar"
+ ["global"]=>
+ string(6) "global"
+}
Please sign in to comment.
Something went wrong with that request. Please try again.