I have a question,
I am using phpunit WebTestCase in symfony 3.4
but I don't know how to assert it
and I get
--- Expected
+++ Actual
@@ @@
Array (
-0 => 'amount' => 50
+0 => Array (...)
)
this is my ControllerTest
public function testmoneyIn()
{
$client = static::createClient();
$client->request('POST', '/bank/moneyin', array('amount' => 50));
$query = $this->em->createQueryBuilder()
->select('b')
->from('BankBundle:entry', 'b')
->orderBy('b.created_at', 'DESC')
->setMaxResults(1);
$data = $query->getQuery()->getArrayResult();
$this->assertEquals(['amount' => 50],$data);
}