public function testToArray() { $sUT = new Schema(); $sUT->addProperty('test', new Property()); $sUT->addItem('test', new Item()); $this->assertInternalType('array', $sUT->toArray()); }
/** * @param string $key * @param JSONSchema\Structure\Item $item * @return $this */ protected function appendItem($key, Item $item) { if (!isset($this->schemaObject)) { throw new NoStructureFoundException("The Schema is not attached or is not initialized. "); } $this->schemaObject->addItem($key, $item); return $this; }