Skip to content

Commit

Permalink
fixed testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
wachterjohannes committed Feb 9, 2018
1 parent a5bf108 commit bd16097
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ sudo: false
matrix:
include:
- php: 5.3
dist: precise
env: PACKAGE_VERSION=low

before_script:
Expand Down
2 changes: 1 addition & 1 deletion src/PHPCR/Util/QOM/Sql2Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected function scan($sql2)
$token = strtok(" \n\t");
}

$regexp = '';
$regexp = array();
foreach ($tokens as $token) {
$regexp[] = preg_quote($token, '/');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
14 changes: 14 additions & 0 deletions tests/PHPCR/Tests/Util/QOM/Sql2ToQomQueryConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit bd16097

Please sign in to comment.