phpunit testing a json object for one of two values -


how use php unittest check json object has 1 of 2 values

{"option":valule}... value can either 0 or 1

i want like

$optionvalue = {"option":0};  $data = json-decode($optionvalue);     this->containonly(0,1, $data) 

$this->assertthat ($data["option"],                     $this->logicalor ($this->equalto (1), $this->equalto (0))); 

Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -