diff --git a/src/TestSuite/FunctionalJavascript.php b/src/TestSuite/FunctionalJavascript.php new file mode 100644 index 0000000000000000000000000000000000000000..638a09979cfe1668ee303bef1ea8b9de223ebb66 --- /dev/null +++ b/src/TestSuite/FunctionalJavascript.php @@ -0,0 +1,27 @@ +<?php + +namespace LakeDrops\Drupal8ScaffoldDeveloper\TestSuites; + +require_once __DIR__ . '/Base.php'; + +/** + * Discovers tests for the functional test suite. + */ +class FunctionalJavascript extends Base { + + /** + * Factory method which loads up a suite with all functional tests. + * + * @return static + * The test suite. + */ + public static function suite() { + $root = dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/web'; + + $suite = new static('functional-javascript'); + $suite->addTestsBySuiteNamespace($root, 'FunctionalJavascript'); + + return $suite; + } + +} diff --git a/src/TestSuite/Kernel.php b/src/TestSuite/Kernel.php new file mode 100644 index 0000000000000000000000000000000000000000..e1317d36f9cde0acbfec47c0daf4bfa2f94b51ba --- /dev/null +++ b/src/TestSuite/Kernel.php @@ -0,0 +1,27 @@ +<?php + +namespace LakeDrops\Drupal8ScaffoldDeveloper\TestSuites; + +require_once __DIR__ . '/Base.php'; + +/** + * Discovers tests for the unit test suite. + */ +class Kernel extends Base { + + /** + * Factory method which loads up a suite with all unit tests. + * + * @return static + * The test suite. + */ + public static function suite() { + $root = dirname(dirname(dirname(dirname(dirname(__DIR__))))) . '/web'; + + $suite = new static('kernel'); + $suite->addTestsBySuiteNamespace($root, 'Kernel'); + + return $suite; + } + +} diff --git a/templates/tests/phpunit.xml.dist b/templates/tests/phpunit.xml.dist index 4aff2ec2a5ef0a215873789ad3670958014a41dc..ac5797b7cd4113c6cc427830bec2fb90774c1fd5 100644 --- a/templates/tests/phpunit.xml.dist +++ b/templates/tests/phpunit.xml.dist @@ -39,9 +39,15 @@ <testsuite name="unit"> <file>../vendor/lakedrops/d8-project-scaffold-developer/src/TestSuite/Unit.php</file> </testsuite> + <testsuite name="kernel"> + <file>../vendor/lakedrops/d8-project-scaffold-developer/src/TestSuite/Kernel.php</file> + </testsuite> <testsuite name="functional"> <file>../vendor/lakedrops/d8-project-scaffold-developer/src/TestSuite/Functional.php</file> </testsuite> + <testsuite name="functional-javascript"> + <file>../vendor/lakedrops/d8-project-scaffold-developer/src/TestSuite/FunctionalJavascript.php</file> + </testsuite> </testsuites> <listeners> <listener class="\Drupal\Tests\Listeners\DrupalListener">