test if array contains value using PHPUnit

后端 未结 1 728
走了就别回头了
走了就别回头了 2021-02-04 23:16

I created this array of objects:

$ad_1 = new AdUnit(array(\'id\' => \'1\', \'name\' => \'Ad_1\', \'description\' => \'great ad\', \'code\' => \'alpha         


        
相关标签:
1条回答
  • 2021-02-05 00:05

    Try the assertContains method:

    $this->assertContains( $randad, $adUnitArr );
    
    0 讨论(0)
提交回复
热议问题