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

Commit

Permalink
Merge pull request zendframework/zendframework#6747 from nickpeirson/…
Browse files Browse the repository at this point in the history
…DI-DefinitionList-Optimisation

DI definition list optimisation - Cache classes upfront where possible to reduce iterations
  • Loading branch information
weierophinney committed Feb 23, 2015
14 parents a5d9cef + aeb4704 + fc40746 + c1af016 + 181295d + 1b0cc8f + 5c7faf9 + 9c50ec8 + 008d34b + 2356545 + ad73ec9 + 9ef93b6 + 5976b51 + 63691f1 commit c225829
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/Di/DiAbstractServiceFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ public function testCanCreateServiceWithName()
->method('hasClass')
->with($this->equalTo(__NAMESPACE__ . '\Other\Non\Existing'))
->will($this->returnValue(true));
$classDefinition
->expects($this->any())
->method('getClasses')
->will($this->returnValue(array(__NAMESPACE__ . '\Other\Non\Existing')));
$def->addDefinition($classDefinition);
$this->assertTrue($instance->canCreateServiceWithName($locator, __NAMESPACE__ . '\Other\Non\Existing', __NAMESPACE__ . '\Other\Non\Existing'));
}
Expand Down

0 comments on commit c225829

Please sign in to comment.