From d0ecad03b1ae42e4b24251d9d24d906c9739fa03 Mon Sep 17 00:00:00 2001 From: Alex Debril Date: Fri, 30 Dec 2016 10:05:09 +0100 Subject: [PATCH] Fix #68 : lower-case aliases mapping --- src/FeedIo/RuleSet.php | 2 +- tests/FeedIo/RuleSetTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FeedIo/RuleSet.php b/src/FeedIo/RuleSet.php index ddc258e4..7a8b67a7 100644 --- a/src/FeedIo/RuleSet.php +++ b/src/FeedIo/RuleSet.php @@ -74,7 +74,7 @@ public function add(RuleAbstract $rule, array $aliases = array()) public function addAliases($name, array $aliases) { foreach ($aliases as $alias) { - $this->aliases[$alias] = $name; + $this->aliases[strtolower($alias)] = strtolower($name); } return $this; diff --git a/tests/FeedIo/RuleSetTest.php b/tests/FeedIo/RuleSetTest.php index 7cf80b72..36887a37 100644 --- a/tests/FeedIo/RuleSetTest.php +++ b/tests/FeedIo/RuleSetTest.php @@ -34,7 +34,7 @@ public function testAdd() public function testAddAliases() { - $name = 'mainNode'; + $name = 'main-node'; $aliases = array('node1', 'node2'); $this->object->addAliases($name, $aliases);