Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Commit

Permalink
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/ServiceManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
}

0 comments on commit 303ab92

Please sign in to comment.