Deploy Ladill Mini / deploy (push) Successful in 40s
Expose /.well-known/assetlinks.json from env-configured Play app signing fingerprints so mini.ladill.com passes Play Console deep link domain checks. Co-authored-by: Cursor <cursoragent@cursor.com>
42 lines
1.4 KiB
PHP
42 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Tests\TestCase;
|
|
|
|
class AssetLinksTest extends TestCase
|
|
{
|
|
public function test_assetlinks_returns_404_when_fingerprints_not_configured(): void
|
|
{
|
|
config(['android_app_links.sha256_cert_fingerprints' => []]);
|
|
|
|
$this->get('/.well-known/assetlinks.json')->assertNotFound();
|
|
}
|
|
|
|
public function test_assetlinks_returns_json_when_configured(): void
|
|
{
|
|
config([
|
|
'android_app_links.package_name' => 'com.ladill.mini',
|
|
'android_app_links.sha256_cert_fingerprints' => [
|
|
'AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99',
|
|
],
|
|
]);
|
|
|
|
$this->get('/.well-known/assetlinks.json')
|
|
->assertOk()
|
|
->assertHeader('Content-Type', 'application/json')
|
|
->assertJson([
|
|
[
|
|
'relation' => ['delegate_permission/common.handle_all_urls'],
|
|
'target' => [
|
|
'namespace' => 'android_app',
|
|
'package_name' => 'com.ladill.mini',
|
|
'sha256_cert_fingerprints' => [
|
|
'AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99',
|
|
],
|
|
],
|
|
],
|
|
]);
|
|
}
|
|
}
|