Issue #3432849 by mondrake, Spokje: Method returnSelf() of class PHPUnit\Framework\TestCase is deprecated in PHPUnit 10
parent
82e373bff8
commit
63a572fc1e
|
@ -70,11 +70,11 @@ class CommentStatisticsUnitTest extends UnitTestCase {
|
|||
|
||||
$this->select->expects($this->any())
|
||||
->method('fields')
|
||||
->will($this->returnSelf());
|
||||
->willReturnSelf();
|
||||
|
||||
$this->select->expects($this->any())
|
||||
->method('condition')
|
||||
->will($this->returnSelf());
|
||||
->willReturnSelf();
|
||||
|
||||
$this->select->expects($this->any())
|
||||
->method('execute')
|
||||
|
|
|
@ -255,7 +255,7 @@ class LocaleLookupTest extends UnitTestCase {
|
|||
$string = $this->createMock('Drupal\locale\StringInterface');
|
||||
$string->expects($this->once())
|
||||
->method('addLocation')
|
||||
->will($this->returnSelf());
|
||||
->willReturnSelf();
|
||||
$this->storage->expects($this->once())
|
||||
->method('findTranslation')
|
||||
->willReturn(NULL);
|
||||
|
|
|
@ -36,7 +36,7 @@ class PerComponentEntityDisplayTest extends MigrateTestCase {
|
|||
$entity->expects($this->once())
|
||||
->method('setComponent')
|
||||
->with('field_name_test', ['test setting'])
|
||||
->will($this->returnSelf());
|
||||
->willReturnSelf();
|
||||
$entity->expects($this->once())
|
||||
->method('save')
|
||||
->with();
|
||||
|
|
|
@ -36,7 +36,7 @@ class PerComponentEntityFormDisplayTest extends MigrateTestCase {
|
|||
$entity->expects($this->once())
|
||||
->method('setComponent')
|
||||
->with('field_name_test', ['test setting'])
|
||||
->will($this->returnSelf());
|
||||
->willReturnSelf();
|
||||
$entity->expects($this->once())
|
||||
->method('save')
|
||||
->with();
|
||||
|
|
|
@ -47,7 +47,7 @@ class MakeUniqueEntityFieldTest extends MigrateProcessTestCase {
|
|||
->getMock();
|
||||
$this->entityQuery->expects($this->any())
|
||||
->method('accessCheck')
|
||||
->will($this->returnSelf());
|
||||
->willReturnSelf();
|
||||
$this->entityTypeManager = $this->createMock(EntityTypeManagerInterface::class);
|
||||
|
||||
$storage = $this->createMock(EntityStorageInterface::class);
|
||||
|
|
|
@ -119,7 +119,7 @@ class StaticMenuLinkOverridesTest extends UnitTestCase {
|
|||
->with('definitions', $this->callback(function (array $value) use (&$definitions): bool {
|
||||
return array_shift($definitions) === $value;
|
||||
}))
|
||||
->will($this->returnSelf());
|
||||
->willReturnSelf();
|
||||
$config->expects($this->exactly(2))
|
||||
->method('save');
|
||||
|
||||
|
@ -159,7 +159,7 @@ class StaticMenuLinkOverridesTest extends UnitTestCase {
|
|||
$config->expects($old_definitions != $new_definitions ? $this->once() : $this->never())
|
||||
->method('set')
|
||||
->with('definitions', $new_definitions)
|
||||
->will($this->returnSelf());
|
||||
->willReturnSelf();
|
||||
$config->expects($old_definitions != $new_definitions ? $this->once() : $this->never())
|
||||
->method('save');
|
||||
|
||||
|
|
Loading…
Reference in New Issue