/** * @test */ public function addDifferentParams() { $this->jsonBuilder->add("variety", "v1"); $this->jsonBuilder->add("type", "t1"); $this->jsonBuilder->add("origin", "o1"); $this->jsonBuilder->add("destiny", "d1"); $json = '{"variety":"v1","type":"t1","origin":"o1","destiny":"d1"}'; $this->assertEquals($json, $this->jsonBuilder->render()); $this->jsonBuilder->addMultipleValues("values", "value", array(1, 2, 3)); $json = str_replace('}', ',"values":[{"value":1},{"value":2},{"value":3}]}', $json); $this->assertEquals($json, $this->jsonBuilder->render()); }