Loading modules/tome_base/src/ProcessTrait.php +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ trait ProcessTrait { /** * Runs commands with concurrency. * * @param string[] $commands * @param array[] $commands * An array of commands to execute. * @param int $concurrency * The number of concurrent processes to execute. Loading modules/tome_base/tests/src/Kernel/TestBase.php +2 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ abstract class TestBase extends KernelTestBase { /** * {@inheritdoc} */ public static $modules = [ protected static $modules = [ 'content_translation', 'language', 'system', Loading @@ -41,7 +41,7 @@ abstract class TestBase extends KernelTestBase { /** * {@inheritdoc} */ public function setUp() { public function setUp(): void { parent::setUp(); $this->setUpFilesystem(); Loading modules/tome_base/tests/src/Unit/ExecutableFinderTraitTest.php +2 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Drupal\Tests\tome_base\Unit; use Prophecy\PhpUnit\ProphecyTrait; use Drupal\Tests\UnitTestCase; use Drupal\tome_base\ExecutableFinderTrait; use Symfony\Component\Console\Input\InputInterface; Loading @@ -12,6 +13,7 @@ use Symfony\Component\Console\Input\InputInterface; */ class ExecutableFinderTraitTest extends UnitTestCase { use ProphecyTrait; /** * @covers \Drupal\tome_base\ExecutableFinderTrait::findExecutable * Loading modules/tome_static/modules/tome_static_cron/tests/src/Functional/TomeStaticCronTest.php +7 −6 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\Tests\tome_static_cron\Functional; use Drupal\file\Entity\File; use Drupal\file\FileInterface; use Drupal\image\Entity\ImageStyle; use Drupal\Tests\BrowserTestBase; use Drupal\Tests\image\Kernel\ImageFieldCreationTrait; Loading @@ -25,7 +26,7 @@ class TomeStaticCronTest extends BrowserTestBase { * * @var array */ public static $modules = [ protected static $modules = [ 'tome_static_cron', 'image', 'node', Loading @@ -39,7 +40,7 @@ class TomeStaticCronTest extends BrowserTestBase { /** * {@inheritdoc} */ public function setUp() { public function setUp(): void { parent::setUp(); $this->createContentType([ Loading Loading @@ -80,7 +81,7 @@ class TomeStaticCronTest extends BrowserTestBase { $file = File::create([ 'uri' => $valid_images[0]->uri, 'status' => FILE_STATUS_PERMANENT, 'status' => FileInterface::STATUS_PERMANENT, ]); $file->save(); Loading @@ -100,9 +101,9 @@ class TomeStaticCronTest extends BrowserTestBase { _tome_static_cron_queue_paths(['/node/' . $node->id()], 'http://google.com'); $filename = $static->getStaticDirectory() . '/node/' . $node->id() . '/index.html'; $image_filename = $static->getStaticDirectory() . file_url_transform_relative(file_create_url(ImageStyle::load('large')->buildUri($file->getFileUri()))); $this->assertFileNotExists($filename); $this->assertFileNotExists($image_filename); $image_filename = $static->getStaticDirectory() . \Drupal::service('file_url_generator')->generateString(ImageStyle::load('large')->buildUri($file->getFileUri())); $this->assertFileDoesNotExist($filename); $this->assertFileDoesNotExist($image_filename); $this->cronRun(); $this->assertFileExists($filename); $this->assertFileExists($image_filename); Loading modules/tome_static/modules/tome_static_super_cache/src/Commands/TomeSuperCacheRebuildCommand.php +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ class TomeSuperCacheRebuildCommand extends CommandBase { $GLOBALS[SuperStaticCache::FULL_REBUILD_KEY] = TRUE; drupal_flush_all_caches(); $this->io()->success('Full cache rebuild complete.'); return 0; } } Loading
modules/tome_base/src/ProcessTrait.php +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ trait ProcessTrait { /** * Runs commands with concurrency. * * @param string[] $commands * @param array[] $commands * An array of commands to execute. * @param int $concurrency * The number of concurrent processes to execute. Loading
modules/tome_base/tests/src/Kernel/TestBase.php +2 −2 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ abstract class TestBase extends KernelTestBase { /** * {@inheritdoc} */ public static $modules = [ protected static $modules = [ 'content_translation', 'language', 'system', Loading @@ -41,7 +41,7 @@ abstract class TestBase extends KernelTestBase { /** * {@inheritdoc} */ public function setUp() { public function setUp(): void { parent::setUp(); $this->setUpFilesystem(); Loading
modules/tome_base/tests/src/Unit/ExecutableFinderTraitTest.php +2 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Drupal\Tests\tome_base\Unit; use Prophecy\PhpUnit\ProphecyTrait; use Drupal\Tests\UnitTestCase; use Drupal\tome_base\ExecutableFinderTrait; use Symfony\Component\Console\Input\InputInterface; Loading @@ -12,6 +13,7 @@ use Symfony\Component\Console\Input\InputInterface; */ class ExecutableFinderTraitTest extends UnitTestCase { use ProphecyTrait; /** * @covers \Drupal\tome_base\ExecutableFinderTrait::findExecutable * Loading
modules/tome_static/modules/tome_static_cron/tests/src/Functional/TomeStaticCronTest.php +7 −6 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\Tests\tome_static_cron\Functional; use Drupal\file\Entity\File; use Drupal\file\FileInterface; use Drupal\image\Entity\ImageStyle; use Drupal\Tests\BrowserTestBase; use Drupal\Tests\image\Kernel\ImageFieldCreationTrait; Loading @@ -25,7 +26,7 @@ class TomeStaticCronTest extends BrowserTestBase { * * @var array */ public static $modules = [ protected static $modules = [ 'tome_static_cron', 'image', 'node', Loading @@ -39,7 +40,7 @@ class TomeStaticCronTest extends BrowserTestBase { /** * {@inheritdoc} */ public function setUp() { public function setUp(): void { parent::setUp(); $this->createContentType([ Loading Loading @@ -80,7 +81,7 @@ class TomeStaticCronTest extends BrowserTestBase { $file = File::create([ 'uri' => $valid_images[0]->uri, 'status' => FILE_STATUS_PERMANENT, 'status' => FileInterface::STATUS_PERMANENT, ]); $file->save(); Loading @@ -100,9 +101,9 @@ class TomeStaticCronTest extends BrowserTestBase { _tome_static_cron_queue_paths(['/node/' . $node->id()], 'http://google.com'); $filename = $static->getStaticDirectory() . '/node/' . $node->id() . '/index.html'; $image_filename = $static->getStaticDirectory() . file_url_transform_relative(file_create_url(ImageStyle::load('large')->buildUri($file->getFileUri()))); $this->assertFileNotExists($filename); $this->assertFileNotExists($image_filename); $image_filename = $static->getStaticDirectory() . \Drupal::service('file_url_generator')->generateString(ImageStyle::load('large')->buildUri($file->getFileUri())); $this->assertFileDoesNotExist($filename); $this->assertFileDoesNotExist($image_filename); $this->cronRun(); $this->assertFileExists($filename); $this->assertFileExists($image_filename); Loading
modules/tome_static/modules/tome_static_super_cache/src/Commands/TomeSuperCacheRebuildCommand.php +1 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ class TomeSuperCacheRebuildCommand extends CommandBase { $GLOBALS[SuperStaticCache::FULL_REBUILD_KEY] = TRUE; drupal_flush_all_caches(); $this->io()->success('Full cache rebuild complete.'); return 0; } }