Fixed merge conflicts

This commit is contained in:
Alejandro Celaya 2023-02-10 20:44:05 +01:00
commit 245cb0e35d
5 changed files with 35 additions and 3 deletions

View file

@ -18,7 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
* *Nothing*
### Fixed
* *Nothing*
* [#1698](https://github.com/shlinkio/shlink/issues/1698) Fixed error 500 in `robots.txt`.
## [3.5.1] - 2023-02-04

View file

@ -187,7 +187,7 @@ return [
Util\DoctrineBatchHelper::class,
],
Crawling\CrawlingHelper::class => ['em'],
Crawling\CrawlingHelper::class => [ShortUrl\Repository\CrawlableShortCodesQuery::class],
],
];

View file

@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace ShlinkioApiTest\Shlink\Core\Action;
use Shlinkio\Shlink\TestUtils\ApiTest\ApiTestCase;
class RobotsTest extends ApiTestCase
{
/** @test */
public function expectedListOfCrawlableShortCodesIsReturned(): void
{
$resp = $this->callShortUrl('robots.txt');
$body = $resp->getBody()->__toString();
self::assertEquals(200, $resp->getStatusCode());
self::assertEquals(
<<<ROBOTS
# For more information about the robots.txt standard, see:
# https://www.robotstxt.org/orig.html
User-agent: *
Allow: /custom
Allow: /abc123
Disallow: /
ROBOTS,
$body,
);
}
}

View file

@ -124,7 +124,7 @@ class ListShortUrlsTest extends ApiTestCase
],
'domain' => null,
'title' => null,
'crawlable' => false,
'crawlable' => true,
'forwardQuery' => false,
];
private const SHORT_URL_CUSTOM_DOMAIN = [

View file

@ -62,6 +62,7 @@ class ShortUrlsFixture extends AbstractFixture implements DependentFixtureInterf
'maxVisits' => 2,
'apiKey' => $authorApiKey,
'longUrl' => 'https://shlink.io',
'crawlable' => true,
'forwardQuery' => false,
])), '2019-01-01 00:00:20');
$manager->persist($customShortUrl);