function it_prepares_the_subject(ExampleNode $example, ObjectBehavior $context, MatcherManager $matchers, CollaboratorManager $collaborators, SpecificationNode $specification, ResourceInterface $resource, VarienWrapper $wrapper, Subject $subject, $factory) { $factory->create(Argument::cetera())->willReturn($wrapper); $wrapper->wrap(null)->willReturn($subject); $subject->beAnInstanceOf('\\stdObject'); $subject = $subject->getWrappedObject(); $resource->getSrcClassname()->willReturn('\\stdObject'); $specification->getResource()->willReturn($resource); $example->getSpecification()->willReturn($specification); $context->setSpecificationSubject($subject)->shouldBeCalled(); $this->prepare($example, $context, $matchers, $collaborators); }
function its_presentValue_displays_invokable_objects_as_objects() { $invokable = new ObjectBehavior(); $invokable->setSpecificationSubject($this); $this->presentValue($invokable)->shouldReturn('[obj:PhpSpec\\Formatter\\Presenter\\StringPresenter]'); }
function it_configures_options(OptionsResolver $resolver) { parent::configureOptions($resolver); $resolver->setDefault('choice_list', null)->shouldBeCalled(); $resolver->setDefault('choices', Argument::type('callable'))->shouldBeCalled(); }