public function testReturnsValue() { $s = new MapShape(['value' => ['type' => 'string']], new ShapeMap([])); $v = $s->getValue(); $this->assertInstanceOf('Vws\\Api\\Shape', $v); $this->assertEquals('string', $v->getType()); $this->assertSame($v, $s->getValue()); }
private function check_map(MapShape $shape, $value) { if (!$this->checkAssociativeArray($value)) { return; } $values = $shape->getValue(); foreach ($value as $key => $v) { $this->path[] = $key; $this->dispatch($values, $v); array_pop($this->path); } }