Skip to content

Commit

Permalink
Fix phpunit methods
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-novotny committed Nov 21, 2024
1 parent 27a1670 commit 1a234a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/Builder/DefaultDocumentFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ public function testCreateForContentMethodWithInvalidXml2(): void
$this->expectExceptionMessage('DOMDocument::loadXML()');

$document = $this->createMock(DOMDocument::class);
$document->expects(self::once())->method('loadXML')->willReturn(false);
$document->expects($this->once())->method('loadXML')->willReturn(false);

$factory = $this->createMock(DOMDocumentFactory::class);
$factory->expects(self::once())->method('create')->willReturn($document);
$factory->expects($this->once())->method('create')->willReturn($document);

$factory = $this->newDocumentFactory($factory);

Expand Down
6 changes: 3 additions & 3 deletions tests/Builder/DefaultDocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function testToStringFailed(): void
$this->expectExceptionMessage('DOMDocument::saveXML() method failed');

$document = $this->createMock(DOMDocument::class);
$document->expects(self::once())->method('saveXML')->willReturn(false);
$document->expects($this->once())->method('saveXML')->willReturn(false);

$xml = new DefaultDocument($document);

Expand Down Expand Up @@ -469,7 +469,7 @@ public function testValidateXsdFailed(): void
$this->expectExceptionMessage('DOMDocument::schemaValidate() method failed');

$document = $this->createMock(DOMDocument::class);
$document->expects(self::once())->method('schemaValidate')->willReturn(false);
$document->expects($this->once())->method('schemaValidate')->willReturn(false);

$xml = new DefaultDocument($document);

Expand Down Expand Up @@ -636,7 +636,7 @@ public function testSaveMethodFailed(): void
$this->expectExceptionMessage('DOMDocument::save() method failed');

$document = $this->createMock(DOMDocument::class);
$document->expects(self::once())->method('save')->willReturn(false);
$document->expects($this->once())->method('save')->willReturn(false);

$xml = new DefaultDocument($document);

Expand Down

0 comments on commit 1a234a4

Please sign in to comment.