-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from event-engine/bugfix/message-name-validation
Fix backslash in message name regex
- Loading branch information
Showing
6 changed files
with
91 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# for php-coveralls | ||
service_name: travis-ci | ||
coverage_clover: build/logs/clover.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.idea | ||
composer.lock | ||
vendor | ||
vendor | ||
.php_cs | ||
.php_cs.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
language: php | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: 7.2 | ||
env: | ||
- DEPENDENCIES="" | ||
- EXECUTE_CS_CHECK=true | ||
- TEST_COVERAGE=true | ||
|
||
- php: 7.3 | ||
env: | ||
- DEPENDENCIES="" | ||
- EXECUTE_CS_CHECK=false | ||
- TEST_COVERAGE=false | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
- $HOME/.php-cs-fixer | ||
- $HOME/.local | ||
|
||
before_script: | ||
- mkdir -p "$HOME/.php-cs-fixer" | ||
- phpenv config-rm xdebug.ini | ||
- composer self-update | ||
- composer update --prefer-source $DEPENDENCIES | ||
|
||
script: | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then php -dzend_extension=xdebug.so ./vendor/bin/phpunit --coverage-text --coverage-clover ./build/logs/clover.xml; else ./vendor/bin/phpunit; fi | ||
# - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run; fi | ||
# - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/docheader check examples/ src/ tests/; fi | ||
|
||
after_success: | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then php vendor/bin/coveralls -v; fi | ||
|
||
notifications: | ||
webhooks: | ||
urls: | ||
- https://webhooks.gitter.im/e/61c75218816eebde4486 | ||
on_success: change # options: [always|never|change] default: always | ||
on_failure: always # options: [always|never|change] default: always | ||
on_start: never # options: [always|never|change] default: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ | |
} | ||
}, | ||
"prefer-stable": true, | ||
"minimum-stability": "dev", | ||
"scripts": { | ||
"check": [ | ||
"@cs", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* This file is part of even-engine/php-messaging. | ||
* (c) 2018-2019 prooph software GmbH <contact@prooph.de> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace EventEngineTest\Messaging; | ||
|
||
use EventEngine\Messaging\GenericSchemaMessage; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class GenericSchemaMessageTest extends TestCase | ||
{ | ||
public function providerForMessageName(): array | ||
{ | ||
return [ | ||
[self::class], | ||
['MyAwesomeMessage'], | ||
['1234'], | ||
['My1234'], | ||
]; | ||
} | ||
|
||
/** | ||
* @test | ||
* @dataProvider providerForMessageName | ||
* @param $messageName | ||
*/ | ||
public function it_asserts_message_name($messageName): void | ||
{ | ||
GenericSchemaMessage::assertMessageName($messageName); | ||
$this->assertTrue(true); | ||
} | ||
} |