mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 23:01:29 +00:00
Fix manticore indexes check
This commit is contained in:
@@ -56,6 +56,59 @@ final class ManticoreIndexRegistryTest extends TestCase
|
||||
self::assertSame('bigint', $result['incompatible']['passwordstatus']['expected']);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function it_accepts_the_php_clients_associative_describe_response(): void
|
||||
{
|
||||
$result = ManticoreSchemaInspector::compareColumns(
|
||||
[
|
||||
'passwordstatus' => ['Type' => 'bigint', 'Properties' => []],
|
||||
'haspreview' => ['Type' => 'bigint', 'Properties' => []],
|
||||
],
|
||||
['passwordstatus' => ['type' => 'bigint'], 'haspreview' => ['type' => 'bigint']]
|
||||
);
|
||||
|
||||
self::assertSame([], $result['missing']);
|
||||
self::assertSame([], $result['incompatible']);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function it_treats_manticore_uint_as_the_integer_schema_type(): void
|
||||
{
|
||||
$result = ManticoreSchemaInspector::compareColumns(
|
||||
['categories_id' => ['Type' => 'uint']],
|
||||
['categories_id' => ['type' => 'integer']]
|
||||
);
|
||||
|
||||
self::assertSame([], $result['incompatible']);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function it_compares_settings_by_name_and_value(): void
|
||||
{
|
||||
$actual = [
|
||||
'min_infix_len' => ['Value' => '2'],
|
||||
'exact_words' => ['Value' => '1'],
|
||||
'index_field_lengths' => ['Value' => '1'],
|
||||
];
|
||||
|
||||
self::assertSame([], ManticoreSchemaInspector::missingSettings($actual, [
|
||||
'min_infix_len' => 2,
|
||||
'exact_words' => 1,
|
||||
'index_field_lengths' => 1,
|
||||
]));
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function it_parses_manticore_28_bundled_settings_response(): void
|
||||
{
|
||||
$actual = ['settings' => "min_infix_len = 2\nindex_field_lengths = 1"];
|
||||
|
||||
self::assertSame([], ManticoreSchemaInspector::missingSettings(
|
||||
$actual,
|
||||
ManticoreIndexRegistry::inspectableSettings()
|
||||
));
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function benchmark_fixture_is_versioned_and_covers_every_table(): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user