Skip to content

Commit

Permalink
Renamed method
Browse files Browse the repository at this point in the history
  • Loading branch information
Sammyjo20 committed Dec 4, 2023
1 parent b4050d0 commit e20bf2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/XmlReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ public function setXpathNamespaceMap(array $xpathNamespaceMap): XmlReader
*
* @return $this
*/
public function withoutNamespaces(): static
public function removeNamespaces(): static
{
$this->includeNamespaces = false;

Expand Down
6 changes: 3 additions & 3 deletions tests/Feature/XmlReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@
expect($mappedXpathTag)->toBe('1');
});

test('can remove prefixes from xml', function () {
test('can remove namespaces and prefixes from xml', function () {
$reader = XmlReader::fromFile('tests/Fixtures/prefixed-breakfast-menu.xml');

expect($reader->element('food.0')->first())->toBeNull();
Expand All @@ -574,9 +574,9 @@
])
);

// Now we'll remove the namespace
// Now we'll remove the namespaces

$reader->withoutNamespaces();
$reader->removeNamespaces();

expect($reader->element('bkfst:food.0')->first())->toBeNull();

Expand Down

0 comments on commit e20bf2d

Please sign in to comment.