Exemple #1
0
 public function testPassesParametersToTheQuery()
 {
     $entityDefinitionCreator = new EntityDefinitionCreator(new ToUnderscores());
     $parameters = array(':field' => 2);
     $this->queryAdapter->executeQuery(StubDatabaseAdapter::ENTITY_WITH_SINGLE_FIELD, $entityDefinitionCreator->create(EntityWithSingleString::class), $parameters);
     $this->assertEquals($parameters, $this->dbAdapter->getLastQueryParameters());
 }
Exemple #2
0
 public function testeMapsComplexGetterOntoFieldName()
 {
     $this->mapper->map(['some_complex_field' => 'aaa'], $this->definitionCreator->create(EntityWithComplexFieldName::class));
 }
 public function testMethodsThatNamesDontStartWithGetAreIgnored()
 {
     $definition = $this->definitionCreator->create(EntityWithMethod::class);
     $expectedDefinition = new EntityDefinition(EntityWithMethod::class);
     $this->assertEquals($expectedDefinition, $definition);
 }