container['counterpart_finder']->findByUserId(2); $this->assertCount(1, $counterparts); $firstCounterpart = reset($counterparts); // Check the first counterpart $expectedCounterpart = [ 'id' => '2', 'user_id' => '2', 'datec' => '2016-06-22 12:34:00', 'quoi' => 'piplome', 'taille' => '2', 'status' => '2', 'adresse_id' => null, 'pdf_id' => '1', 'pdf_nom' => 'Main', 'pdf_url' => 'pdf', 'commentaire' => '', ]; $this->assertEquals($expectedCounterpart, $firstCounterpart); } }