first commit

This commit is contained in:
2020-06-08 23:57:36 +02:00
commit 6277454f7a
16057 changed files with 1715382 additions and 0 deletions
@@ -0,0 +1,35 @@
<?php
namespace Drupal\FunctionalTests;
use Drupal\Tests\BrowserTestBase;
/**
* A fixture test class with requires annotation.
*
* This is a fixture class for
* \Drupal\FunctionalTests\BrowserTestBaseTest::testMethodRequiresModule().
*
* This test class should not be discovered by run-tests.sh or phpunit.
*
* @group fixture
*/
class BrowserMissingDependentModuleMethodTest extends BrowserTestBase {
/**
* This method should be skipped since it requires a module that is not found.
*
* @requires module module_does_not_exist
*/
public function testRequiresModule() {
$this->fail('Running test with missing required module.');
}
/**
* Public access for checkRequirements() to avoid reflection.
*/
public function publicCheckRequirements() {
return parent::checkRequirements();
}
}
@@ -0,0 +1,37 @@
<?php
namespace Drupal\FunctionalTests;
use Drupal\Tests\BrowserTestBase;
/**
* A fixture test class with requires annotation.
*
* This is a fixture class for
* \Drupal\FunctionalTests\BrowserTestBaseTest::testRequiresModule().
*
* This test class should not be discovered by run-tests.sh or phpunit.
*
* @requires module module_does_not_exist
* @group fixture
*/
class BrowserMissingDependentModuleTest extends BrowserTestBase {
/**
* Placeholder test method.
*
* Depending on configuration, PHPUnit might fail a test if it has no test
* methods, so we must provide one. This method should never be executed.
*/
public function testRequiresModule() {
$this->fail('Running test with missing required module.');
}
/**
* Public access for checkRequirements() to avoid reflection.
*/
public function publicCheckRequirements() {
return parent::checkRequirements();
}
}
@@ -0,0 +1,33 @@
<?php
namespace Drupal\KernelTests;
/**
* A fixture test class with requires annotation.
*
* This is a fixture class for
* \Drupal\KernelTests\KernelTestBaseTest::testRequiresModule().
*
* This test class should not be discovered by run-tests.sh or phpunit.
*
* @group fixture
*/
class KernelMissingDependentModuleMethodTest extends KernelTestBase {
/**
* This method should be skipped since it requires a module that is not found.
*
* @requires module module_does_not_exist
*/
public function testRequiresModule() {
$this->fail('Running test with missing required module.');
}
/**
* Public access for checkRequirements() to avoid reflection.
*/
public function publicCheckRequirements() {
return parent::checkRequirements();
}
}
@@ -0,0 +1,35 @@
<?php
namespace Drupal\KernelTests;
/**
* A fixture test class with requires annotation.
*
* This is a fixture class for
* \Drupal\KernelTests\KernelTestBaseTest::testRequiresModule().
*
* This test class should not be discovered by run-tests.sh or phpunit.
*
* @requires module module_does_not_exist
* @group fixture
*/
class KernelMissingDependentModuleTest extends KernelTestBase {
/**
* Placeholder test method.
*
* Depending on configuration, PHPUnit might fail a test if it has no test
* methods, so we must provide one. This method should never be executed.
*/
public function testRequiresModule() {
$this->fail('Running test with missing required module.');
}
/**
* Public access for checkRequirements() to avoid reflection.
*/
public function publicCheckRequirements() {
return parent::checkRequirements();
}
}
Binary file not shown.
@@ -0,0 +1,14 @@
<?php
namespace Drupal\Core\Database\Driver\corefake;
use Drupal\Driver\Database\fake\Connection as BaseConnection;
class Connection extends BaseConnection {
/**
* {@inheritdoc}
*/
public $driver = 'corefake';
}
@@ -0,0 +1,16 @@
<?php
namespace Drupal\Core\Database\Driver\corefake\Install;
use Drupal\Core\Database\Install\Tasks as InstallTasks;
class Tasks extends InstallTasks {
/**
* {@inheritdoc}
*/
public function name() {
return 'corefake';
}
}
@@ -0,0 +1,7 @@
<?php
namespace Drupal\Driver\Database\corefake;
use Drupal\Core\Database\Driver\corefake\Connection as CoreFakeConnection;
class Connection extends CoreFakeConnection {}
@@ -0,0 +1,9 @@
<?php
namespace Drupal\Driver\Database\corefake\Install;
use Drupal\Core\Database\Driver\corefake\Install\Tasks as BaseInstallTasks;
class Tasks extends BaseInstallTasks {
}
@@ -0,0 +1,70 @@
<?php
namespace Drupal\Driver\Database\fake;
use Drupal\Core\Database\Connection as CoreConnection;
use Drupal\Core\Database\StatementEmpty;
/**
* A fake Connection class for testing purposes.
*/
class Connection extends CoreConnection {
/**
* Public property so we can test driver loading mechanism.
*
* @var string
* @see driver().
*/
public $driver = 'fake';
/**
* {@inheritdoc}
*/
public function queryRange($query, $from, $count, array $args = [], array $options = []) {
return new StatementEmpty();
}
/**
* {@inheritdoc}
*/
public function queryTemporary($query, array $args = [], array $options = []) {
return '';
}
/**
* {@inheritdoc}
*/
public function driver() {
return $this->driver;
}
/**
* {@inheritdoc}
*/
public function databaseType() {
return 'fake';
}
/**
* {@inheritdoc}
*/
public function createDatabase($database) {
return;
}
/**
* {@inheritdoc}
*/
public function mapConditionOperator($operator) {
return NULL;
}
/**
* {@inheritdoc}
*/
public function nextId($existing_id = 0) {
return 0;
}
}
@@ -0,0 +1,16 @@
<?php
namespace Drupal\Driver\Database\fake\Install;
use Drupal\Core\Database\Install\Tasks as InstallTasks;
class Tasks extends InstallTasks {
/**
* {@inheritdoc}
*/
public function name() {
return 'fake';
}
}
@@ -0,0 +1,14 @@
<?php
namespace Drupal\corefake\Driver\Database\corefake;
use Drupal\Driver\Database\fake\Connection as BaseConnection;
class Connection extends BaseConnection {
/**
* {@inheritdoc}
*/
public $driver = 'corefake';
}
@@ -0,0 +1,16 @@
<?php
namespace Drupal\corefake\Driver\Database\corefake\Install;
use Drupal\Core\Database\Install\Tasks as InstallTasks;
class Tasks extends InstallTasks {
/**
* {@inheritdoc}
*/
public function name() {
return 'corefake';
}
}
+2
View File
@@ -0,0 +1,2 @@
<?php
// @codingStandardsIgnoreFile
+5
View File
@@ -0,0 +1,5 @@
These files are useful in tests that upload files or otherwise need to
manipulate files, in which case they are copied to the files directory as
specified in the site settings. Dummy files can also be generated by tests in
order to save space.
+1
View File
@@ -0,0 +1 @@
<h1>SimpleTest HTML</h1>
+1
View File
@@ -0,0 +1 @@
<h1>SimpleTest HTML</h1>
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 964 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

+1
View File
@@ -0,0 +1 @@
invalid image file
+3
View File
@@ -0,0 +1,3 @@
<script>
alert('SimpleTest PHP was executed!');
</script>
+3
View File
@@ -0,0 +1,3 @@
<script>
alert('SimpleTest PHP was executed!');
</script>
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
<?php
// @codingStandardsIgnoreFile
print 'SimpleTest PHP was executed!';
?>
+3
View File
@@ -0,0 +1,3 @@
<?php
// @codingStandardsIgnoreFile
print 'SimpleTest PHP was executed!';
+1
View File
@@ -0,0 +1 @@
SELECT invalid_field FROM {invalid_table}
+1
View File
@@ -0,0 +1 @@
SELECT invalid_field FROM {invalid_table}
@@ -0,0 +1,5 @@
name: Test Stable
type: theme
description: A theme to test that stable is set as the default.
version: VERSION
core: 8.x
+13
View File
@@ -0,0 +1,13 @@
<?php
/**
* @file
* Test preprocess functions for theme test_stable.
*/
/**
* Implements hook_preprocess_theme_test_render_element().
*/
function test_stable_preprocess_theme_test_render_element($variables) {
// This is used for Drupal\Tests\Core\Theme\RegistryTest.
}