diff --git a/.travis.yml b/.travis.yml index 575f3aa..b61f75b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ sudo: false matrix: include: - php: 5.3 + dist: precise env: PACKAGE_VERSION=low before_script: diff --git a/src/PHPCR/Util/QOM/Sql2Scanner.php b/src/PHPCR/Util/QOM/Sql2Scanner.php index ac9a51c..49fd370 100644 --- a/src/PHPCR/Util/QOM/Sql2Scanner.php +++ b/src/PHPCR/Util/QOM/Sql2Scanner.php @@ -159,7 +159,7 @@ protected function scan($sql2) $token = strtok(" \n\t"); } - $regexp = ''; + $regexp = array(); foreach ($tokens as $token) { $regexp[] = preg_quote($token, '/'); } diff --git a/tests/PHPCR/Tests/Util/Console/Command/NodesUpdateCommandTest.php b/tests/PHPCR/Tests/Util/Console/Command/NodesUpdateCommandTest.php index db523a2..fe90059 100644 --- a/tests/PHPCR/Tests/Util/Console/Command/NodesUpdateCommandTest.php +++ b/tests/PHPCR/Tests/Util/Console/Command/NodesUpdateCommandTest.php @@ -88,7 +88,7 @@ public function testNodeUpdate($options) $this->setupQueryManager($options); $args = array( - '--query-language' => null, + '--query-language' => 'jcr-sql2', '--query' => $options['query'], '--no-interaction' => true, '--set-prop' => array(), diff --git a/tests/PHPCR/Tests/Util/QOM/Sql2ToQomQueryConverterTest.php b/tests/PHPCR/Tests/Util/QOM/Sql2ToQomQueryConverterTest.php index 15def8d..e1e4ac1 100644 --- a/tests/PHPCR/Tests/Util/QOM/Sql2ToQomQueryConverterTest.php +++ b/tests/PHPCR/Tests/Util/QOM/Sql2ToQomQueryConverterTest.php @@ -2,13 +2,27 @@ namespace PHPCR\Tests\Util\QOM; +use PHPCR\Query\QOM\QueryObjectModelFactoryInterface; use PHPCR\Util\QOM\Sql2ToQomQueryConverter; +use PHPCR\Util\ValueConverter; class Sql2ToQomQueryConverterTest extends \PHPUnit_Framework_TestCase { + /** + * @var QueryObjectModelFactoryInterface + */ protected $qomFactory; + + /** + * @var ValueConverter + */ protected $valueConverter; + /** + * @var Sql2ToQomQueryConverter + */ + protected $converter; + public function setUp() { $this->qomFactory = $this->getMock('PHPCR\Query\QOM\QueryObjectModelFactoryInterface');