Просмотр исходного кода

:octocat: added group tag for sloww tests

smiley 2 лет назад
Родитель
Сommit
3afa888180
4 измененных файлов с 17 добавлено и 6 удалено
  1. 13 6
      phpunit.xml.dist
  2. 1 0
      tests/Data/HanziTest.php
  3. 1 0
      tests/Data/KanjiTest.php
  4. 2 0
      tests/QRCodeReaderTestAbstract.php

+ 13 - 6
phpunit.xml.dist

@@ -6,6 +6,11 @@
 		 colors="true"
 		 verbose="true"
 >
+	<testsuites>
+		<testsuite name="php-qrcode test suite">
+			<directory suffix=".php">./tests/</directory>
+		</testsuite>
+	</testsuites>
 	<coverage processUncoveredFiles="true">
 		<include>
 			<directory suffix=".php">./src</directory>
@@ -15,16 +20,18 @@
 			<xml outputDirectory=".build/coverage/coverage-xml"/>
 		</report>
 	</coverage>
-	<testsuites>
-		<testsuite name="php-qrcode test suite">
-			<directory suffix=".php">./tests/</directory>
-		</testsuite>
-	</testsuites>
 	<logging>
 		<junit outputFile=".build/logs/junit.xml"/>
 	</logging>
+	<!--
+	<groups>
+		<exclude>
+			<group>slow</group>
+		</exclude>
+	</groups>
+	-->
 	<php>
-		<!-- whether the test runs on CI or not - set to false to allow debug output -->
+		<!-- whether the test runs on CI - set to false to allow debug output -->
 		<const name="TEST_IS_CI" value="true"/>
 	</php>
 </phpunit>

+ 1 - 0
tests/Data/HanziTest.php

@@ -58,6 +58,7 @@ final class HanziTest extends DataInterfaceTestAbstract{
 	}
 
 	/**
+	 * @group slow
 	 * @dataProvider hanziProvider
 	 */
 	public function testValidateGB2312(string $chr):void{

+ 1 - 0
tests/Data/KanjiTest.php

@@ -77,6 +77,7 @@ final class KanjiTest extends DataInterfaceTestAbstract{
 	}
 
 	/**
+	 * @group slow
 	 * @dataProvider kanjiProvider
 	 */
 	public function testValidateSJIS(string $chr):void{

+ 2 - 0
tests/QRCodeReaderTestAbstract.php

@@ -72,6 +72,7 @@ abstract class QRCodeReaderTestAbstract extends TestCase{
 	}
 
 	/**
+	 * @group slow
 	 * @dataProvider qrCodeProvider
 	 */
 	public function testReader(string $img, string $expected, bool $grayscale):void{
@@ -131,6 +132,7 @@ abstract class QRCodeReaderTestAbstract extends TestCase{
 	}
 
 	/**
+	 * @group slow
 	 * @dataProvider dataTestProvider
 	 */
 	public function testReadData(Version $version, EccLevel $ecc, string $expected):void{