File tree 6 files changed +91
-2
lines changed
6 files changed +91
-2
lines changed Original file line number Diff line number Diff line change
1
+ # for php-coveralls
2
+ service_name : travis-ci
3
+ coverage_clover : build/logs/clover.xml
Original file line number Diff line number Diff line change 1
1
.idea
2
2
composer.lock
3
- vendor
3
+ vendor
4
+ .php_cs
5
+ .php_cs.cache
Original file line number Diff line number Diff line change
1
+ language : php
2
+
3
+ matrix :
4
+ fast_finish : true
5
+ include :
6
+ - php : 7.2
7
+ env :
8
+ - DEPENDENCIES=""
9
+ - EXECUTE_CS_CHECK=true
10
+ - TEST_COVERAGE=true
11
+
12
+ - php : 7.3
13
+ env :
14
+ - DEPENDENCIES=""
15
+ - EXECUTE_CS_CHECK=false
16
+ - TEST_COVERAGE=false
17
+
18
+ cache :
19
+ directories :
20
+ - $HOME/.composer/cache
21
+ - $HOME/.php-cs-fixer
22
+ - $HOME/.local
23
+
24
+ before_script :
25
+ - mkdir -p "$HOME/.php-cs-fixer"
26
+ - phpenv config-rm xdebug.ini
27
+ - composer self-update
28
+ - composer update --prefer-source $DEPENDENCIES
29
+
30
+ script :
31
+ - 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
32
+ # - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run; fi
33
+ # - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/docheader check examples/ src/ tests/; fi
34
+
35
+ after_success :
36
+ - if [[ $TEST_COVERAGE == 'true' ]]; then php vendor/bin/coveralls -v; fi
37
+
38
+ notifications :
39
+ webhooks :
40
+ urls :
41
+ - https://webhooks.gitter.im/e/61c75218816eebde4486
42
+ on_success : change # options: [always|never|change] default: always
43
+ on_failure : always # options: [always|never|change] default: always
44
+ on_start : never # options: [always|never|change] default: always
Original file line number Diff line number Diff line change 39
39
}
40
40
},
41
41
"prefer-stable" : true ,
42
+ "minimum-stability" : " dev" ,
42
43
"scripts" : {
43
44
"check" : [
44
45
" @cs" ,
Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ public static function assertUuid(string $uuid): void
253
253
254
254
public static function assertMessageName ($ messageName ): void
255
255
{
256
- if (! \preg_match ('/^[A-Za-z0 -9_.-\/ ]+$/ ' , $ messageName )) {
256
+ if (! \preg_match ('/^[A-Za-z\/0 -9_\.\- \\\\ ]+$/ ' , $ messageName )) {
257
257
throw new RuntimeException ('message_name is invalid ' );
258
258
}
259
259
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * This file is part of even-engine/php-messaging.
4
+ * (c) 2018-2019 prooph software GmbH <contact@prooph.de>
5
+ *
6
+ * For the full copyright and license information, please view the LICENSE
7
+ * file that was distributed with this source code.
8
+ */
9
+
10
+ declare (strict_types=1 );
11
+
12
+ namespace EventEngineTest \Messaging ;
13
+
14
+ use EventEngine \Messaging \GenericSchemaMessage ;
15
+ use PHPUnit \Framework \TestCase ;
16
+
17
+ class GenericSchemaMessageTest extends TestCase
18
+ {
19
+ public function providerForMessageName (): array
20
+ {
21
+ return [
22
+ [self ::class],
23
+ ['MyAwesomeMessage ' ],
24
+ ['1234 ' ],
25
+ ['My1234 ' ],
26
+ ];
27
+ }
28
+
29
+ /**
30
+ * @test
31
+ * @dataProvider providerForMessageName
32
+ * @param $messageName
33
+ */
34
+ public function it_asserts_message_name ($ messageName ): void
35
+ {
36
+ GenericSchemaMessage::assertMessageName ($ messageName );
37
+ $ this ->assertTrue (true );
38
+ }
39
+ }
You can’t perform that action at this time.
0 commit comments