Skip to content

Commit

Permalink
Merge 4b86ed5 into 1492c93
Browse files Browse the repository at this point in the history
  • Loading branch information
jwentworth committed Nov 10, 2014
2 parents 1492c93 + 4b86ed5 commit d4377a7
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 44 deletions.
6 changes: 6 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
service_name: travis-ci

# for php-coveralls
src_dir: src
coverage_clover: ./docs/coverage/clover.xml
json_path: ./docs/coverage/coveralls-upload.json
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: php
php:
- 5.6
- 5.5
- 5.4
- 5.3
- hhvm
matrix:
allow_failures:
- php: hhvm
- php: 5.3
install:
- composer install
script:
- phpunit --coverage-text
after_script:
- php vendor/bin/coveralls -v
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ What is symfony-cron?
*symfony-cron* is a bundle of utilities for [Symfony2][1] that provide
functions related to scheduled tasks run out of a cron context.

[![Build Status](https://travis-ci.org/course-hero/symfony-cron-bundle.svg)](https://travis-ci.org/course-hero/symfony-cron-bundle) [![Coverage Status](https://img.shields.io/coveralls/course-hero/symfony-cron-bundle.svg)](https://coveralls.io/r/course-hero/symfony-cron-bundle)

Requirements
------------

Expand Down
44 changes: 22 additions & 22 deletions Tests/Command/SingleExecCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,33 +125,33 @@ public function testExecute_LockServiceTests($expectedException, $lockService, $

public function dataProviderForTestExecute_LockServiceTests()
{
return [
[
return array(
array(
'\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException',
null,
'Non-existant lock_service should not be allowed by Symfony2 kernel',
],
[
),
array(
'\UnexpectedValueException',
0,
'Non-object lock_service should not be allowed',
],
[
),
array(
'\UnexpectedValueException',
'If we\'re going to be damned, let\'s be damned for what we really are.',
'Non-object lock_service should not be allowed',
],
[
),
array(
'\UnexpectedValueException',
new \ReflectionClass('\Exception'),
'Objects not of the LockServiceInterface type should not be allowed',
],
[
),
array(
'\OverflowException',
new NeverLockService(),
'An exception should be thrown if the lock cannot be obtained',
],
];
),
);
}

public function testExecute_RunAsEmbeddedApplication()
Expand Down Expand Up @@ -264,28 +264,28 @@ public function testExecute_ProcessServiceTests($expectedException, $processServ

public function dataProviderForTestExecute_ProcessServiceTests()
{
return [
[
return array(
array(
'\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException',
null,
'Process service must exist to run a child process',
],
[
),
array(
'\UnexpectedValueException',
0,
'Process service must be a type of ProcessService',
],
[
),
array(
'\UnexpectedValueException',
'You may test that assumption at your convenience.',
'Process service must be a type of ProcessService',
],
[
),
array(
'\UnexpectedValueException',
new \ReflectionClass('\Exception'),
'Process service must be a type of ProcessService',
],
];
),
);
}
}

Expand Down
42 changes: 21 additions & 21 deletions Tests/Component/Lock/LockFileServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ public function testLock_KeyNegativeTests($key)

public function negativeDataForKeyTests()
{
return [
[null],
[''],
['file:/'],
['file://'],
['file:///'],
['/this/is/a/valid/path/missing/prefix'],
[' file:///this/is/a/valid/path/other/than/the/space'],
];
return array(
array(null),
array(''),
array('file:/'),
array('file://'),
array('file:///'),
array('/this/is/a/valid/path/missing/prefix'),
array(' file:///this/is/a/valid/path/other/than/the/space'),
);
}

/**
Expand Down Expand Up @@ -99,11 +99,11 @@ public function testLock_PositiveTests($key, $shouldGainLock, $mode)

public function positiveDataForKeyTests()
{
return [
[vfsStream::url('keys/1'), TRUE, 'c' ],
[vfsStream::url('keys/2'), FALSE, null],
[vfsStream::url('keys/3'), TRUE, 'a' ],
];
return array(
array(vfsStream::url('keys/1'), TRUE, 'c' ),
array(vfsStream::url('keys/2'), FALSE, null),
array(vfsStream::url('keys/3'), TRUE, 'a' ),
);
}

/**
Expand Down Expand Up @@ -154,13 +154,13 @@ public function testUnlock_NotAResourceArg($arg)

public function getDataForTestUnlockNotAResourceArg()
{
return [
[null],
[''],
['1'],
['foobar'],
[1],
];
return array(
array(null),
array(''),
array('1'),
array('foobar'),
array(1),
);
}

public function testUnlock_LockedResource()
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
},
"require-dev": {
"mikey179/vfsStream": "~1.4",
"phpunit/phpunit": "~4.3"
"phpunit/phpunit": "~4.3",
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
"psr-0": {
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

<logging>
<log type="coverage-html" target="./docs/coverage" chartset="UTF-8" />
<log type="coverage-clover" target="./docs/coverage/clover.xml"/>
</logging>

</phpunit>

0 comments on commit d4377a7

Please sign in to comment.