我有兩個物件陣列。我想測試這兩個數組是否相等,但要使用嚴格比較,例如 'false' !== 0。
在phpunit中是否有可能實現這一點,而不需要自訂比較器或其他方法?
使用symfony VarExporter解決了問題:
self::assertSame(VarExporter::export($firstArrayOfObjects), VarExporter::export($secondArrayOfObjects));
使用symfony VarExporter解決了問題: