Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add test on canonical name with the ServiceManager #2813

Closed
wants to merge 1 commit into from

2 participants

@blanchonvincent

No description provided.

@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/2813'
Close #2813
978a3d9
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/2813' into develop
Forward port #2813
da8adf4
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-servicemanager
@weierophinney weierophinney Merge branch 'hotfix/2813' 3f9b994
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-servicemanager
@weierophinney weierophinney Merge branch 'hotfix/2813' into develop 303ab92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 20, 2012
  1. @blanchonvincent
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 0 deletions.
  1. +13 −0 tests/ZendTest/ServiceManager/ServiceManagerTest.php
View
13 tests/ZendTest/ServiceManager/ServiceManagerTest.php
@@ -586,4 +586,17 @@ public function testWithAllowOverrideOnRegisteringAServiceDuplicatingAnExistingA
$this->serviceManager->{$method}('response', $service);
$this->{$assertion}($expected, $this->serviceManager->get('response'));
}
+
+ /**
+ * @covers Zend\ServiceManager\ServiceManager::canonicalizeName
+ */
+ public function testCanonicalizeName()
+ {
+ $this->serviceManager->setService('foo_bar', new \stdClass());
+ $this->assertEquals(true, $this->serviceManager->has('foo_bar'));
+ $this->assertEquals(true, $this->serviceManager->has('foobar'));
+ $this->assertEquals(true, $this->serviceManager->has('foo-bar'));
+ $this->assertEquals(true, $this->serviceManager->has('foo/bar'));
+ $this->assertEquals(true, $this->serviceManager->has('foo bar'));
+ }
}
Something went wrong with that request. Please try again.