mirror of
https://github.com/silverstripe/silverstripe-externallinks.git
synced 2024-10-22 17:05:44 +02:00
Merge pull request #31 from creative-commoners/pulls/2.0/juggle-stubs
FIX Implement TestOnly in PretendLinkChecker, move Page stub and sort class imports
This commit is contained in:
commit
6739163212
@ -2,16 +2,16 @@
|
||||
|
||||
namespace SilverStripe\ExternalLinks\Tests;
|
||||
|
||||
use SilverStripe\ExternalLinks\Reports\BrokenExternalLinksReport;
|
||||
use SilverStripe\ExternalLinks\Model\BrokenExternalPageTrackStatus;
|
||||
use SilverStripe\ExternalLinks\Tasks\CheckExternalLinksTask;
|
||||
use SilverStripe\ExternalLinks\Tests\ExternalLinksTestPage;
|
||||
use SilverStripe\i18n\i18n;
|
||||
use SilverStripe\Core\Injector\Injector;
|
||||
use SilverStripe\ExternalLinks\Tasks\LinkChecker;
|
||||
use SilverStripe\ExternalLinks\Tests\Stubs\PretendLinkChecker;
|
||||
use SilverStripe\Reports\Report;
|
||||
use SilverStripe\Dev\SapphireTest;
|
||||
use SilverStripe\ExternalLinks\Model\BrokenExternalPageTrackStatus;
|
||||
use SilverStripe\ExternalLinks\Reports\BrokenExternalLinksReport;
|
||||
use SilverStripe\ExternalLinks\Tasks\CheckExternalLinksTask;
|
||||
use SilverStripe\ExternalLinks\Tasks\LinkChecker;
|
||||
use SilverStripe\ExternalLinks\Tests\Stubs\ExternalLinksTestPage;
|
||||
use SilverStripe\ExternalLinks\Tests\Stubs\PretendLinkChecker;
|
||||
use SilverStripe\i18n\i18n;
|
||||
use SilverStripe\Reports\Report;
|
||||
|
||||
class ExternalLinksTest extends SapphireTest
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
SilverStripe\ExternalLinks\Tests\ExternalLinksTestPage:
|
||||
SilverStripe\ExternalLinks\Tests\Stubs\ExternalLinksTestPage:
|
||||
# Tests mix of broken and working external links
|
||||
page1:
|
||||
Title: 'Page 1'
|
||||
|
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace SilverStripe\ExternalLinks\Tests;
|
||||
namespace SilverStripe\ExternalLinks\Tests\Stubs;
|
||||
|
||||
use SilverStripe\Dev\TestOnly;
|
||||
use Page;
|
||||
use SilverStripe\Dev\TestOnly;
|
||||
|
||||
class ExternalLinksTestPage extends Page implements TestOnly
|
||||
{
|
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
namespace SilverStripe\ExternalLinks\Tests\Stubs;
|
||||
|
||||
use SilverStripe\Dev\TestOnly;
|
||||
use SilverStripe\ExternalLinks\Tasks\LinkChecker;
|
||||
|
||||
class PretendLinkChecker implements LinkChecker
|
||||
class PretendLinkChecker implements LinkChecker, TestOnly
|
||||
{
|
||||
public function checkLink($href)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user