public function testFindOneByType() { $expected = new TypeOne(); $entities = array($expected, new TypeTwo(), new TypeOne(), new TypeTwo()); $registry = new Registry(); $registry->merge($entities); $this->assertSame($expected, $registry->findOne(get_class($expected))); }
/** * Clean up after scenario was executed. * * @AfterScenario * * @param AfterScenarioScope $scope */ public function afterScenarioCleanup(AfterScenarioScope $scope) { $this->registry->reset(); }