Ejemplo n.º 1
1
 /**
  * @cover \app\Domain\Collectors\ClientCollector:attach
  * @cover \app\Domain\Collectors\ClientCollector:toArray
  */
 public function testGetCollectionMustReturnArray()
 {
     $collector = new ClientCollector();
     $client = new ClientEntity();
     $client->setId("1234");
     $client->setFirstName("Silex");
     $client->setLastName("Project");
     $client->setEmail("*****@*****.**");
     $client->setAge('1');
     $collector->add($client);
     $expected[] = ['id' => '1234', 'first_name' => 'Silex', 'last_name' => 'Project', 'email' => '*****@*****.**', 'age' => '1'];
     $this->assertEquals($expected, $collector->toArray());
 }