[ Index ]

PHP Cross Reference of YOURLS

title

Body

[close]

/tests/tests/shorturl/ -> CRUDTest.php (summary)

(no description)

File Size: 275 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

CRUDTest:: (15 methods):
  modeProvider()
  set_duplicate_mode()
  setUp()
  tearDown()
  test_add_url()
  test_add_url_cache()
  test_edit_title()
  test_edit_title_cache()
  test_is_shorturl()
  test_update_hits()
  test_update_hits_cache()
  test_edit_url()
  test_edit_url_cache()
  test_delete_url()
  test_delete_url_cache()


Class: CRUDTest  - X-Ref

Short URLs : Create, Replace, Update, Delete tests

Every test runs twice, once with duplicate long URLs forbidden and once with
them allowed (see modeProvider()), so the whole CRUD surface is validated for
both YOURLS_UNIQUE_URLS settings without relying on the constant being defined
in the test config.
modeProvider()   X-Ref
Data provider : the two "allow duplicate long URLs" behaviors.

return: array<string, array{0:bool}>

set_duplicate_mode( bool $allow )   X-Ref
Force the "allow duplicate long URLs" behavior, overriding whatever
YOURLS_UNIQUE_URLS would resolve to. Removed in tearDown().


setUp()   X-Ref
No description

tearDown()   X-Ref
No description

test_add_url( bool $allow_duplicates )   X-Ref
No description

test_add_url_cache( bool $allow_duplicates )   X-Ref
No description

test_edit_title( bool $allow_duplicates )   X-Ref
No description

test_edit_title_cache( bool $allow_duplicates )   X-Ref
No description

test_is_shorturl( bool $allow_duplicates )   X-Ref
No description

test_update_hits( bool $allow_duplicates )   X-Ref
No description

test_update_hits_cache( bool $allow_duplicates )   X-Ref
No description

test_edit_url( bool $allow_duplicates )   X-Ref
No description

test_edit_url_cache( bool $allow_duplicates )   X-Ref
No description

test_delete_url( bool $allow_duplicates )   X-Ref
No description

test_delete_url_cache( bool $allow_duplicates )   X-Ref
No description



Generated: Sun Jul 12 05:10:03 2026 Cross-referenced by PHPXref 0.7.1