Skip to content

Commit

Permalink
Coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
Nattfarinn committed Jun 5, 2024
1 parent ac9bedd commit fd1c278
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function testResolveVirtualField(): void
$converterRegistry = $this->getConverterRegistry();

$contentGateway = $this->createMock(ContentGateway::class);
$contentGateway->expects($this->never())->method('insertNewField');
$contentGateway->expects(self::never())->method('insertNewField');

$storageRegistry = $this->createMock(StorageRegistry::class);
$storageRegistry->method('getStorage')->willReturn(new NullStorage());
Expand Down Expand Up @@ -83,7 +83,7 @@ public function testResolveVirtualExternalStorageField(): void
$converterRegistry = $this->getConverterRegistry();

$contentGateway = $this->createMock(ContentGateway::class);
$contentGateway->expects($this->never())->method('insertNewField');
$contentGateway->expects(self::never())->method('insertNewField');

$defaultFieldStorageMock = $this->createMock(DefaultDataFieldStorage::class);
$defaultFieldStorageMock
Expand Down Expand Up @@ -144,9 +144,9 @@ public function testPersistEmptyExternalStorageField(): void
$converterRegistry = $this->getConverterRegistry();

$storage = $this->createMock(FieldStorage::class);
$storage->expects($this->never())->method('storeFieldData');
$storage->expects(self::never())->method('storeFieldData');

$storage->expects($this->once())
$storage->expects(self::once())
->method('getFieldData')
->willReturnCallback(static function (VersionInfo $versionInfo, Field $field) {
$field->value->externalData = [
Expand All @@ -158,7 +158,7 @@ public function testPersistEmptyExternalStorageField(): void
$storageRegistry->method('getStorage')->willReturn($storage);

$contentGateway = $this->createMock(ContentGateway::class);
$contentGateway->expects($this->once())->method('insertNewField')
$contentGateway->expects(self::once())->method('insertNewField')
->willReturn(567);

$eventDispatcher = $this->getEventDispatcher(
Expand Down Expand Up @@ -210,19 +210,19 @@ public function testPersistExternalStorageField(): void
$converterRegistry = $this->getConverterRegistry();

$storage = $this->createMock(FieldStorage::class);
$storage->expects($this->once())
$storage->expects(self::once())
->method('storeFieldData')
->willReturnCallback(static function (VersionInfo $versionInfo, Field $field) {
$field->value->externalData = $field->value->data;
});

$storage->expects($this->once())->method('getFieldData');
$storage->expects(self::once())->method('getFieldData');

$storageRegistry = $this->createMock(StorageRegistry::class);
$storageRegistry->method('getStorage')->willReturn($storage);

$contentGateway = $this->createMock(ContentGateway::class);
$contentGateway->expects($this->once())->method('insertNewField')
$contentGateway->expects(self::once())->method('insertNewField')
->willReturn(456);

$eventDispatcher = $this->getEventDispatcher(
Expand Down

0 comments on commit fd1c278

Please sign in to comment.