snapshots(); $this->assertCount(408, $items); $item = reset($items); $this->assertTrue($approved->allows($item['id'], $item['territory_id'], $item['geometry_sha256'], $item['properties_sha256'])); $this->assertFalse($approved->allows('00000000-0000-0000-0000-000000000000', $item['territory_id'], $item['geometry_sha256'], $item['properties_sha256'])); $this->assertFalse($approved->allows($item['id'], '00000000-0000-0000-0000-000000000000', $item['geometry_sha256'], $item['properties_sha256'])); $this->assertFalse($approved->allows($item['id'], $item['territory_id'], str_repeat('0', 64), $item['properties_sha256'])); $this->assertFalse($approved->allows($item['id'], $item['territory_id'], $item['geometry_sha256'], str_repeat('0', 64))); } public function test_the_public_scope_keeps_the_accepted_edition_and_unique_territories(): void { $items = (new ApprovedAdministrativeBoundaries)->snapshots(); $this->assertCount(408, array_unique(array_column($items, 'territory_id'))); $this->assertSame(['2019-06-07'], array_values(array_unique(array_column($items, 'source_version')))); } }