mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #784 from creative-commoners/pulls/5/phpunit11
DEP Use PHPUnit 11
This commit is contained in:
commit
d994acf9fa
@ -7,9 +7,6 @@ use SilverStripe\Dev\SapphireTest;
|
||||
use SilverStripe\ORM\FieldType\DBDatetime;
|
||||
use SilverStripe\Security\Security;
|
||||
|
||||
/**
|
||||
* @coversDefaultClass \SilverStripe\Blog\Model\BlogPostFilter
|
||||
*/
|
||||
class BlogPostFilterTest extends SapphireTest
|
||||
{
|
||||
/**
|
||||
@ -33,7 +30,6 @@ class BlogPostFilterTest extends SapphireTest
|
||||
|
||||
/**
|
||||
* Tests that unpublished articles are not returned
|
||||
* @covers ::augmentSQL
|
||||
*/
|
||||
public function testFilter()
|
||||
{
|
||||
|
@ -10,6 +10,7 @@ use SilverStripe\ORM\FieldType\DBDatetime;
|
||||
use SilverStripe\Security\Member;
|
||||
use SilverStripe\Security\Security;
|
||||
use SilverStripe\Versioned\Versioned;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
|
||||
class BlogPostTest extends SapphireTest
|
||||
{
|
||||
@ -21,9 +22,7 @@ class BlogPostTest extends SapphireTest
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider canViewProvider
|
||||
*/
|
||||
#[DataProvider('canViewProvider')]
|
||||
public function testCanView($date, $user, $page, $canView, $stage)
|
||||
{
|
||||
$userRecord = $this->objFromFixture(Member::class, $user);
|
||||
@ -45,7 +44,7 @@ class BlogPostTest extends SapphireTest
|
||||
* - expected result
|
||||
* - versioned stage
|
||||
*/
|
||||
public function canViewProvider()
|
||||
public static function canViewProvider()
|
||||
{
|
||||
$someFutureDate = '2013-10-10 20:00:00';
|
||||
$somePastDate = '2009-10-10 20:00:00';
|
||||
@ -152,9 +151,8 @@ class BlogPostTest extends SapphireTest
|
||||
/**
|
||||
* @param string $type
|
||||
* @param string $expected
|
||||
* @dataProvider monthlyArchiveLinkProvider
|
||||
* @group wip
|
||||
*/
|
||||
#[DataProvider('monthlyArchiveLinkProvider')]
|
||||
public function testGetMonthlyArchiveLink($type, $expected)
|
||||
{
|
||||
/** @var BlogPost $blogPost */
|
||||
@ -168,7 +166,7 @@ class BlogPostTest extends SapphireTest
|
||||
/**
|
||||
* @return array[]
|
||||
*/
|
||||
public function monthlyArchiveLinkProvider()
|
||||
public static function monthlyArchiveLinkProvider()
|
||||
{
|
||||
return [
|
||||
['day', '/2013/10/1'],
|
||||
|
Loading…
Reference in New Issue
Block a user