Ouzo\Tests\ArrayAssert::that PHP Method

that() public static method

public static that ( array $actual )
$actual array
    public static function that(array $actual)
    {
        return new ArrayAssert($actual);
    }

Usage Example

Beispiel #1
0
 /**
  * @test
  */
 public function shouldDecodeJsonAsArray()
 {
     //given
     $json = '{"name":"john","id":123,"ip":"127.0.0.1"}';
     //when
     $decoded = Json::safeDecode($json, true);
     //then
     ArrayAssert::that($decoded)->hasSize(3)->contains('john', 123, '127.0.0.1');
 }
All Usage Examples Of Ouzo\Tests\ArrayAssert::that