diff --git a/tests/Fixture/InboxFixture.php b/tests/Fixture/InboxFixture.php index f26a4c8..d274a56 100644 --- a/tests/Fixture/InboxFixture.php +++ b/tests/Fixture/InboxFixture.php @@ -11,8 +11,8 @@ class InboxFixture extends TestFixture public $connection = 'test'; public $table = 'inbox'; - public const INBOX_USER_REGISTRATION_ID = 1; - public const INBOX_INCOMING_CONNECTION_REQUEST_ID = 2; + public const INBOX_USER_REGISTRATION_UUID = 'e783b13a-7019-48f5-848e-582bb930a833'; + public const INBOX_INCOMING_CONNECTION_REQUEST_UUID = '9810bd94-16f9-42e0-b364-af59dba50a34'; public function init(): void { @@ -20,8 +20,7 @@ class InboxFixture extends TestFixture $this->records = [ [ - 'id' => self::INBOX_USER_REGISTRATION_ID, - 'uuid' => $faker->uuid(), + 'uuid' => self::INBOX_USER_REGISTRATION_UUID, 'scope' => 'User', 'action' => 'Registration', 'title' => 'User account creation requested for foo@bar.com', @@ -37,8 +36,7 @@ class InboxFixture extends TestFixture 'modified' => $faker->dateTime()->getTimestamp() ], [ - 'id' => self::INBOX_INCOMING_CONNECTION_REQUEST_ID, - 'uuid' => $faker->uuid(), + 'uuid' => self::INBOX_INCOMING_CONNECTION_REQUEST_UUID, 'scope' => 'LocalTool', 'action' => 'IncomingConnectionRequest', 'title' => 'Request for MISP Inter-connection', diff --git a/tests/TestCase/Api/Inbox/IndexInboxApiTest.php b/tests/TestCase/Api/Inbox/IndexInboxApiTest.php index b8af1c6..0a60393 100644 --- a/tests/TestCase/Api/Inbox/IndexInboxApiTest.php +++ b/tests/TestCase/Api/Inbox/IndexInboxApiTest.php @@ -30,7 +30,7 @@ class IndexInboxApiTest extends TestCase $this->get(self::ENDPOINT); $this->assertResponseOk(); - $this->assertResponseContains(sprintf('"id": %d', InboxFixture::INBOX_USER_REGISTRATION_ID)); - $this->assertResponseContains(sprintf('"id": %d', InboxFixture::INBOX_INCOMING_CONNECTION_REQUEST_ID)); + $this->assertResponseContains(sprintf('"uuid": "%s"', InboxFixture::INBOX_USER_REGISTRATION_UUID)); + $this->assertResponseContains(sprintf('"uuid": "%s"', InboxFixture::INBOX_INCOMING_CONNECTION_REQUEST_UUID)); } }