test(update-checker): invariants for vendored PUC loader and factory class
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Cf7stg\Tests;
|
||||
|
||||
final class UpdateCheckerIntegrationTest extends Cf7stgTestCase
|
||||
{
|
||||
private const PLUGIN_ROOT = __DIR__ . '/..';
|
||||
private const PUC_LOADER = self::PLUGIN_ROOT . '/includes/lib/plugin-update-checker/plugin-update-checker.php';
|
||||
|
||||
public function test_puc_loader_file_exists(): void
|
||||
{
|
||||
self::assertFileExists(self::PUC_LOADER);
|
||||
}
|
||||
|
||||
public function test_puc_factory_class_loadable_after_require(): void
|
||||
{
|
||||
require_once self::PUC_LOADER;
|
||||
self::assertTrue(
|
||||
class_exists('YahnisElsts\\PluginUpdateChecker\\v5\\PucFactory'),
|
||||
'PucFactory must be loadable after requiring the PUC loader'
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user