php - Is there a way in phpunit that I could possibly assert two values for a key in an array? -


$array = [a => '1',  b => '2'] 

for example, want check if either 1 or 3. thought using work.

$this->assertthat(     $this->assertcontains('1',$array),     $this->logicalor(         $this->assertcontains('3',$array) )); 

if want assert $array["a"] ("i want check if a...") contains 1 or 3, work:

$array = ["a" => "1", "b" => "2"]; $this->assertthat($array["a"],     $this->logicalor(         $this->equalto("1"),         $this->equalto("3") )); 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -