Skip to content

Commit

Permalink
Added benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
dantleech committed Jun 17, 2015
1 parent b0a57bb commit 693b421
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .phpbench.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

return require_once(__DIR__ . '/vendor/phpcr/phpcr-benchmarks/config/phpbench');
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ before_script:
- composer selfupdate
- composer install

script: phpunit
script:
- php vendor/bin/phpunit
- php vendor/bin/phpbench run --iterations=2

matrix:
allow_failures:
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
},
"require-dev": {
"phpcr/phpcr-api-tests": "dev-master",
"phpunit/phpunit": "~4.0.0",
"phpspec/prophecy-phpunit": "~1.0"
"phpcr/phpcr-benchmarks": "~1.0",
"phpunit/phpunit": "~4.0",
"phpcr/phpcr-benchmarks": "~1.0@dev"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 3 additions & 0 deletions src/Transport/Fs/Model/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use PHPCR\PropertyType;
use Jackalope\Transport\Fs\Filesystem\Storage;
use PHPCR\ItemNotFoundException;
use PHPCR\RepositoryException;

/**
* Class that encapsulates the strange Jackalope node data structure
Expand Down Expand Up @@ -176,6 +177,8 @@ private function parsePhpcrNodeProperties($properties)
$references = $property->getValue();
} catch (ItemNotFoundException $e) {
continue;
} catch (RepositoryException $e) {
continue;
}

if ($property->isMultiple()) {
Expand Down

0 comments on commit 693b421

Please sign in to comment.