function it_uses_registered_generators_to_generate_code(Generator $generator, Resource $resource) { $generator->getPriority()->willReturn(0); $generator->supports($resource, 'specification', array())->willReturn(true); $generator->generate($resource, array())->shouldBeCalled(); $this->registerGenerator($generator); $this->generate($resource, 'specification'); }