mirror of
https://github.com/silverstripe/silverstripe-tagfield
synced 2024-10-22 11:05:32 +02:00
Merge pull request #194 from creative-commoners/pulls/2/sapphire-test-nine
API phpunit 9 support
This commit is contained in:
commit
3f595cf09a
@ -19,11 +19,12 @@
|
||||
"issues": "http://github.com/silverstripe/silverstripe-tagfield/issues"
|
||||
},
|
||||
"require": {
|
||||
"silverstripe/framework": "^4.3",
|
||||
"php": "^7.3 || ^8.0",
|
||||
"silverstripe/framework": "^4.10",
|
||||
"silverstripe/versioned": "^1.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"sminnee/phpunit": "^5.7",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"squizlabs/php_codesniffer": "^3.0"
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -1,7 +1,9 @@
|
||||
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
|
||||
<testsuite name="Default">
|
||||
<directory>tests/</directory>
|
||||
</testsuite>
|
||||
<testsuites>
|
||||
<testsuite name="Default">
|
||||
<directory>tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist addUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">src/</directory>
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace SilverStripe\TagField\Tests;
|
||||
|
||||
use PHPUnit_Framework_TestCase;
|
||||
use SilverStripe\Control\HTTPRequest;
|
||||
use SilverStripe\Dev\SapphireTest;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
@ -10,9 +9,6 @@ use SilverStripe\Forms\Form;
|
||||
use SilverStripe\TagField\StringTagField;
|
||||
use SilverStripe\TagField\Tests\Stub\StringTagFieldTestBlogPost;
|
||||
|
||||
/**
|
||||
* @mixin PHPUnit_Framework_TestCase
|
||||
*/
|
||||
class StringTagFieldTest extends SapphireTest
|
||||
{
|
||||
/**
|
||||
@ -133,7 +129,7 @@ class StringTagFieldTest extends SapphireTest
|
||||
$schema = $field->getSchemaDataDefaults();
|
||||
$this->assertTrue($schema['lazyLoad']);
|
||||
$this->assertTrue($schema['creatable']);
|
||||
$this->assertContains('suggest', $schema['optionUrl']);
|
||||
$this->assertStringContainsString('suggest', $schema['optionUrl']);
|
||||
}
|
||||
|
||||
public function testSchemaIsAddedToAttributes()
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
namespace SilverStripe\TagField\Tests;
|
||||
|
||||
use PHPUnit_Framework_TestCase;
|
||||
use SilverStripe\Control\HTTPRequest;
|
||||
use SilverStripe\Dev\SapphireTest;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
@ -15,9 +14,6 @@ use SilverStripe\TagField\Tests\Stub\TagFieldTestBlogPost;
|
||||
use SilverStripe\TagField\Tests\Stub\TagFieldTestBlogTag;
|
||||
use SilverStripe\TagField\Tests\Stub\TagFieldTestController;
|
||||
|
||||
/**
|
||||
* @mixin PHPUnit_Framework_TestCase
|
||||
*/
|
||||
class TagFieldTest extends SapphireTest
|
||||
{
|
||||
/**
|
||||
@ -436,7 +432,7 @@ class TagFieldTest extends SapphireTest
|
||||
$schema = $field->getSchemaDataDefaults();
|
||||
$this->assertTrue($schema['lazyLoad']);
|
||||
$this->assertTrue($schema['creatable']);
|
||||
$this->assertContains('suggest', $schema['optionUrl']);
|
||||
$this->assertStringContainsString('suggest', $schema['optionUrl']);
|
||||
}
|
||||
|
||||
public function testSchemaIsAddedToAttributes()
|
||||
|
Loading…
Reference in New Issue
Block a user