public function setUp() { parent::setUp(); $this->config = new Config(array('endpoint' => 'http://me.io', 'username' => 'user', 'password' => 'pass', 'version' => $this->version)); $this->client = Phockito::spy('PublishServiceClient\\Client', $this->config); $this->testDescription = array("name" => "test app", "apiVersion" => "1.0.6", "description" => "this is a test", "operations" => array("TestOperation" => array("httpMethod" => "PUT", "uri" => "/brand/{BrandKey}", "summary" => "Create a brand", "parameters" => array("BrandKey" => array("location" => "uri", "required" => true))))); }
public function setUp() { parent::setUp(); //setup the general object graph Phockito::when($this->mockService->getHost())->return($this->mockServiceHost); Phockito::when($this->mockService->getConfiguration())->return($this->mockServiceConfiguration); }
public function setUp($useReflection = true, $useAnnotations = true, Cache $cache = null) { parent::setUp(); $builder = new ContainerBuilder(); $builder->useReflection($useReflection)->useAnnotations($useAnnotations); if (!is_null($cache)) { $builder->setDefinitionCache($cache); } $this->DIContainer = $builder->build(); $this->registerMocks(); }
public function setUp() { parent::setUp(); //setup some general navigation between POData types $serviceURI = new Url("http://host.com/data.svc"); Phockito::when($this->mockServiceHost->getAbsoluteServiceUri())->return($serviceURI); Phockito::when($this->mockService->getHost())->return($this->mockServiceHost); Phockito::when($this->mockService->getProvidersWrapper())->return($this->mockProvidersWrapper); Phockito::when($this->mockProvidersWrapper->resolveResourceSet("Collection"))->return($this->mockCollectionResourceSetWrapper); Phockito::when($this->mockCollectionResourceSetWrapper->getResourceType())->return($this->mockCollectionResourceType); Phockito::when($this->mockCollectionResourceType->getKeyProperties())->return(array($this->mockCollectionKeyProperty)); Phockito::when($this->mockCollectionKeyProperty->getInstanceType())->return(new Int32()); Phockito::when($this->mockCollectionResourceType->resolveProperty("RelatedCollection"))->return($this->mockCollectionRelatedCollectionProperty); Phockito::when($this->mockProvidersWrapper->resolveResourceSet("RelatedCollection"))->return($this->mockRelatedCollectionResourceSetWrapper); Phockito::when($this->mockRelatedCollectionResourceSetWrapper->getResourceType())->return($this->mockRelatedCollectionResourceType); Phockito::when($this->mockRelatedCollectionResourceType->getKeyProperties())->return(array($this->mockRelatedCollectionKeyProperty)); Phockito::when($this->mockRelatedCollectionKeyProperty->getInstanceType())->return(new Int32()); $this->fakeServiceConfig = new ServiceConfiguration($this->mockMetadataProvider); Phockito::when($this->mockService->getConfiguration())->return($this->fakeServiceConfig); }
public function setUp() { parent::setUp(); Phockito::when($this->mockService->getHost())->return($this->mockHost); }